|
Home > Archive > WebSphere Portal Server > November 2005 > how to pass error information from processAction to doView (JSR 168)
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
how to pass error information from processAction to doView (JSR 168)
|
|
|
| I am developing a JSR 168 portlet. My portlet contains a form. When the user submits the form, WPS calls the processAction method in my portlet class. If an exception occurs in my action handling logic, I want to display an error message to the user in
the portlet. So the error message needs to be available to the doView method, which is called by WPS in render phase.
What is the recommended mechanism for passing errors from processAction to doView?
Thanks,
Dennis
| |
| mrosenthalchicago 2005-11-23, 5:56 pm |
| One possible solution is
response.setRenderParameter("errorMessage", errorMessage);
This can then be retrieved in doView by
String errorMessage = request.getParameter("errorMessage");
| |
|
| I tried that, and was able to pass the information through the render parameter. However, I was unable to clear/remove the render parameter from doView, so the error message stayed there in subsequent renderings. Is there any way to remove a render para
meter in doView, so that subsequent calls do not see it?
Thanks,
Dennis
|
|
|
|
|