jstl core tag library

B

boanator

I am having trouble using the jstl core tag library. I have used this
library before, but for some reason, it is not working now. I have
downloaded the tag library c.tld. I have placed it in my WEB-INF
directory, but I can not access it.

I can use all of the other tag libraries for struts without a problem.
It's just the c.tld that is giving me the problem.

I can not figure out what the problem is. Could it be the version of
Tomcat I am using? I am using the latest Tomcat 5.5. I cannot figure
this out, and I cannot find any recent posts on this topic.

The following is my web.xml file:
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
...
<taglib>
<taglib-uri>/jstl/c</taglib-uri>
<taglib-location>/WEB-INF/c.tld</taglib-location>
</taglib>
</web-app>

I try to include this tag library with the following line in my JSP
page:
<%@ taglib prefix="c" uri="/jstl/c" %>

Tomcat starts up just fine, but when I try to hit the page I get the
following exception:
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.ClassNotFoundException:
org.apache.taglibs.standard.tlv.JstlCoreTLV
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1332)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)
at
org.apache.jasper.compiler.TagLibraryInfoImpl.createValidator(TagLibraryInfoImpl.java:649)
at
org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:246)
at
org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:162)
at
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:418)
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1543)
at org.apache.jasper.compiler.Parser.parse(Parser.java:126)
at
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
at
org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:604)
at
org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:99)
at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:135)
at
org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:760)
at
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:892)
at
org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
....
 
B

boanator

there is a jar file that I need to include:
jstl-standard.jar

Sorry about this post. Apparently I just like to talk to myself. Or I
just like to hear myself type????

Please ignore this post. I will not post anything else untill I am
sure that I cannot figure the problem out myself.
 
R

Roedy Green

java.lang.ClassNotFoundException:
org.apache.taglibs.standard.tlv.JstlCoreTLV

When push comes to shove that file has to be somewhere on the
classpath.

So either the classpath is wrong, or that class is not on the
classpath. See http://mindprod.com/applets/wassup.html for how to
sniff the system properties including the classpath.


Wearing my Swami hat, the problem is you reinstalled or deleted a
JRE/JDK without remembering refresh the ext dir. You need a bat file
like this to help you keep them up to snuff.

If none of that helps, see http://mindprod.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top