RE: FileReader within a Servlet

2002-04-24 Thread Douglas, Rory

use the getRealPath(<>) method of the
ServletContext and use that in your File constructor

-Original Message-
From: Günter Kukies [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 9:38 AM
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

 



Re: FileReader within a Servlet

2002-04-24 Thread Günter Kukies

Thank's that's it.

Günter


- Original Message -
From: "Donie Kelly" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Wednesday, April 24, 2002 3:43 PM
Subject: RE: FileReader within a Servlet


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:[EMAIL PROTECTED]]
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:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




RE: FileReader within a Servlet

2002-04-24 Thread Donie Kelly

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:[EMAIL PROTECTED]]
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:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Re: FileReader within a Servlet

2002-04-24 Thread Mike McGuinness

System.getProperties(user.dir)

On Wed, 2002-04-24 at 09:38, Günter Kukies wrote:

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

 




FileReader within a Servlet

2002-04-24 Thread Günter Kukies

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