aspose file tools*
The moose likes JSP and the fly likes Problem in JSTL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Problem in JSTL" Watch "Problem in JSTL" New topic
Author

Problem in JSTL

sachin yadav
Ranch Hand

Joined: Nov 24, 2005
Posts: 156
i am using JSTL in my application and running it on tomcat server. On the very first page i.e. index.jsp i am getting following error

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

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:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

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:50)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:114)
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:423)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:492)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1552)
org.apache.jasper.compiler.Parser.parse(Parser.java:126)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:155)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

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


i have included jar as well as tld files in Tomcat 5.5\common\lib as well as in application's WEB-INF\lib folder.

Still no luck, what might be the reason.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61658
    
  67

Originally posted by sachin yadav:
i have included jar as well as tld files in Tomcat 5.5\common\lib as well as in application's WEB-INF\lib folder.


Did you include both jar files? See the JSP FAQ if not.

Also, what tld files? The tld files for the JSTL are part of the jars and you should not be placing any separated tld files anywhere.
[ September 22, 2006: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

You need jstl.jar and standard.jar to be present in your WEB-INF\lib folder. You dont have to copy a seperate tld file anywhere to get jstl to work.


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
sachin yadav
Ranch Hand

Joined: Nov 24, 2005
Posts: 156
thanks for your reply, it'sd amazing taht i did as you all have suggested but finally the problem is solved when i used

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

in place of

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
sachin yadav
Ranch Hand

Joined: Nov 24, 2005
Posts: 156
A new problem guys, i am getting the following error when i run my another page on tomcat :



Page code is :



it's using spring framework.
sachin yadav
Ranch Hand

Joined: Nov 24, 2005
Posts: 156
Sorry guys, i found the proble :

i typed ----

<%@ uri="/spring" taglib prefix="spring" %>
<%@ uri="http://java.sun.com/jstl/fmt" taglib prefix="fmt"%>

in place of --

<%@ taglib uri="/spring" prefix="spring" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>


sorry for boathering you all with my silly looking mistake.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in JSTL