tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raghupathy,Gurumoorthy" <gurumoorthy.raghupa...@uk.fid-intl.com>
Subject RE: getRealPath() returns real path plus context path
Date Tue, 06 Sep 2005 07:59:03 GMT
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:fjh@wir-age.de] 
Sent: 05 September 2005 20:40
To: Tomcat Users List
Subject: getRealPath() returns real path plus context path


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 path added at the end. That means a path 
like C:\path\to\tomcat\webapps\tool\tool.

Is there any explanation for this behaviour? Or am I doing something wrong?

Thanks for any hints in advance

Regards
Franz

-- 
Franz-Josef Herpers
Puschkinallee 9A
12435 Berlin
030/53 21 33 02
0173/54 23 666
fjh@wir-age.de



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message