[Opensource] bug with transition (and parameter) handling in controllers with session scope form beans and forms with file inputs

Mike Traum mtraum at cirnetwork.org
Tue Feb 4 16:27:38 PST 2003


I've found a bug when you're using a controller containing with session
scope form beans.
 
Here's the situation:
1. A multipart form (form with a file upload) is submitted
2. You transition to another state
3. You attempt to transition to a third state, but it keeps transitioning
back to the same state
 
This happens because submitting a multipart form sets
multipartRequestHandler on the form bean. If the multipartRequestHandler of
the form bean is set, the regular http parameters will be ignored.
Unfortunately, the multipartRequestHandler is never reset, so when you try
to transition to the 3rd state, it's reading the old parameter information
from the first submission.
 
 
The Workaround:
Add setMultipartRequestHandler(null) to the reset method of your form bean.
 
 
Hope that helps someone someday - this one's been beating me up all day.
 
mike
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.jcorporate.com/pipermail/opensource/attachments/20030204/a265230c/attachment-0002.htm


More information about the Opensource mailing list