If you want the absolute path (i.e. not relative path of the file system)
use String getAbsolutePath(). If you want the canonical path (which resolves
the symbols . and ..) uset the String getCanonicalPath method. Both are in
the java.io.File class.
T. Kochanowicz
-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet API
Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Martin Pribyl
Sent: Monday, April 16, 2001 11:37 AM
To: [EMAIL PROTECTED]
Subject: handling form with a file input element
Hi, I have a problem with obtaining a full path of a file specified in a
file input element of a form. I use Jason Hunter's servlets from
www.servlets.com for handling the form. There is a FilePart class with a
method getFileName(). But this method returns just the name of the file, not
the full path. Is there some way to obtain the full path from the file
element?
Thank you,
Martin Pribyl.
___________________________________________________________________________
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