No idea for the moment for a 'dynamic' solution. If for any reason I
couldn't get the real path dynamically, I would manage to get it statically
so that the application can work while I am thinking about it ;-)
There must be half a million way to get that information statically. (The
two that seem to me the more usefull are init parameter and property)
Pierre-Yves
-----Message d'origine-----
De : A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]De la part de
Marco Trevisan
Envoy� : jeudi 12 juillet 2001 14:39
� : [EMAIL PROTECTED]
Objet : Re: url mapping
"Pierre-Yves Saumont" <[EMAIL PROTECTED]> wrote:
[snip]
> String path =
getServletConfig().getServletContext().getRealPath("/");
[snip]
quoting (edited) from 2.2 spec api javadoc (haven't lookend in 2.3):
-------------------------
public java.lang.String getRealPath(java.lang.String path)
...
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).
...
-------------------------
any hint for this case ?
Marco
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html