• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Redirecting to a URL after actionPerformed in Portlet

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 57
Eclipse IDE PHP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic