tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: AJP Todo
Date Tue, 11 Dec 2001 04:00:35 GMT

----- Original Message -----
From: "Incze Lajos" <incze@mail.matav.hu>
To: "Tomcat Developers List" <tomcat-dev@jakarta.apache.org>
Sent: Monday, December 10, 2001 8:02 AM
Subject: Re: AJP Todo


> What's wrong with this? (ServletContext method javadoc both 2.2 and 2.3)

Absolutely nothing.  And indeed this is the route I took, since looking at
the code showed that the Naming methods still didn't guarantee an absolute
path and this one always returns null for non-file-based contexts.

Now if I can just find someone to Listen to, I'll be done :).
> ----
> getRealPath
>
> public java.lang.String getRealPath(java.lang.String path)
>
> Returns a String containing the real path for a given virtual path.
> For example, the path "/index.html" returns the absolute file path
> on the server's filesystem would be served by a request for
> "http://host/contextPath/index.html", where contextPath is the context
> path of this ServletContext..
>
> The real path returned will be in a form appropriate to the computer and
> operating system on which the servlet container is running, including the
> proper path separators. This method returns null if the servlet container
> cannot translate the virtual path to a real path for any reason (such as
> when the content is being made available from a .war archive).
> -----
> So, getServletContext().getRealPath( "/" )
>
> incze
>
> --
> To unsubscribe, e-mail:
<mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:tomcat-dev-help@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message