tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bo Xu>
Subject Re: Servlets and relative paths
Date Tue, 29 May 2001 20:46:19 GMT
Chris McNeilly wrote:

> I've got a servlet and am trying to open files.  The problem is that its
> defaulting to the tomcat/bin directory whenever I attempt to refer to
> them.  How can I change this?  Hardcoding the path isn't such a good
> idea as my dev environment is different from production.  These are xml
> and xsl files and they are located on the webroot.
> Thanks,
> Chris

Hi :-)  from several emails in Servlet-List and this List:

* InputStream is = this.getServletContext().


now is in myapp/WEB-INF/

- InputStream is =
- InputStream is = Thread.currentThread().getContextClassLoader().

  now, (normally),  myservlet.conf/ is in

May.29, 2001

View raw message