• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Redirecting to a URL after actionPerformed in Portlet

 
Ram Charan
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am new to the portlets development using IBM Websphere. The scenario I have is on a portlet user provides some information and clicks on submit which needs to be be saved in session and should be redirected to a diferent page. Can some one help me on where the action processing needs to be done and how the redirection can be acheived? My portlet class is extending AbstractPortlet and implementing ActionListener.

If I am not wrong, in JSR 168 compliant portal this will be done in processAction method and page redirection cane be done using response.sendRedirect in the same method.

Thanks,
Ram.
 
Ankur Srivastav
Ranch Hand
Posts: 57
Eclipse IDE Java PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are right. You can use Process Action for a JSR portlet. Its called when a Form submit is done. In order to set your values as attributes you can use following code:

//Get HttpRequest Object from the Portal action request

HttpServletRequest request = getHttpServletRequest(actionRequest);

request.setAttribute("parameter", parameter);
 
Ram Charan
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ankur for your response.

But I am using IBM RAD to generate portlet class which creates the class extending AbstractPortlet and implementing ActionListener. In this I cannot find processAction method to override. So how can I implement the scenario in question?

Ram
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic