Hi all!

I'm really going nuts with the JSTL installation... I only want to use the core tag lib.

I really did everything as described:

1. Download the current version jakarta-taglibs-standard-current.zip
from here: http://www.apache.org/dist/jakarta/taglibs/standard/

2. Unzip anywhere.

3. Copy the c.tld tag library desciptor to <mywebapp>/web/WEB-INF

4. Copy the jstl.jar and standard.jar to <mywebapp>/web/WEB-INF/lib

Please note that I'm using Ant to build my application war file like this:

<target name="dist" depends="compile,manifest" description="Create WAR">
<war destfile="${dist.file}" webxml="${webxml.file}" manifest="${manifest.file}">
<classes dir="${build.dir}"/>
<lib dir="${lib.dir}" includes="*.jar"/>
<fileset dir="${web.dir}" excludes="WEB-INF/web.xml"/>
</war>
<!--unwar src="${dist.file}" dest="${dist.dir}"/-->
</target>


This makes sure, that files and dirs in the web dir end up in the root in the WAR file. I can verify this with the outcommented unwar task.

5. Leave away any web.xml entries, since I'm using Tomcat 4.1.24.

6. Place <%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %> before the <html> tag in each JSP file wanting to access JSTL.

However: IT DOES NOT WORK AT ALL...

I get the following exception:


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/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:105)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:430)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:154)
at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:159)
at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:354)
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:381)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:795)
at org.apache.jasper.compiler.Parser.parse(Parser.java:122)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:199)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:153)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:227)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:536)


Apache Tomcat/4.1.24


Looks like the server can't find the tag library... can't resolve the URI. This is really bad. I sat all night for nothing, it's almost 6 AM and I'm totally stuck on this.


Where does the parser look for this URI? In the c.tld? Well, as I said I'm using Ant, plus the new install, uninstall, deploy etc. tasks. I realized that when using install, the c.tld is not expanded to the server web app /WEB-INF dir, although it is in the WAR file. Copying the c.tld to there manually unfortunately doesn't have any effect.

Can anyone help??? I'd really like to use JSTL, Java code in JSP's is not that great...

Thanks!
Karsten

PS: Struts?


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to