05-04-06 12:15 AM
Hi,
Can anyone please clarify this question on websphere portal specific StrutsA
ction class and the regular Action class?
Appreciate your help in advance.
I have a portlet, which has regular struts components and portal specific st
ruts components.
My basic action class extends from action class
class BasicAction extends Action{}
this is the first class that gets called before the portlet is rendered.
This "BasicAction" class calls some business helper to execute some busines
s logic and depending on the results, it calls another action class.
Now this action class "MyStrutsPortletAction" extends from "StrutsAction" cl
XXX
class MyStrutsPortletAction extends StrutsAction{}
!-- struts-config snippet --
<action path="/welcome" type="BasicAction">
<forward name="success" path="callStrutsAction.do"/>
</action>
<action path="/callStrutsAction" type="MyStrutsPortletAction">
<forward name="success" path="test.jsp"/>
</action>
Question---
1.) From my BasicAction class, when i try to forward to the "MyStrutsPorltet
Action" class, it is never getting forwarded to that class.
I read somewhere that Websphere portal does not handle forwards and redirect
s to other action classes. And the article also mentioned that i need to use
the "forward" method in the "PortletApiUtils" class to forward to a Struts
Action class.
so i did something like this in my BaiscAction class.
PortletApiUtil pau = PortletApiUtils.getUtilsInstance();
pau.forward("callStrutsAction.do")
this did not work.
Now i have a question here, since the execute method expects an ActionForwar
d object as return, what should i return if i'm using the above statement
I also tried
pau.forward(pau. creatPortletURIWithStrutsURL(HTTPServlet
Request,"callStrutsA
ction.do").toString())
this also did not work.
I'm runnning out of ideas here. Can anyone please help?
thanks
[ Post a follow-up to this message ]
|