hi,
i'm quite new to this project and perhaps i'm making some mistakes. perhaps
you can help me.
i'm trying to upload a file from a windows desktop to a linux server running
tomcat 5.0.28.
i'm using the following code to get a FileItem object:
// create a new file upload handler
ServletFileUpload upload = new ServletFileUpload(new DiskFileItemFactory());
// parse the request
try
{
List items = upload.parseRequest(request);
for (Iterator iter = items.iterator(); iter.hasNext();)
{
FileItem element = (FileItem) iter.next();
...
...
...
now when i use the element.getName() method i'm getting the full path (C:
\mydir\myfile.txt) instead of just name of the file (myfile.txt). there is no
problem if the client is also a linux client. has it to do with the different
file separator characters?
any help will be appreciated very much.
thanx in advance
mihael knezevic
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]