You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Buggy Buggerio <bu...@yahoo.com> on 2007/10/08 01:49:49 UTC

Help noob get JSTL to work on webpage

Hi, I can't get JSTL to work on my webpage.  Here is some info.  Any help is appreicated.

It's a godaddy.com webhost account and this is my classpath:

(This statement is output below):<p>Hello!   <% out.print(System.getProperty("java.class.path")); 

%></p>

/usr/local/java/lib/tools.jar:/web/tomcat/bin/bootstrap.jar:/web/tomcat/bin/commons-logging-api.jar


on the webserver, there is a directory /WEB-INF/jstl/ and in that dir is all the .jars and .tlds 

like
c-rt.tld, c.tld, fmt-rt.tld, fmt.tld, standard.jar, etc... like 16 files in all!

Here is my taglib statement:
<%@ taglib prefix="c" uri="/WEB-INF/jstl/c.tld" %>

This is a line in my web.xml.  I put web.xml in the WEB-INF/ dir of my webhost account.  I have 

tried other dirs too.
  <taglib>
    <taglib-uri>http:/WEB-INF/jstl/core</taglib-uri>
    <taglib-location>/WEB-INF/tlds/c.tld</taglib-location>
  </taglib>

Finally here is the error I get:
org.apache.jasper.JasperException: Failed to load or instantiate TagLibraryValidator class: 

org.apache.taglibs.standard.tlv.JstlCoreTLV

and about half way down the page, it says this, too:
root cause

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

Is this a classpath issue? 






       
____________________________________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/

Re: Help noob get JSTL to work on webpage

Posted by Hassan Schroeder <ha...@gmail.com>.
On 10/7/07, Buggy Buggerio <bu...@yahoo.com> wrote:
> Hi, I can't get JSTL to work on my webpage.  Here is some info.  Any help is appreicated.

It'd be helpful to post the version of Tomcat, version of JDK/JRE, JSTL
and Servlet Spec, but ...

> this is my classpath:

If you're using Tomcat, you shouldn't set any CLASSPATH.

> on the webserver, there is a directory /WEB-INF/jstl/

jstl.jar and standard.jar belong in WEB-INF/lib

> Here is my taglib statement:
> <%@ taglib prefix="c" uri="/WEB-INF/jstl/c.tld" %>

I use the standard recommendation:

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

> This is a line in my web.xml.

You don't need to put anything in web.xml to have these recognized.

> Is this a classpath issue?

I'm not sure where you got the idea to set it up as you have, but if
you put things in the standard places it pretty much just works :-)

FWIW!
-- 
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


RE: Help noob get JSTL to work on webpage

Posted by "Forsberg, Mike" <mi...@amd.com>.
Your taglib-uri looks a little weird.  It should match the uri from the
c.tld file.

Hope I helped alittle,

Big Mike

-----Original Message-----
From: Buggy Buggerio [mailto:bugsrdead@yahoo.com] 
Sent: Sunday, October 07, 2007 6:50 PM
To: taglibs-user@jakarta.apache.org
Subject: Help noob get JSTL to work on webpage

Hi, I can't get JSTL to work on my webpage.  Here is some info.  Any
help is appreicated.

It's a godaddy.com webhost account and this is my classpath:

(This statement is output below):<p>Hello!   <%
out.print(System.getProperty("java.class.path")); 

%></p>

/usr/local/java/lib/tools.jar:/web/tomcat/bin/bootstrap.jar:/web/tomcat/
bin/commons-logging-api.jar


on the webserver, there is a directory /WEB-INF/jstl/ and in that dir is
all the .jars and .tlds 

like
c-rt.tld, c.tld, fmt-rt.tld, fmt.tld, standard.jar, etc... like 16 files
in all!

Here is my taglib statement:
<%@ taglib prefix="c" uri="/WEB-INF/jstl/c.tld" %>

This is a line in my web.xml.  I put web.xml in the WEB-INF/ dir of my
webhost account.  I have 

tried other dirs too.
  <taglib>
    <taglib-uri>http:/WEB-INF/jstl/core</taglib-uri>
    <taglib-location>/WEB-INF/tlds/c.tld</taglib-location>
  </taglib>

Finally here is the error I get:
org.apache.jasper.JasperException: Failed to load or instantiate
TagLibraryValidator class: 

org.apache.taglibs.standard.tlv.JstlCoreTLV

and about half way down the page, it says this, too:
root cause

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

Is this a classpath issue? 






       
________________________________________________________________________
____________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/



---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org