You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by wolverine my <wo...@gmail.com> on 2006/06/10 20:59:08 UTC

Applet configuration in catalina.policy

Hi!

I'm trying to deploy a web application which also contain an applet.

Here are the files,

  webapp/dummyapp/index.html
  webapp/dummyapp/WEB-INF/classes/DummyApplet.class
  webapp/dummyapp/WEB-INF/lib/commons-collections.jar


assuming that index.html will load the Java applet DummyApplet and
that DummyApplet uses some classes in commons-collections.jar. In
order for the applet to access the resource, should we create the
following grant entries into the catalina.policy?

  grant codeBase "file:${catalina.home}/webapps/dummyapp/-" {
    permission java.security.AllPermission;
  };

  grant codeBase "file:${catalina.home}/webapps/dummyapp/WEB-INF/classes/-" {
    permission java.security.AllPermission;
  };

  grant codeBase
"jar:file:${catalina.home}/webapps/dummyapp/WEB-INF/lib/commons-collections.jar!/-"
{
    permission java.security.AllPermission;
  };

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Applet configuration in catalina.policy

Posted by Richard Mixon <rn...@qwest.net>.
I do not believe that files under the WEB-INF directory can be directly
referred to by the browser. You applet class (usually it is served as a .jar
file) must not be under WEB-INF. Maybe the catalina.policy file can change
this - but I don't think so.

-----Original Message-----
From: wolverine my [mailto:wolverine.my@gmail.com] 
Sent: Saturday, June 10, 2006 11:59 AM
To: users@tomcat.apache.org
Subject: Applet configuration in catalina.policy

Hi!

I'm trying to deploy a web application which also contain an applet.

Here are the files,

  webapp/dummyapp/index.html
  webapp/dummyapp/WEB-INF/classes/DummyApplet.class
  webapp/dummyapp/WEB-INF/lib/commons-collections.jar


assuming that index.html will load the Java applet DummyApplet and that
DummyApplet uses some classes in commons-collections.jar. In order for the
applet to access the resource, should we create the following grant entries
into the catalina.policy?

  grant codeBase "file:${catalina.home}/webapps/dummyapp/-" {
    permission java.security.AllPermission;
  };

  grant codeBase "file:${catalina.home}/webapps/dummyapp/WEB-INF/classes/-"
{
    permission java.security.AllPermission;
  };

  grant codeBase
"jar:file:${catalina.home}/webapps/dummyapp/WEB-INF/lib/commons-collections.
jar!/-"
{
    permission java.security.AllPermission;
  };

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org