Then your out of luck. The java from a JSP page is always placed into a package. Becuase of this, you can't have packageless classes.

You alternative is to hack jasper to not use the package statement but doing so will be harder than fixing your code.



-Tim

Worley Brent - bworle wrote:

Someone told you to put JspXslt.class in a package, IIRC.  I think
that's the problem.  Repackage the jar if you have to, for testing
purposes, and change the TLD to refer to the class by whatever package
you put it in, e.g. com.foo.bar.JspXslt.


The problem is the files in Xslt.jar are not our code.  We obtained that
code from somewhere else.  I asked one of the guys around the project when
development started.  He said that he thought it came from Xalan (which I
learned later it did not, or it came from a very, very old version that I'm
unfamiliar with).  Regardless, I have no access to the code to specify it to
a package.

Brent

-----Original Message-----
From: Worley Brent - bworle [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 16, 2004 1:32 PM
To: 'Tomcat Users List'
Subject: Second Try: Can anyone explain this?

I posted this earlier and received a few leads on what to do, but

nothing

worked.  I'm hoping a second look and explanation will help.

The page that is causing the error (search.jsp) uses a taglib to load
xslt.tld (<%@ taglib prefix="acx" uri="WEB-INF/tld/xslt.tld" %>).  The

.tld

file defines a tag named xslt that uses a class named JspXslt. JspXslt

is

located in WEB-INF/lib/Xslt.jar.

So here are my questions:

1.  Is anyone familiar with a standard Xslt.jar file that contains the
JspXslt.class object?
2.  Why would Tomcat not find JspXslt.class?

I've included the xml from the .tld file and the errors below.

<taglib>
<tlibversion>0.0</tlibversion>
<jspversion>1.0</jspversion>
<shortname>acx</shortname>
<tag>
  <name>xslt</name>
  <tagclass>JspXslt</tagclass>
  <bodycontent>jsp</bodycontent>
  <attribute>
    <name>xml</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
  </attribute>
  <attribute>
    <name>xslt</name>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
  </attribute>
  <attribute>
    <name>nobreak</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
  </attribute>
</tag>
</taglib>

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 55 in the jsp file: /search.jsp

Generated servlet error:
  [javac] Compiling 1 source file

/usr/local/jakarta-tomcat-
5.0.24/work/Catalina/localhost/SIT/org/apache/jsp/
search_jsp.java:295: cannot resolve symbol
symbol  : class JspXslt
location: class org.apache.jsp.search_jsp
    JspXslt _jspx_th_acx_xslt_0 = (JspXslt)
_jspx_tagPool_acx_xslt_xslt_xml.get(JspXslt.class);
    ^



An error occurred at line: 55 in the jsp file: /search.jsp

Generated servlet error:
/usr/local/jakarta-tomcat-
5.0.24/work/Catalina/localhost/SIT/org/apache/jsp/
search_jsp.java:295: cannot resolve symbol
symbol  : class JspXslt
location: class org.apache.jsp.search_jsp
    JspXslt _jspx_th_acx_xslt_0 = (JspXslt)
_jspx_tagPool_acx_xslt_xslt_xml.get(JspXslt.class);
                                   ^



An error occurred at line: 55 in the jsp file: /search.jsp

Generated servlet error:
/usr/local/jakarta-tomcat-
5.0.24/work/Catalina/localhost/SIT/org/apache/jsp/
search_jsp.java:295: cannot resolve symbol
symbol  : class JspXslt
location: class org.apache.jsp.search_jsp
    JspXslt _jspx_th_acx_xslt_0 = (JspXslt)
_jspx_tagPool_acx_xslt_xslt_xml.get(JspXslt.class);

^
Note:
/usr/local/jakarta-tomcat-
5.0.24/work/Catalina/localhost/SIT/org/apache/jsp/
search_jsp.java uses or overrides a deprecated API.
Note: Recompile with -deprecation for details.
3 errors


at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorH

andl


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



Reply via email to