Friday, November 30, 2007

DispatchAction: ServletException : 'method' not found

javax.servlet.ServletException: Request[/addcomponent] does not contain handler parameter named 'method'. This may be caused by whitespace in the label text.

Cause:
The error was cause by Internet Explorer because it has a concept of a default submit action when enter is pushed. So it submits the form to the server but with no specified method parameter because no button was pushed. And if you have a page with multiple submit buttons (which is the whole point of using a LookUpDispatchAction class), the &method='someMethodName' will always be dropped.

No comments: