tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donie Kelly <donie.ke...@tecnomen.ie>
Subject RE: FileReader within a Servlet
Date Wed, 24 Apr 2002 13:43:46 GMT
ServletContext sc;
String RootPath=null;
        
        sc = getServletContext();
   	  RootPath = sc.getRealPath("/");

This will get you the path of the $TOMCAT/webapps/yourappdir

Donie




-----Original Message-----
From: Günter Kukies [mailto:Guenter.Kukies@heuft.org]
Sent: April 24, 2002 14:38
To: Tomcat Users List
Subject: FileReader within a Servlet


Hello,

how can I get the path base for a file within a web application? I want to
use a FileReader within a Servlet. 

Günter

 

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message