Http status 500 org.apache.jasper.JasperException: Unable to compile class
Using netbeans 5.5
executing a jsp using a custom simple tag (tag handler, tld file, jsp file code included after the error)
how do i resolve this following runtime error:
==============================
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 17 in the jsp file: /test3.jsp
Generated servlet error:
[javac] /Users/user2/SDK/domains/domain1/generated/jsp/j2ee-modules/JspTester1/org/apache/jsp/test3_jsp.java:96: cannot find symbol
[javac] symbol : class NewClass
[javac] location: class org.apache.jsp.test3_jsp
[javac]NewClass _jspx_th_tld1_simple1_0 = new NewClass();
[javac]^
An error occurred at line: 17 in the jsp file: /test3.jsp
Generated servlet error:
[javac] /Users/user2/SDK/domains/domain1/generated/jsp/j2ee-modules/JspTester1/org/apache/jsp/test3_jsp.java:96: cannot find symbol
[javac] symbol : class NewClass
[javac] location: class org.apache.jsp.test3_jsp
[javac]NewClass _jspx_th_tld1_simple1_0 = new NewClass();
[javac]^
[javac] Note: /Users/user2/SDK/domains/domain1/generated/jsp/j2ee-modules/JspTester1/org/apache/jsp/test3_jsp.java uses unchecked or unsafe operations.
An error occurred at line: 17 in the jsp file: /test3.jsp
Generated servlet error:
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 2 errors
note The full stack traces of the exception and its root causes are available in the Sun Java System Application Server Platform Edition 9.0_01 logs.
==============
tag handler:
============
import javax.servlet.jsp.tagext.*;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.JspException;
public class NewTagHandler extends SimpleTagSupport {
public void doTag() throws JspException {
JspWriter out=getJspContext().getOut();
try {
out.println("<strong>" + "new tag handler class" + "</strong>");
// out.println("<blockquote>");
} catch (java.io.IOException ex) {
throw new JspException(ex.getMessage());
}
}
}
tld file:
======
<?xml version="1.0" encoding="UTF-8"?>
<taglib version="2.0" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-jsptaglibrary_2_0.xsd">
<tlib-version>1.0</tlib-version>
<short-name>tld1</short-name>
<uri>/WEB-INF/tlds/tld1.tld</uri>
<tag>
<name>simple1</name>
<tag-class>NewClass</tag-class>
<body-content>empty</body-content>
</tag>
</taglib>
jsp file:
======
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/tlds/tld1.tld" prefix="tld1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1>JSP Page</h1>
TagTester: <tld1:simple1/>
</body>
</html>
========

