jQuery in Action, 2nd edition*
The moose likes JSP and the fly likes problem in custom tag library Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "problem in custom tag library" Watch "problem in custom tag library" New topic
Author

problem in custom tag library

abhijeet srivastava
Greenhorn

Joined: Aug 22, 2006
Posts: 26
Hi all!

I am creating a custom tag and using it in a jsp file.
My applicaion name is- TagTest.
there are three files in it.

handler class file- ExampleTag.java
tld file- csajsp_taglib.tld
a jsp file in which tag is used- SimpleExample.jsp

Directory structure is like this-



But when i am running SimpleExample.jsp file then it shows following 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: 4 in the jsp file: /SimpleExample.jsp
Generated servlet error:
ExampleTag cannot be resolved to a type

An error occurred at line: 4 in the jsp file: /SimpleExample.jsp
Generated servlet error:
ExampleTag cannot be resolved to a type

An error occurred at line: 4 in the jsp file: /SimpleExample.jsp
Generated servlet error:
ExampleTag cannot be resolved to a type

An error occurred at line: 8 in the jsp file: /SimpleExample.jsp
Generated servlet error:
ExampleTag cannot be resolved to a type

An error occurred at line: 8 in the jsp file: /SimpleExample.jsp
Generated servlet error:
ExampleTag cannot be resolved to a type

An error occurred at line: 8 in the jsp file: /SimpleExample.jsp
Generated servlet error:
ExampleTag cannot be resolved to a type


org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 4 in the jsp file: /SimpleExample.jsp
Generated servlet error:
ExampleTag cannot be resolved to a type

An error occurred at line: 4 in the jsp file: /SimpleExample.jsp
Generated servlet error:
ExampleTag cannot be resolved to a type

An error occurred at line: 4 in the jsp file: /SimpleExample.jsp
Generated servlet error:
ExampleTag cannot be resolved to a type

An error occurred at line: 8 in the jsp file: /SimpleExample.jsp
Generated servlet error:
ExampleTag cannot be resolved to a type

An error occurred at line: 8 in the jsp file: /SimpleExample.jsp
Generated servlet error:
ExampleTag cannot be resolved to a type

An error occurred at line: 8 in the jsp file: /SimpleExample.jsp
Generated servlet error:
ExampleTag cannot be resolved to a type


org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:414)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


[BPSouther: wrapped directory structure in a set of UBB CODE Tags]
[ December 05, 2006: Message edited by: Ben Souther ]
 
GeeCON Prague 2014
 
subject: problem in custom tag library