This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills and have John Sonmez on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes help needed in JSTL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "help needed in JSTL" Watch "help needed in JSTL" New topic
Author

help needed in JSTL

Naresh Chaurasia
Ranch Hand

Joined: May 18, 2005
Posts: 358
Hi,
When i am trying to call sample.jsp with the following code :

sample.jsp
----------

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

hello



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:50)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:378)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:118)
org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:316)
org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:147)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:418)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1539)
org.apache.jasper.compiler.Parser.parse(Parser.java:126)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:220)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:461)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:442)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:430)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:274)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
SCWCD.HFSJ.chap09.Servlet.doGet(Servlet.java:30)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
SCWCD.HFSJ.chap13.LoggerFilter.doFilter(LoggerFilter.java:24)



Can someone tell me how to resolve this error.

thanks in advance.


SCJP 1.4, SCWCD1.4, OCA(1Z0-007)
Sergey Tyulkin
Ranch Hand

Joined: May 10, 2005
Posts: 87
You have 2 options
1) provide appropriate <taglib> element in deployment descriptor
2) or use implicit taglib mapping, provided by the container. Some don't, but most have such feature.
But both of the options require jstl.jar and standard.jar in your application's WEB-INF\lib folder

[ August 23, 2005: Message edited by: Sergey Tyulkin ]
[ August 23, 2005: Message edited by: Sergey Tyulkin ]
Naresh Chaurasia
Ranch Hand

Joined: May 18, 2005
Posts: 358
Hi Sergey,
I have included standard.jar (jstl.jar was already there) and it is now working fine.

Thnx.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: help needed in JSTL