wood burning stoves*
The moose likes JSP and the fly likes jstl problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "jstl problem" Watch "jstl problem" New topic
Author

jstl problem

Rubel Ahammad
Greenhorn

Joined: Feb 05, 2005
Posts: 19
i have tomcat 4.1 installed in my system. when i try to run my index page i find the following error. can anybody explain how to use jstl in tomcat.


HTTP Status 500 -

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

type Exception report

message

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

exception

org.apache.jasper.JasperException: This absolute uri (http://java.sun.com/jsp/jstl/core) cannot be resolved in either web.xml or the jar files deployed with this application
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:60)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:385)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:109)
at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:116)
at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:309)
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:336)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:750)
at org.apache.jasper.compiler.Parser.parse(Parser.java:77)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:157)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:111)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:183)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:427)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)


rubel ahammad<br /> <br />SCJP 1.4 (91%)<br />SCWCD 1.4 (Preparing)
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Oops, sorry about the bad reply.

As Bear Bibeault said, do not extract c.tld
It is already in standard.jar.
So just put standard.jar and jstl.jar in your lib directory.
[ January 03, 2006: Message edited by: Satou kurinosuke ]

[My Blog]
All roads lead to JavaRanch
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

Actually, do not extract the tld file and put it anywhere. You should put the jar files for the JSTL (there are two: standard.jar and jstl.jar) in WEB-INF/lib.

Be sure that you download and use the correct version of JSTL for your container. For Tomcat 4 you should be using JSTL 1.0. However, your message indicates that you are using JSTL 1.1 which should only be used with Tomcat 5.

The JSP FAQ has an entry with more infor on downloads and URIs for the appropriate versions.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Rubel Ahammad
Greenhorn

Joined: Feb 05, 2005
Posts: 19
dear friends,
i followed the instruction given below. but now the error message added at the end of the message.
1. Download JSTL distribution file at http://jakarta.apache.org/site/downloads/downloads_taglibs-standard.cgi

2. Unzip the distribution file.

3. Copy the following 2 files to your project's WEB-INF/lib/ folder:

jstl.jar
standard.jar
4. Copy all JSTL TLD files your project's WEB-INF/ folder:

5. Modify your project's web.xml file to include the TLD files. Add a <taglib> directive inside the main <web-app> directive for each of the tag libraries that you want to use. Here are the list of entries that might be added:

<taglib>
<taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>
<taglib-location>/WEB-INF/fmt.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>http://java.sun.com/jstl/fmt-rt</taglib-uri>
<taglib-location>/WEB-INF/fmt-1_0-rt.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
<taglib-location>/WEB-INF/c.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>http://java.sun.com/jstl/core-rt</taglib-uri>
<taglib-location>/WEB-INF/c-1_0-rt.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>http://java.sun.com/jstl/sql</taglib-uri>
<taglib-location>/WEB-INF/sql.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>http://java.sun.com/jstl/sql-rt</taglib-uri>
<taglib-location>/WEB-INF/sql-1_0-rt.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>http://java.sun.com/jstl/x</taglib-uri>
<taglib-location>/WEB-INF/x.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>http://java.sun.com/jstl/x-rt</taglib-uri>
<taglib-location>/WEB-INF/x-1_0-rt.tld</taglib-location>
</taglib>

6. You are now ready to taglibs in your JSP pages. Use the <%@ taglib %> directive to include the tag library that you want to use in your JSP pages. For example, to use the core tab library, add the following line at the beginning of your JSP pages:

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

7. Build your project. If you use Eclipse, you might have to refresh your project before building it so that Eclipse will pick up all the new JAR and TLD files that we've just added in. If you use ant, make sure you have the following 2 files in your classpath:

standard.jar
jstl.jar

********************************************************************

HTTP Status 404 - /hello1/index.jsp

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

type Status report

message /hello1/index.jsp

description The requested resource (/hello1/index.jsp) is not available.


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

Apache Tomcat/4.1.31


***************************************************************
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jstl problem
 
Similar Threads
Is uri a mandatory attribute ?
JSTL killing me
jstl with jsp uri: http://java.sun.com//jsp/jstl/core cannot be resolved
catching NoClassDefFoundError
struts 1.1 application error under tomcat 4.1