aspose file tools*
The moose likes Servlets and the fly likes JSP Custom tags Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "JSP Custom tags" Watch "JSP Custom tags" New topic
Author

JSP Custom tags

Sumana Reddy
Greenhorn

Joined: Oct 28, 2000
Posts: 14
I am new to JSP custom tags
when i tried to run my first example using custom tags
in JRUN i am getting the error
_______________________________
500 Internal Server Error
/tagext/jsp/hello1.jsp:
javax.servlet.ServletException: javax.servlet.jsp.tagext.TagData: method getAttributes()Ljava/util/Enumeration; not found
java.lang.NoSuchMethodError: javax.servlet.jsp.tagext.TagData: method getAttributes()Ljava/util/Enumeration; not found
at allaire.jrun.jsp.JSPParser.validateTagAttributes(JSPParser.java, Compiled Code)
at allaire.jrun.jsp.JSPParser.action(JSPParser.java:962)
at allaire.jrun.jsp.JSPParser.parse(JSPParser.java, Compiled Code)
at allaire.jrun.jsp.JSPParser.writeXML(JSPParser.java:151)
at allaire.jrun.jsp.JSPParser.generateXML(JSPParser.java:123)
at allaire.jrun.jsp.JSPParser.generateXML(JSPParser.java:67)
at allaire.jrun.jsp.JSPServlet.parsePage(JSPServlet.java:409)
at allaire.jrun.jsp.JSPServlet.createServlet(JSPServlet.java:381)
at allaire.jrun.jsp.JSPServlet.loadPage(JSPServlet.java:202)
at allaire.jrun.jsp.JSPServlet.service(JSPServlet.java:169)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java, Compiled Code)
at allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:88)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)
at allaire.jrun.http.WebEndpoint.run(WebEndpoint.java:107)
at allaire.jrun.ThreadPool.run(ThreadPool.java, Compiled Code)
at allaire.jrun.WorkerThread.run(WorkerThread.java, Compiled Code)
___________________________
when i tried to run the same example in TOMCAT i am getting the
error
_____________________________________________________
Error: 500
Location: /hello/jsp/hello1.jsp
Internal Servlet Error:
org.apache.jasper.JasperException: Unable to open taglibrary /hello : Parse Error in the tag library descriptor: Element type "web-app" is not declared.
at org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java, Compiled Code)
at org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingListener.java:116)
at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java, Compiled Code)
at org.apache.jasper.compiler.Parser.parse(Parser.java, Compiled Code)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1038)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1034)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java, Compiled Code)
at org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java:413)
at org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:149)
at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:161)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:868)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java, Compiled Code)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
at java.lang.Thread.run(Thread.java:479)
____________________________________________________
i tried alot to find out my mistake but i couldn't .
please help me
thanks
sumana

William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12806
    
    5
javax.servlet.ServletException: javax.servlet.jsp.tagext.TagData: method
getAttributes()Ljava/util/Enumeration; not found
java.lang.NoSuchMethodError: javax.servlet.jsp.tagext.TagData: method
getAttributes()Ljava/util/Enumeration; not found
This may be related to the second error:
-----------
org.apache.jasper.JasperException: Unable to open taglibrary /hello : Parse Error in the tag library
descriptor: Element type "web-app" is not declared.
That is pretty straightforward, something is wrong with either your web.xml or your taglib tld file.
Bill
Sumana Reddy
Greenhorn

Joined: Oct 28, 2000
Posts: 14
hi bill,
Thanks .
what u said was right.i went through my tld and web.xml again.
i forgot to mention DOCTYPE in web.xml.
my program is working now after correcting the mistake.
Thanks again
Sumana
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP Custom tags