commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Leland <>
Subject Re: [FileUpload] The getName method yields inconsist value
Date Sat, 10 May 2003 06:17:59 GMT
The \ is considered an escape for control characters,
if you want '\' you need '\\'

So for "E:\Tomcat\Tomcat 4.1\webapps\mm\client/photo\Tom\dog1.gif"
   have you tried: ;
"E:\\Tomca\\Tomcat 4.1\\webapps\\mm\\client/photo\\Tom\\dog1.gif"


Vernon wrote:

> Hi, Martin,
> Thanks again for your detailed explanation.
> I shouldn't ask a question when I was very tired. The question is not 
> right.
> In the follow-up procedure, I run into the following exception:
> java.lang.Exception: File name is invalid
> on the line of write method although the file is written in the 
> desired directory. I have tried the both write(String) and write(File) 
> methods and yields the same exception. The file path is 
> "E:\Tomcat\Tomcat 4.1\webapps\mm\client/photo\Tom\dog1.gif" as the 
> input parameter for write(String). Is the exception thrown due to the 
> backward slash? If so, how I shall deal with path informaion stored in 
> web.xml file? The portion, "client/photo", of the path is in the xml 
> file.
> Vernon 

View raw message