This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler on-line!
See this thread for details.
The moose likes Websphere and the fly likes WSAD and multipart/form-data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "WSAD and multipart/form-data" Watch "WSAD and multipart/form-data" New topic

WSAD and multipart/form-data

Neeraj Dheer
Ranch Hand

Joined: Mar 30, 2005
Posts: 225
Strange problem. I have a jsp with 'multipart/form-data'. That jsp has two parameters, one is a name-value parameter 'path' (represents where i want to save the file being uploaded within the application context) and the second is the actual file.

When i submit this data to a 'Test Environment' in WSAD 5.1.2, at times, i can see 2 threads for the same request. I have tested this by putting System.out.println(Thread.getName()) in the servlet and the class the servlet calls for the actual parsing of the request.

What i see is that, if the duplicate request passes through before the original request, all the parameters are null and a NullPointerException is thrown, but then the original request goes through, all the parameters are present and i get a success without the file being uploaded.

Why is a duplicate request being created? Is this websphere specific, since i have enver faced this problem with Apache Tomcat? Any solutions??
I agree. Here's the link:
subject: WSAD and multipart/form-data
It's not a secret anymore!