users@glassfish.java.net

Re: How to access fileName in javax.servlet.http.Part

From: Dominik Dorn <dominik.dorn_at_gmail.com>
Date: Tue, 13 Apr 2010 19:27:46 +0200

hmm... I cannot find org.apache.catalina.fileupload.PartItem in any
public maven archetype, which prevents me from casting the Part to a
PartItem as I cannot compile the class without the dependency.

I want to get the original file name, as it is named on the clients system.
org.apache.catalina.fileupload.PartItem has the property fileName but thats
not accessible to me as I only have the interface Part which has a
getName method, but that one points to the name of the part and not
the filename.

Is it possible thats a specification error? IMO
javax.servlet.http.Part should somehow allow the get the name of the
original file on the client.