I'm using jdk1.2.2. Can you give me a sample policy file and other details?
BTW, I could not find this kind of information from Sun's Core Java Web
Server
book. Is there any other references that I can get information from?
Thanks a lot.

-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
Rogatkin, Dmitry M
Sent: Thursday, September 16, 1999 4:36 PM
To: [EMAIL PROTECTED]
Subject: Re: Getting AccessControlException when try to use Sun's XML
package to create an input source from a local file


I use parameter for JWS
-Djava.security.policy=mypolicyfilepath
It works if you use JDK1.3, for JDK 1.2 you should put such file in your
Java home directory. Which version of JDK are you using? I can provide more
details for you.

Dmitry.
----- Original Message -----
From: <Katrina Chiang> <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 16, 1999 3:15 PM
Subject: Re: Getting AccessControlException when try to use Sun's XML
package to create an input source from a local file


> Hi, thanks for the solution. But there are many property files under
> web server, do you know which specific one should I add to ?
> I did found a policy file uner security directory with the contents as
> follows, is it the one that you're talking about? Thanks.
>
>
> // @(#)jserv.policy     1.7 99/06/04
>
> /*
>  * defines the location of the keystore file
>  */
> keystore "file:${user.keystore}", "JKS";
>
> /*
>  * grants permissions for jar files in the lib directory
>  */
> grant codeBase "file:${server.root}/lib/-" {
>   permission java.security.AllPermission;
>   permission java.io.FilePermission "<<ALL FILES>>", "read, write, delete,
> execute";
>   permission java.lang.RuntimePermission "checkRealmAccess";
>   permission java.lang.RuntimePermission "checkServletAccess";
>   permission java.lang.RuntimePermission "checkSetSessionDirectory";
> };
>
> /*
>  * grants permissions for files in the classes directory
>  */
> grant codeBase "file:${server.root}/classes/-" {
>   permission java.security.AllPermission;
>   permission java.io.FilePermission "<<ALL FILES>>", "read, write, delete,
> execute";
>   permission java.lang.RuntimePermission "checkRealmAccess";
>   permission java.lang.RuntimePermission "checkServletAccess";
>   permission java.lang.RuntimePermission "checkSetSessionDirectory";
> };
>
> /*
>  * grants permissions for local servlets (in addition to these properties
>  * local servlets are restricted from calling exitVM)
>  */
> grant codeBase "file:${server.root}/servlets/-" {
>   permission java.lang.RuntimePermission
"accessClassInPackage.sun.net.www";
>   permission java.io.FilePermission "<<ALL FILES>>", "read, write, delete,
> execute";
>   permission java.util.PropertyPermission "*", "read, write";
>   permission java.lang.RuntimePermission "modifyThread";
>   permission java.lang.RuntimePermission "modifyThreadGroup";
>   permission java.lang.RuntimePermission "readFileDescriptor";
>   permission java.lang.RuntimePermission "writeFileDescriptor";
>   permission java.lang.RuntimePermission "loadLibrary.*";
>   permission java.lang.RuntimePermission "queuePrintJob";
>   permission java.net.SocketPermission "*", "accept, connect, listen,
> resolve";
> };
>
> /*
>  * grants permissions for local servletbeans (in addition to these
> properties
>  * local servlets are restricted from calling exitVM)
>  */
> grant codeBase "file:${server.root}/servletbeans/-" {
>   permission java.lang.RuntimePermission
"accessClassInPackage.sun.net.www";
>   permission java.io.FilePermission "<<ALL FILES>>", "read, write, delete,
> execute";
>   permission java.util.PropertyPermission "*", "read, write";
>   permission java.lang.RuntimePermission "modifyThread";
>   permission java.lang.RuntimePermission "modifyThreadGroup";
>   permission java.lang.RuntimePermission "readFileDescriptor";
>   permission java.lang.RuntimePermission "writeFileDescriptor";
>   permission java.lang.RuntimePermission "loadLibrary.*";
>   permission java.lang.RuntimePermission "queuePrintJob";
>   permission java.net.SocketPermission "*", "accept, connect, listen,
> resolve";
> };
>
> /*
>  * grants permissions for generated servlets (in addition to these
> properties
>  * generated servlets are restricted from calling exitVM)
>  */
> grant codeBase "file:${server.root}/tmpdir/-" {
>   permission java.lang.RuntimePermission
"accessClassInPackage.sun.net.www";
>   permission java.io.FilePermission "<<ALL FILES>>", "read, write, delete,
> execute";
>   permission java.util.PropertyPermission "*", "read, write";
>   permission java.lang.RuntimePermission "createClassLoader";
>   permission java.lang.RuntimePermission "modifyThread";
>   permission java.lang.RuntimePermission "modifyThreadGroup";
>   permission java.lang.RuntimePermission "readFileDescriptor";
>   permission java.lang.RuntimePermission "writeFileDescriptor";
>   permission java.lang.RuntimePermission "loadLibrary.*";
>   permission java.lang.RuntimePermission "queuePrintJob";
>   permission java.net.SocketPermission "*", "accept, connect, listen,
> resolve";
> };
>
> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
> Rogatkin, Dmitry M
> Sent: Thursday, September 16, 1999 2:18 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Getting AccessControlException when try to use Sun's XML
> package to create an input source from a local file
>
>
> add to your permision file a new grant like
> grant
>
> .....
>   permission java.util.java.io.FilePermission "*";
> };
>
> Dmitry.
>
> ----- Original Message -----
> From: <Katrina Chiang> <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, September 16, 1999 12:18 PM
> Subject: Getting AccessControlException when try to use Sun's XML package
to
> create an input source from a local file
>
>
> > Hi, I'm using a trial version of JWS 2.0 and wrote a servlet using Sun's
> XML
> > package from XMLProjectX. I tried to create an XML input source by
reading
> a
> > local XML file. The code works fine under Visual Cafe environment(with
> > jdk1.2.2). But once I use JWS 2.0, I kept on getting
> AccessControlException
> > errors as follows. Can somebody help me with this? Thanks
> > javawebserver: java.security.AccessControlException: access denied (ja
> > va.io.FilePermission d:\java\webserver\public_html\xml\pipeBitCount.xm l
> > read) javawebserver: at
> >
>
a.security.AccessControlContext.checkPermission( AccessControlContext.java
> > , Compiled Code) javawebserver: at
> > java.security.AccessController.checkPermission(Acce ssController.java,
> > Compiled Code) javawebserver: at
> > java.lang.SecurityManager.checkPermission(SecurityM anager.java,
Compiled
> > Code) javawebserver: at
> java.lang.SecurityManager.checkRead(SecurityManager
> > .java, Compiled Code) javawebserver: at
> > java.io.FileInputStream.<init>(FileInputStream.java :65) javawebserver:
at
> > java.io.FileInputStream.<init>(FileInputStream.java :99) javawebserver:
at
> > com.sun.xml.parser.Resolver.createInputSource(Resol ver.java:273)
> > javawebserver: at com.lucent.qna.servlet.xml.XMLFile.<init>(XMLFile.j
> > ava:47)
> >
> >
> >
> > ============================
> > Katrina Chiang
> > Member of Technical Staff
> > Bell Labs, Lucent Technologies
> >
> > [EMAIL PROTECTED]
> > (650)565-7664
> > 3180 Porter Drive
> > Palo Alto, CA
> >
> >
>
___________________________________________________________________________
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources: http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> >
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to