Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in custom tag library

 
abhijeet srivastava
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic