Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JSTL problem: Error loading tld

843835Mar 5 2003 — edited Mar 4 2008
Hi Everybody,

I have just added the jstl libraries and tlds to an existing project in WebSphere. This is the 1.0 release version. And I cannot get the c.tld and x.tld to be recognized. I have tried pointing directly to the location (in this case /WEB-INF/c.tld) in the jsp also. And tried the recommended way where I point the uri to "http://java.sun.com/jstl/core" and then point that uri to the location specified above, in the web.xml file. That has not worked either.

I did check that the standard.jar is in the lib folder, apart from jstl.jar and the other jars that come with the distribution.

Here's the jsp file I am using:
<%@ taglib uri="/WEB-INF/c.tld" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jstl/xml" prefix="x"%>
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %>


<tiles:useAttribute name="xmlFile" classname="java.lang.String" />
<tiles:useAttribute name="xslFile" classname="java.lang.String"/>

ERROR ---<c:set var="xml">
<%=xmlFile%>
</c:set>
<%
System.out.println("xmlFile in jsp: "+xmlFile);
%>
<c:set var="xsl">
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:import href='<%=xslFile%>' />

</xsl:stylesheet>

</c:set>

<x:transform xml="${xml}" xslt="${xsl}" >
</x:transform>


And this is the error I get:
JspTranslate: Unable to load class null

I did notice on opencms.com that they had a fix for something similar on Tomcat - but I was not sure about it and plus, a similar change to my code, did not help.

Any help will be highly appreciated.

Thanks,
Radhika
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 1 2008
Added on Mar 5 2003
9 comments
415 views