You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jo...@ibsplc.com on 2001/11/09 12:45:20 UTC

not readin properties file in tomcat 3.2, getting unsafe path exception

Hi All,

I have following  folder  structuer in Web-inf:

"/Web-inf/conf/umsjsp.properties"

I am attempting to read the "umsjsp.properties" using
SevletContext.getResourceAsStream

the source code:

public void setProperties(javax.servlet.ServletContext application)
throws Exception
    {
        if (properties==null)
        {
            InputStream is = null;
            // read from top of any classpath entry
            is = application.getResourceAsStream
("/Web-inf/conf/umsjsp.properties");
         //application.get
         System.out.println("IN GETPROPERTIES "+is);
            properties = new Properties();
            properties.load(is);
            //System.out.println("IN GETPROPERTIES "+is);
            System.out.println("IN PORP "+properties);
        }
    }

but I am getting an exception and following is printed on the console

"Unsafe path  D:\tomcat\ums /Web-inf/conf/umsjsp.properties"

The same code works perfectly in orion.

Can some one tell me why this is happening and what i should be doing.

I am using Tomcat 3.2 on Winnt machine.

Please help

Regards
John Thomas





--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>