You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Larry Isaacs <La...@sas.com> on 2001/11/09 15:22:20 UTC

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

For security reasons, paths are case sensitive, even on Windows
systems.  Try "/WEB-INF/conf/umsjsp.properties".

Larry

> -----Original Message-----
> From: JohnT@ibsplc.com [mailto:JohnT@ibsplc.com]
> Sent: Friday, November 09, 2001 6:45 AM
> To: tomcat-user@jakarta.apache.org
> Subject: 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>
> 

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