If I run on JDev embebbed server, the code below return the path right, like /d:/jdev/apps/ myapp/WEB-INF/

But when I deploy the app on sun app server, the path returned is virtual, or wrong, I do not know. The path returned is
/server/myapp/WEB-INF/

I think there are a thing wrong inside the file server.policy.
The permissions on server.policy file in sun app server is the below:


// Basic set of required permissions granted to all remaining code
grant {
    permission java.lang.RuntimePermission  "loadLibrary.*";
    permission java.lang.RuntimePermission  "queuePrintJob";
    permission java.net.SocketPermission    "*", "connect";
    permission java.io.FilePermission        "<<ALL FILES>>", "read,write,delete";

    //ADF   
    permission java.net.NetPermission "specifyStreamHandler";

        // work-around for pointbase bug 4864405     
        permission java.io.FilePermission "${com.sun.aas.instanceRoot}${/}lib${/}databases${/}-", "delete";
        permission java.io.FilePermission "${java.io.tmpdir}${/}-", "delete";

    permission java.util.PropertyPermission "*", "read";

    permission java.lang.RuntimePermission    "modifyThreadGroup";
};

And the code to return the path is below:

 public static String getWebInfPath() throws IOException {               
        String temp = FacesContext.getCurrentInstance().
                getExternalContext().getResource("/WEB-INF/").getPath();    
        System.out.println("FOLDER WEB-INF IS HERE => "  + temp);
        return temp;
    }

Thanks!

----------
Dudu
GoogleTalk: eduardopichler[at]gmail[dot]com
skype:eduardopichler

Reply via email to