Please browse the categories below to previous answers to questions like yours. If you do not find the answer for your particular situation, ask for help on the appropriate mailing list.
(Answer) (Category) Java Apache Project : (Category) Apache JServ 1.0 : (Category) Configuration :
JServ and JDK1.2 (Java Plattform 2) Configuration Issues

If you want to deploy JServ running under jdk 1.2 (Java Platform 2) you might encounter some troubles with the fact that security is handled far different from the 1.1 versions.

Without an edited java.policy file you might encounter major deadlocks on calling a servlet. This has obviously following reasons:

  • the JServ ClassLoader!
  • The fact that the APJ Protocol runs via a socket and needs to accept connection(s).

    Here is a list of things you should consider in case you want to run JServ on jdk1.2:

    1. set permissions granting reading access to all class files AND properties files you use in any of your servlet zones.
    2. set permissions granting ClassLoader creation
    3. set permissions granting socket listening and accepting rights
    This should be done SECURELY and not by simply granting ALL RIGHTS.

    Following will guide you doing this:

    • The /security/permissions.html
    • The /security/PolicyFiles.html
    • Following example:
    grant codeBase "file:/path/to/ApacheJServ.jar" {        //will grant this rights only to JServ
            
            //FileRead Permissions to class files that should be loaded via
            //the the JServ class loader.
            //(e.g: anything you refered to in any zones repository property).
            //Note:
            //The $quot;/-" means that the permission is granted recursive
            //for anything in the named directory.
            permission java.io.FilePermission "/path/to/classes/or/jars/-", "read";
    
            //FileRead Permissions to .properties files
            permission java.io.FilePermission "/path/to/properties/-", "read";
    
            //FileRead Permissions to any properties loaded by any of your own servlets/classes
            //that are in turn loaded by the JServ ClassLoader.
            //(eg. anything you referred to in any zones repository property)
            permission java.io.FilePermission "/path/to/zone/configdir/.properties" , "read";
    
            
            //....I guess you got somehow.
            
            //ClassLoader creation permission to allow JServ deploying its own
            //ClassLoader.
            permission java.lang.RuntimePermission "createClassLoader";
            
            //Socket listening and accepting permissions
            permission java.net.SocketPermission "*:","connect,accept,listen,resolve";
    };
    
    
    If you add something similar to your systems or users java.policy file the problems should be resolved (more or less secure).

    A note on how to find the system policy file:
    it is obviously by default located at

            /lib/security/java.policy  (Solaris)
            /jre/lib/security/java.policy (Linux JDK1.2 pre-v2 from  Blackdown.org)
            \lib\security\java.policy  (Windows)
    
    I hope that helps to get started, any further permission problems should be resolvable with the help of the jdk1.2.* (Java Platform 2) guide.
    wimpiAToehwwwDOTunileobenDOTacDOTat
  • [Append to This Answer]
    Previous: (Answer) (EMERGENCY) ajp12: ping: no reply
    Next: (Answer) Solaris and JVM using more than 2 CPU's
    This document is: http://java.apache.org/faq/?file=298
    [Search] [Appearance] [Show Expert Edit Commands]
    This is a Faq-O-Matic 2.709.
    Please browse the categories below to previous answers to questions like yours. If you do not find the answer for your particular situation, ask for help on the appropriate mailing list.