Why would you want to do that? It doesnt make sense to set a render param and then redirect to some foreign url.
In the portal that i'm building, i'm using attributes to send information from the java classes to the jsp files. For example, have a jsp that shows the name of the user logged in.
But, in other use cases, like submit a form, i want to show messages to the user like "The registration submitted sucessfully". But this message must dissappear if i do another action that follow the submit action.
I thought to put this variables/attributes in session, but i had a problem. The variables remains in session, and in the sequence of the pageflow, it is very difficult to remove the attributes in all cases of the pageflow of my portlet. My portlet has many pages that use the same portlet, but for different cases.
So, i thought to use renderParameter as a substiture to setAttribute. I thought that the renderParameter value dissappeared if i render the same page again.
For example, when i render a page, i set a message with renderParameter. If i re-render the page, the parameter would dissapear.
But, i'm seeing that it's not possible.
So, how can i set values that won't remain in session?
As an alternate approach for redirect, you can still set the render parameter for your view and forward to the appropriate view.
sample code for the view: