Tomcat, by default, has symbolic links disabled.

-----Original Message-----
From: Peter Flynn [mailto:[EMAIL PROTECTED] 
Sent: 08 July 2003 10:54
To: Tomcat Users List
Subject: Where to put java code


I'm running jakarta-tomcat-4.1.18 for the purpose of serving with
Cocoon, and that's working fine. But I also have a handful of users
who have small .jsp files, most of which are trivial (the files, not
the users :-)...with one exception, which calls on a custom search
bean. This was working fine under the old JServ, but I can't make it
work under jakarta-tomcat. The error messages in all the
localhost_log.YYYY-MM-DD.txt files say:

> 2003-07-07 09:37:01 Error compiling file:
>
/usr/local/tomcat/jakarta-tomcat-4.1.18/work/Standalone/localhost/_/info/eol
as/2002/3_11/search_jsp.java     [javac] Compiling 1 source file
> 
>
/usr/local/tomcat/jakarta-tomcat-4.1.18/work/Standalone/localhost/_/info/eol
as/2002/3_11/search_jsp.java:48: package ie.b2bsoft.eolas does not exist
>       ie.b2bsoft.eolas.SearchBean Search1 = null;
>                       ^

so I've obviously put it in the wrong place, but the
Class Loader HOW-TO at
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html
says:

> For classes and resources specific to a particular web application,
> place unpacked classes and resources under /WEB-INF/classe of your web
> application archive, or place JAR files containing those classes and
> resources under /WEB-INF/lib of your web application archive.

[presumably that should be "classes" in the second line], which is
exactly where I *have* put the unpacked stuff.

This server also runs regular Apache, and the JSP users all have
regular HTML sites under the Apache docroot, so I have softlinked
that docroot to ROOT in my jakarta-tomcat-4.1.18/webapps (yes, I
know it's a horrible thing to do). In that docroot is a WEB-INF 
directory containing the classes subdirectory containing the
unpacked classes thus:

/usr/local/tomcat/jakarta-tomcat-4.1.18/webapps/ROOT/WEB-INF/classes/ie/b2bs
oft/eolas:

drwxrwxr-x    2 root   root     4096 Oct 12  2001 .
drwxrwxr-x    3 root   root     4096 Oct 12  2001 ..
-rw-rw-r--    1 root   root     1976 Oct 12  2001 HParser.class
-rw-rw-r--    1 root   root     1180 Oct 12  2001 HParser.java
-rw-rw-r--    1 root   root     3218 Oct 12  2001 SearchBean.class
-rw-rw-r--    1 root   root     2111 Oct 12  2001 SearchBean.java

The error message refers to a "package" (by which it presumably means
a jar file?) but the classes were supplied unpacked so I typed
jar cf eolas.jar . in the classes directory and moved the eolas.jar
file to the lib directory...still no change.

What have I done wrong? (apart from not being a Java person :-)

///Peter



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

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

Reply via email to