I think you could use the requestURI and pass that to
ServletContext.getRealPath().

Example the folowing:

<% out.println(application.getRealPath(request.getRequestURI())); %>

Yields:

/files/projects/jakarta-tomcat-4.0/build/webapps/tomcat-docs/tomcat-docs/test.jsp

Have to be careful as if the deploy application is run out of the WAR
file (it's not expanded on the filesystem), then getRealPath will return
null.






On Mon, 2002-08-26 at 16:17, Mark R. Diggory wrote:
> Hi,
> 
> I'm trying to write a Tag that knows the absolute file path of the JSP 
> Page it is executing in (Not the request.getServletPath(), which could 
> actually just be a servlet mapping) does anyone have any tips on how to 
> get this in Tomcat? I was actually looking throught the actuall Catalina 
> code base and came across a class org.apache.catalina.Globals which 
> suggests that there are references to to things like (jsp-file, 
> servlet-path) from the web.xml present in the request sttributes. But I 
> fail to see them.
> 
> -Mark
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to