Ann,
The only thing I can suggest is that security policy files have an
optional CODEBASE url in them, which says what hosts the
policy file applies to.
>From memory, the policy file goes
grant [url-list ]
{
permission1;
permission2;
}
perhaps if you omit the url list, then the grant
statement only applies to localhost, ie perhaps
you should try something like:
grant http://mytomcathost.hotmail.com
{
permission1;
permission2;
}
to tell the jvm that the permissions apply to
anything downloaded from the specified host.
The jdk's documentation directory contains
information on how java2 policy files work,
including definitions for stuff like this.
Good luck,
Simon
> -----Original Message-----
> From: ann patil [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, October 20, 2000 10:55 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Please Help: Tomcat.policy files (security issue)
>
> Hi,
> The (a) option is what I am trying to do ie. loading an applet from
> tomcat,then trying to use that applet to communicate to some other
> computer for database connection.Yes, I did create a .java.policy
> (security)
> file to grant permission to the applet to connect other
> computer that works fine when I run the applet from appletviewer in
> (jdk1.3)
> but when I run the applet in the browser it gives me it gives
> me 'java.security.AccessControlException:access
> denied(java.net.SocketPermission test resolve)' error in the java plugin
> console.
>
> Maybe you never tried this but, if you have the slightest idea or any
> suggestions that would be appreciated.
>
> Thanks
>
> Ann.
>
>
>
>
>
> >From: Kitching Simon <[EMAIL PROTECTED]>
> >Reply-To: [EMAIL PROTECTED]
> >To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> >Subject: RE: Please Help: Tomcat.policy files (security issue)
> >Date: Thu, 19 Oct 2000 10:59:56 +0200
> >
> >Hi Ann,
> >
> >I didn't quite understand your problem description.
> >
> >I'll have a go at guessing the solution, but if this
> >isn't what you were looking for, you may need to
> >post your question again after rewriting it a bit..
> >
> >I think that you are either:
> >(a) loading an applet from tomcat, then trying
> >to use that applet to communicate to some other
> >computer, or
> >(b) loading an applet from some webserver, then
> >using that applet to talk to a servlet running
> >within tomcat.
> >
> >In either case, special java security permissions
> >will be needed to allow the applet to make
> >the outbound connection (because applets
> >are only allowed to talk to the serving host
> >by default).
> >
> >However, **this is nothing to do with tomcat at all**.
> >
> >The security permissions you need are for the
> >applet, not the webserver. As far as I know (I've
> >never done this) you need to build a jar file for the
> >applet, including a security permissions file that
> >grants permission to create sockets, then sign
> >this jar file.
> >
> >Regards,
> >
> >Simon
> >
> > > -----Original Message-----
> > > From: ann patil [SMTP:[EMAIL PROTECTED]]
> > > Sent: Thursday, October 19, 2000 12:37 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Please Help: Tomcat.policy files (security issue)
> > >
> > > Hi,
> > > I am using Tomcat 1.3 and JDK1.3 on win98.I am developing a web
> > > application using servlets,jsp and applets.In my case I have to make
> the
> > > applet connect to the host other than the one that originates it.I am
> > > using policytool.exe to create the .policy files.I created a
> >.java.policy
> > > file in user.home and granted java.net.SocketPermission.The
> appletviewer
> > > allows my applet to connect to the host other than the one that
> >originates
> > >
> > > it in jdk1.3.But when I run the applet through tomcat
> > > example: http://localhost:8080/abc I get 'java.net.SocketPermission
> test
> > > resolve)' error.I also tried creating Tomcat.policy file with the
> > > permissions and started tomcat with 'startup -security' command but
> the
> > > result was the same.
> > >
> > > Can anybody please help me run this applet through Tomcat.
> > >
> > > How do I tell Tomcat to use the Tomcat.policy file for security check.
> > >
> > > This is very urgent.
> > >
> > >
> > > Thanks
> > >
> > > Ann
> > >
> > >
> >_________________________________________________________________________
> > > Get Your Private, Free E-mail from MSN Hotmail at
> >http://www.hotmail.com.
> > >
> > > Share information about yourself, create your own public profile at
> > > http://profiles.msn.com.
>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
> Share information about yourself, create your own public profile at
> http://profiles.msn.com.