when i have run this the output is only "we wellcome" what is going wrong in my code.
Mike Ottinger
Ranch Hand
Joined: Jan 11, 2002
Posts: 125
posted
0
Hi Sunny, first off what container are you using. I found out the hard way JRun4 doesn't support jstl, at least easily anyways. Make sure your web.xml's web-app element has the following:
<display-name>Welcome to Tomcat</display-name> <description> Welcome to Tomcat </description>
is it rigth? if rigth where i am wrong?
Sree Nivas
Ranch Hand
Joined: Jul 24, 2003
Posts: 95
posted
0
Hi,
Same problem for me also. I'm trying to execute a JSTL program of HF Servlets and JSP book (Page: 437). This is <c:forEach> JSTL. As mentioned in the book, I have copied standard.jar and jstl.jar to my app WEB-INF/lib folder and I'm using jakarta-tomcat-5.0.12 and web.xml contains <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd" version="2.4"> also. I'm getting the following error. 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:94) org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:404) org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:154) org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:363) org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:190) org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:460) org.apache.jasper.compiler.Parser.parseDirective(Parser.java:525) org.apache.jasper.compiler.Parser.parseElements(Parser.java:1625) org.apache.jasper.compiler.Parser.parse(Parser.java:173) org.apache.jasper.compiler.ParserController.parse(ParserController.java:247) org.apache.jasper.compiler.ParserController.parse(ParserController.java:149) org.apache.jasper.compiler.ParserController.parse(ParserController.java:135) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:243) org.apache.jasper.compiler.Compiler.compile(Compiler.java:451) org.apache.jasper.compiler.Compiler.compile(Compiler.java:437) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:555) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
What could be the wrong here. I also set classpath to these two jar file in setclasspath.bat file and at dos prompt, but no use.
I'm now preparing for SCWCD and structed here. Request somebody to clarify this.
regards Sreenivas
Jeroen Wenting
Ranch Hand
Joined: Oct 12, 2000
Posts: 5093
posted
0
did you place the TLD for your JSTL implementation in the correct location (meaning next to web.xml).
And do NOT put a reference to JSTL in your web.xml
42
Sree Nivas
Ranch Hand
Joined: Jul 24, 2003
Posts: 95
posted
0
Actually, one shouldn't have to do that.
The tld files are present in the standard.jar file and should be automatically picked up by Tomcat if the jar is in the classpath.
AND I think I have not correctly picked up the jar files for JSTL 1.1. I opened these jar file and found the uri is: http://java.sun.com/jstl/core which is 1.0 jstl.
BTW where can I download JSTL1.1 jar files?
Jeroen Wenting
Ranch Hand
Joined: Oct 12, 2000
Posts: 5093
posted
0
you're right. Was confused with our own custom taglib
The Jakarta JSTL implementation is on their website. You indeed have to be careful which you get, but the version number is part of the filename of the archive.
sunny van
Greenhorn
Joined: Jan 16, 2005
Posts: 5
posted
0
hi my problem is getting bigger,the following error is showing after running my application.i do not no where i went wrong.
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
jyothi sanka
Ranch Hand
Joined: Aug 27, 2001
Posts: 39
posted
0
hi,if you write taglib dirctive like this <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> for Tomcat 5. It works fine. but I don't know the difference with _rt or without _rt.