Hi Kris, the jar that contains the applet and related classes *must* be
accessible by the browser. If not the browser could not load it and extract
the applet (throwing the java.io.FileNotFoundException).


-----Messaggio originale-----
Da: Kris Kras [mailto:[EMAIL PROTECTED]]
Inviato: marted́ 7 maggio 2002 15.09
A: [EMAIL PROTECTED]
Oggetto: 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:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



- Disclaimer -
This email and any attachments thereto may contain information which is
confidential and/or protected by intellectual property rights and are
intended for the sole use of the recipient(s) named above. Any use of the
information contained herein (including, but not limited to, total or
partial reproduction, communication or distribution in any form) or the
taking of any action in reliance on the contents, by persons other than the
designated recipient(s) is strictly prohibited.

If you have received this email in error, please notify the sender either by
telephone or by email and delete the material from any computer.

Thank you for your cooperation. 



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

Reply via email to