Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

WSAD and multipart/form-data  RSS feed

Neeraj Dheer
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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??
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!