This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes Sturts-taglib doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Sturts-taglib doubt" Watch "Sturts-taglib doubt" New topic
Author

Sturts-taglib doubt

sudha javvadi
Ranch Hand

Joined: Mar 23, 2007
Posts: 97
Hi all,

I am getting the following error. Please help.
org.apache.jasper.JasperException: File "/WEB-INF/lib/struts-html.tld" not found
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:160)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:420)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:476)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1426)
org.apache.jasper.compiler.Parser.parse(Parser.java:133)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:167)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


note The full stack trace of the root cause is available in the Apache Tomcat/6.0.14 logs.


--------------------------------------------------------------------------------

Apache Tomcat/6.0.14

Thanks,
sudha.
Doug Slattery
Ranch Hand

Joined: Sep 15, 2007
Posts: 294
Hi Sudha,

More than likely, one of your jsp's has its taglib set incorrectly. It's probably something like:
.
Newer versions of struts have the tld's in the jar file and can be specified as follows:


I'd start by searching all the jsp's for "struts-html.tld" and go from there.

Hope that helps...
Aloha,
Doug

-- Nothing is impossible if I'mPossible
sudha javvadi
Ranch Hand

Joined: Mar 23, 2007
Posts: 97
Hi Doug,

I tried the way you told.Now I am gettting the error as follows

org.apache.jasper.JasperException: The absolute uri: http://jakarta.apache.org/struts/tags-html-el cannot be resolved in either web.xml or the jar files deployed with this application
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:315)
org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:148)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:420)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:476)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1426)
org.apache.jasper.compiler.Parser.parse(Parser.java:133)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:167)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

Do we need to change the web.xml file ? I am working on struts 1.3.8 ,Eclipse IDE,Tomcat 6 server

Thanks in advance,
sudha.
Stevi Deter
Ranch Hand

Joined: Mar 22, 2008
Posts: 265

Sudha,

There was a typo in Doug's reply.

In Struts 1.3.8, you should be using:


to access the Struts HTML Taglib. The jakarta.apache.org uris are deprecated and removed.

Be sure you're deploying the struts-taglib-1.3.x.jar, which includes the taglib classes and the TLDs.

You do not need to configure the TLDs in the web.xml; they are included in the jar files, and Servlet 2.3+ will be able to find them.

see this configuration guide for more details.


There will always be people who are ahead of the curve, and people who are behind the curve. But knowledge moves the curve. --Bill James
Doug Slattery
Ranch Hand

Joined: Sep 15, 2007
Posts: 294
Thanks Stevi,

I should be slapped with a wet red herring .

Aloha,
Doug

-- Nothing is impossible if I'mPossible
sudha javvadi
Ranch Hand

Joined: Mar 23, 2007
Posts: 97
Thank you so much Stevi & Doug. It worked.

sudha.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Sturts-taglib doubt
 
Similar Threads
JSTL not working
Mystery Exception: Failed to load or instantiate TagLibraryValidator class
server encountered an internal error ()
HTTP error 500 in tomcat
class not found IterateTei