Why doesn't my tag handler, HelloWorldSimpleTag, work unless it is in a package? Is it Tomcat 5.0.14 (on Windows XP) or is it the tag handler? Tomcat generates the error message shown below when I attempt to execute HelloWorldSimpleTag with HelloWorldSimpleTag.class in WEB-INF/classes, but works fine when I store it in WEB-INF/classes/simple (that is, in a package called simple).
Please find all source files, deployment descriptor
(web/WEB-INF/web.xml), and tag library descriptor
(web/WEB-INF/simple.tld) in HelloWorldSimpleTag.zip (attached). You'll
find HelloWorldSimpleTag.java in directory source. From this Java
source file, the build generates
build/WEB-INF/classes/HelloWorldSimpleTag.class. The build also copies
web/WEB-INF/web.xml and web/WEB-INF/simple.tld to build/WEB-INF.
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: 9 in the jsp file: /index.jsp Generated servlet
error:
[javac] Compiling 1 source file
C:\Program Files\Apache Software Foundation\Tomcat
5.0\work\Catalina\localhost\HelloWorldSimpleTag\org\apache\jsp\index_jsp
.java:76: cannot resolve symbol symbol : class HelloWorldSimpleTag
location: class org.apache.jsp.index_jsp
HelloWorldSimpleTag _jspx_th_simple_HelloWorld_0 = new
HelloWorldSimpleTag();
^
An error occurred at line: 9 in the jsp file: /index.jsp Generated
servlet error: C:\Program Files\Apache Software Foundation\Tomcat
5.0\work\Catalina\localhost\HelloWorldSimpleTag\org\apache\jsp\index_jsp
.java:76: cannot resolve symbol symbol : class HelloWorldSimpleTag
location: class org.apache.jsp.index_jsp
HelloWorldSimpleTag _jspx_th_simple_HelloWorld_0 = new
HelloWorldSimpleTag();
^
2 errors
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHa
ndler.java:127)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.ja
va:351)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:418)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:461)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:442)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.ja
va:552)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:291)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
note The full stack trace of the root cause is available in the Tomcat
logs.
------------------------------------------------------------------------
--------
Apache Tomcat/5.0.14
Thanks for your help,
Derek
HelloWorldSimpleTag.zip
Description: HelloWorldSimpleTag.zip
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
