You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Gu...@porsche.de on 2002/09/23 17:47:34 UTC

Tomcat 4.1.10 - JSP Compile Error

Hi,
I have installed Tomcat 4.1.10 on C:\Tomcat41. I have an application which
is on d:\appdir\wws2Java.
The CATALINA_HOME is set to C:\Tomcat41
CATALINA_BASE is not set.

I set the context Section in server.xml as follows:
        <!Context path="/wws2Java"
                 docBase="d:\appdir\wws2Java"
                 crossContext="true"
                 debug="2"
                 reloadable="true">
        <!/Context>

All the files which belongs to the application reside in the wws2Java directory.
The subdir structure is the same as in the standard webapps directory.
(WEB-INF, classes and so on).
Under Tomcat 3.2 this works perfectly.
Now under Tomcat the compilation of the JSP fails because the compiler
cannot find the imported packages of my application. This seems to happen
because Tomcat 4 is no longer using the information of the classpath environment
setting.
I read the documentation and searched the web to find out how I can convince
Tomcat that my classes are also to be found under the docbase directory.

In the classloader HowTo I found the following:

/WEB-INF/classes of your web application
/WEB-INF/lib/*.jar of your web application
Bootstrap classes of your JVM
System class loader classses (described above)
$CATALINA_HOME/common/classes
$CATALINA_HOME/common/endorsed/*.jar
$CATALINA_HOME/common/lib/*.jar
$CATALINA_HOME/shared/classes
$CATALINA_HOME/shared/lib/*.jar

>From this I would expect that my WEB-INF/classes directory will be searched first.

BTW - If I copy my wws2Java directory to the tomcat webapps directory on c-drive
everything works - except for the following error:

Generated servlet error:
    [javac] Compiling 1 source file
C:\Tomcat41\work\Standalone\localhost\wws2Java\index_jsp.java:42: jspDestroy()
is already defined in org.apache.jsp.index_jsp  public void jspDestroy() { ...

What do I have to do, that the compiler finds the classes ?

And - not my major problem - why is it no longer possible to have a own jspDestroy
implementation

TIA and best regards,
Gunter






--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat 4.1.10 - JSP Compile Error

Posted by Sven Hoffmann <sv...@freenet.de>.
Hi,
I've a similar problem with tomcat 4.1.10. I've stored all my JSP's in
%Tomcat_Home%/webapps/ and the class-files (which belong to the package
"tracking") in %TOMCAT_Home%/webapps/Web-inf/classes/tracking. When Tomcat
tries to compile a JSP that wants to use a Java class I get the following
error:
    cannot resolve symbol
    symbol  : class TestBean
    location: package tracking
    import tracking.TestBean;
            .......

In the mailing list I got the hint that this could be a bug in version
4.1.10 when it isn't installed on drive C: and that I should install it on
that drive or switch to version 4.1.11. So I installed version 4.1.11 in
directory "C:\Programme\Apache\Tomcat_4.1.11" but I already got the same
error. Because of that I think that your error isn't caused by the fact that
you haven't stored your web application under %TOMCAT_Home%/webapps/...

If you have a solution for your problem please let me know!
Thanks in advance!

Bye
Sven.



> Hi,
> I have installed Tomcat 4.1.10 on C:\Tomcat41. I have an application which
> is on d:\appdir\wws2Java.
> The CATALINA_HOME is set to C:\Tomcat41
> CATALINA_BASE is not set.
>
> I set the context Section in server.xml as follows:
>         <!Context path="/wws2Java"
>                  docBase="d:\appdir\wws2Java"
>                  crossContext="true"
>                  debug="2"
>                  reloadable="true">
>         <!/Context>
>
> All the files which belongs to the application reside in the wws2Java
directory.
> The subdir structure is the same as in the standard webapps directory.
> (WEB-INF, classes and so on).
> Under Tomcat 3.2 this works perfectly.
> Now under Tomcat the compilation of the JSP fails because the compiler
> cannot find the imported packages of my application. This seems to happen
> because Tomcat 4 is no longer using the information of the classpath
environment
> setting.
> I read the documentation and searched the web to find out how I can
convince
> Tomcat that my classes are also to be found under the docbase directory.
>
> In the classloader HowTo I found the following:
>
> /WEB-INF/classes of your web application
> /WEB-INF/lib/*.jar of your web application
> Bootstrap classes of your JVM
> System class loader classses (described above)
> $CATALINA_HOME/common/classes
> $CATALINA_HOME/common/endorsed/*.jar
> $CATALINA_HOME/common/lib/*.jar
> $CATALINA_HOME/shared/classes
> $CATALINA_HOME/shared/lib/*.jar
>
> From this I would expect that my WEB-INF/classes directory will be
searched first.
>
> BTW - If I copy my wws2Java directory to the tomcat webapps directory on
c-drive
> everything works - except for the following error:
>
> Generated servlet error:
>     [javac] Compiling 1 source file
> C:\Tomcat41\work\Standalone\localhost\wws2Java\index_jsp.java:42:
jspDestroy()
> is already defined in org.apache.jsp.index_jsp  public void jspDestroy()
{ ...
>
> What do I have to do, that the compiler finds the classes ?
>
> And - not my major problem - why is it no longer possible to have a own
jspDestroy
> implementation
>
> TIA and best regards,
> Gunter
>
>
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>