You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kris Kras <KK...@mectrol.com> on 2002/05/07 15:08:46 UTC

Help with hiding resources

Hello all,

I have an application using jsps, servlets and applets runing under Tomcat
4.03 and Struts 1.0 (win2k server).
My application is located under "C:\Tomcat4\webapps\applications\" and all
jsp files are there. Some jsps launch applets through <jsp:plugin> tags.
Applets are packaged in jars located in
"C:\Tomcat4\webapps\applications\jars\". A code fragment launching applets
looks like this:
    <jsp:plugin
      type = "applet"
      code = "myapplet.MyAppletClass.class"
      archive = "jars/myapplet.jar"
      codebase = "."
      ...

When I run the jsp files everything works great and applets launch
correctly.

The problem is that with this directory structure the jar files are visible
and can be downloaded by typing
"http://www.domainmame.com/applications/jars/" or
"http://www.domainmame.com/applications/jars/myapplet.jar" and ultimatelly
decompiled. I would like to hide the resources (jar files and everything
else that is located in subdirectiories of "\applications\". I have tried
putting the jar files in "C:\Tomcat4\webapps\applications\WEB_INF\lib\"
where all other jar files (struts.jar, etc.) are located, but then
regardless of what I used for "archive" and "codebase" parameters in
<jsp:plugin> tag I get and file not found exception in the plugin console
(java.io.FileNotFoundException:
http://www.domainmame.com/applications/WEB-INF/lib/myapplet.jar) even though
the jar file is there.

I have tried setting the following values for "archive" and "codebase"
parameters in <jsp:plugin> tag with the jar file in
"C:\Tomcat4\webapps\applications\WEB_INF\lib\":

      archive = "myapplet.jar"
      codebase = "."

      archive = "/WEB-INF/lib/myapplet.jar"
      codebase = "."

      archive = "myapplet.jar"
      codebase = "/"

      archive = "myapplet.jar"
      codebase = "/applications/WEB-INF/lib/"

None of the combinations worked. Can anyone help me with configuring these
two parameters so the Tomcat can find myapplet.jar.

Or is there a better solution to hiding resources under Tomcat.

Any help would be greatly appreciated.

Thanks

Kris


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