• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

JSP Custom tags

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Always! Wait. Never. Shut up. Look at this tiny ad.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic