Hi, I'm adding in file uploading features to my application. I'm having a problem that whenever I use enctype ="multipart/form-data" in my jsp page, the session will become null. It works fine when I remove the above enctype, but the file uploading no longer function. Do you have any idea how to over come this problem? Any suggestion will be highly appreciated. Thanks a lot.
You're right, it would too. I've never had to support Multipart and Sessions at the same time so I'd never noticed... You'll probably have to use request.encodeURL() to pass the session and you might have to turn on URL rewriting in the properties of your server (eg if you're using Websphere) Dave
Extension to David .. if you use request.encodeURL() in a client that has cookies enabled. the encodeURL() won't work .. the pedestrian solution would be to encode your own URL using request.getSession().getID() and use it to encode the URL manually..
your URL would be as follows ORIGINAL_URL+ ";jsessionid="+ request.getSession().getId();
Guys, does this always happen? loosing a session when using enctype ="multipart/form-data" ?? i'm using forte for java and it doesn't seem to happen this.. my application requires the user to log in to upload a file. i'll have to check that then...
I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com