Path to web application directory
1 posts in topic
Flat View  Flat View

Posted By:   Marcin_Wokolski
Posted On:   Wednesday, August 27, 2003 11:27 PM

How to obtain a system operating path to web application directory from servlet code of this application. I need take a xslt styleshet file from web application directory in Tomcat 4.1.17

Re: Path to web application directory

Posted By:   Anonymous  
Posted On:   Thursday, August 28, 2003 12:05 AM

You should better use the getResource method if your XSL is placed in your web application (is a more portable solution).

On the other hand, if you want to obtain the physical directory you can use the command getServletContext().getRealPath("/"), this works under Tomcat and is going to give you the absolute root directory of your web appliction



About | Sitemap | Contact