wood burning stoves*
The moose likes JSP and the fly likes jstl error in struts 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 » Java » JSP
Bookmark "jstl error in struts" Watch "jstl error in struts" New topic
Author

jstl error in struts

krishna prasad gunasekaran
Ranch Hand

Joined: Jul 25, 2006
Posts: 158
this is the error,

javax.servlet.ServletException: org.apache.jasper.JasperException: org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:459)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause

org.apache.jasper.JasperException: org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:565)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:354)
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)
org.apache.struts.chain.commands.servlet.PerformForward.handleAsForward(PerformForward.java:99)
org.apache.struts.chain.commands.servlet.PerformForward.perform(PerformForward.java:82)
org.apache.struts.chain.commands.AbstractPerformForward.execute(AbstractPerformForward.java:51)
org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:280)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:459)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause

org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core 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:408)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:115)
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:215)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:102)
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:314)
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)
org.apache.struts.chain.commands.servlet.PerformForward.handleAsForward(PerformForward.java:99)
org.apache.struts.chain.commands.servlet.PerformForward.perform(PerformForward.java:82)
org.apache.struts.chain.commands.AbstractPerformForward.execute(AbstractPerformForward.java:51)
org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:280)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:459)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


After this error had occured, i have included a copy of jstl-1.0.2 that comes with struts, in my application's library and in tomcat's library,but still the problem persists. what should i do?


have a great day,
krishna prasad
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
The URL you're using doesn't match the version of JSTL that you're using. For more information on which one to use for which version, see thils link which can be found in the JavaRanch JSP FAQ.

Since this has nothing to do with Struts, I'm moving this to the JSP forum.


Merrill
Consultant, Sima Solutions
bala nannaka
Ranch Hand

Joined: Apr 02, 2007
Posts: 49
Just Keep the appropriate tld file in web.xml
with specified class that is pointed by taglib uri either in classes or lib if it is a jar or war
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60794
    
  65

Originally posted by bala nannaka:
Just Keep the appropriate tld file in web.xml


Not correct. There is no need for any declaration in web.xml in order to use the JSTL.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by zh ro:


No, you need.
Add taglib to web.xml like this:
<taglib><taglib-uri>/WEB-INF/XX.tld</taglib-uri><taglib-location>/WEB-INF/tld/XX.tld</taglib-location></taglib>



No, you do not need to place the declaration in web.xml
I've been using JSTL for over a year now and have never put a declaration in my web.xml file and my apps are working just fine.
[ April 05, 2007: Message edited by: Ben Souther ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

"zh ro",
Welcome to JavaRanch!

We're pleased to have you here with us in the JSP forum, but there
are a few rules that need to be followed, and one is that proper names are
required. Please take a look at the
JavaRanch Naming Policy and
adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

You can change it here
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: jstl error in struts
 
Similar Threads
Jboss 6 + Jsp +Struts
Getting Problem in display tag with struts
JSP tags (JSTL) and request Attributes
Cannot find bean under name ptype
ServletException: UnhandledException