Question:
Is there a tag I need to place in a config file, web.xml file, or somewhere else to allow an applet access to use/find data/class (non-servlet) files in a local (non-ROOT) WEB-INF subdirectory?
Problem:
For non-servlets or servlets that have dependencies on other local classes/files, I am not able to locate files other than servlets specified in the local WEB-INF/web.xml file.
Files found in the webapps/ROOT/WEB-INF/lib and webapps/ROOT/WEB-INF/classes are being found and used by my server. So I am able to make an applet dependant on certain .jar .xml or .class files work if I place those files in the proper subdirectory under ROOT/WEB-INF . The applet will work if files are place in the same base local directory as the applets' .html file, but it will not work when placed in the local WEB-INF subdirectories.
Example: Using: Windows2K Pro. SP3 ; Tomcat 4.1.18 ; Java 2 SDK, SE, 1.4.0
I have a file "arc.war" with a structure as follows: META-INF/ META-INF/MANIFEST.MF Time.html index.html WEB-INF/ WEB-INF/data/Time.xml WEB-INF/lib/ WEB-INF/lib/jcommon-0.8.0.jar WEB-INF/classes/ WEB-INF/classes/connectionServlet.class WEB-INF/classes/arcChart.class WEB-INF/web.xml
I place the .war file into the webapps directory and it expands on startup assuming it hasn't already.
index.html refers to the servlet connectionServlet returning html and having no dependencies. This servlet works.
Time.html containing an applet using archive="jcommon-0.8.0.jar" and code="arcChart"
arcChart.class uses the file Time.xml
The applet gives a java.lang.ClassNotFoundException or FileNotFoundException for the .jar .class and .xml files.
If I move these 3 files to the arc.war base directory or the same subdirectories but using webapps/ROOT as the base directory, the applet works.
From the localhost_log I get messages including:
HostConfig[localhost]: Expanding web application archive arc.war
StandardHost[localhost]: Installing web application at context path /arc from URL file:c:/jakarta-tomcat-4.1.18/webapps/arc
WebappLoader[/arc]: Deploying class repositories to work directory C:\jakarta-tomcat-4.1.18\work\Standalone\localhost\arc
WebappLoader[/arc]: Deploy class files /WEB-INF/classes to c:\jakarta-tomcat-4.1.18\webapps\arc\WEB-INF\classes
WebappLoader[/arc]: Deploy JAR /WEB-INF/lib/jcommon-0.8.0.jar to c:\jakarta-tomcat-4.1.18\webapps\arc\WEB-INF\lib\jcommon-0.8.0.jar
StandardManager[/arc]: Seeding random number generator class java.security.SecureRandom
StandardManager[/arc]: Seeding of random number generator has been completed
StandardWrapper[/arc:default]: Loading container servlet default
StandardWrapper[/arc:invoker]: Loading container servlet invoker
So I know the .jar file is being loaded without any error messages...
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]