RE: getRealPath() returns real path plus context path

2005-09-06 Thread Raghupathy,Gurumoorthy
servletContext.getRealPath() is real path to the context path + the argument ... So if you say servletContext.getRealPath(hithere) .. It will return C:\path\to\tomcat\webapps\tool\hithere Regards Guru -Original Message- From: Franz-Josef Herpers [mailto:[EMAIL PROTECTED] Sent: 05

Re: getRealPath() returns real path plus context path

2005-09-06 Thread Edmund Urbani
Franz-Josef Herpers wrote: Hi, I've a problem when using ServletContext#getRealPath() with Tomcat 5.5.9. My web application resides under the name tool in the webapps directory. When I call servletContext.getRealPath(request.getContextPath() I get the real path but always with the context

Re: getRealPath() returns real path plus context path

2005-09-06 Thread Franz-Josef Herpers
Hi, Edmund Urbani wrote: the getRealPath method simply returns a path inside the webapp's directory. eg. you can do getRealPath(images/someimg.jpg) and get the actual filesystem path for that file, so you can access it using java.io.File and do something with it. getRealPath(/) should give