History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: WW-633
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Patrick Lightbody
Reporter: Martin Crawford
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
WebWork

Jakarta File Upload fails with mixed content (normal and file)

Created: 09/Sep/04 03:44 PM   Updated: 10/Sep/04 01:17 PM
Component/s: Dispatch
Affects Version/s: 2.1.1
Fix Version/s: 2.1.2

Environment: Tomcat 5.0.27, Jakarta File Upload


 Description  « Hide
Ripped from my blog...

After much debugging and code walking I found that this piece of code on (JakartaMultiPartRequest:67):

values.add(item.getString(servletRequest.getCharacterEncoding()));

Would throw "NullPointerException: charsetName" when I had a form that had mixed content (i.e. normal fields and file uploads). I am running Tomcat 5.0.27, which I could see potentially being be the ultimate culprit. My cheap workaround was to patch the WebWork jar to have the line read:

values.add(item.getString("UTF-8));

Which is likely a horrible and dangerous hack...

 All   Comments   Change History      Sort Order:
Patrick Lightbody - [10/Sep/04 12:23 PM ]
I think I may have fixed it. Give it a shot.

Martin Crawford - [10/Sep/04 01:17 PM ]
Yup that did it!