Struts portlet Action and regular action - question
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > WebSphere > WebSphere Portal Server > Struts portlet Action and regular action - question




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Struts portlet Action and regular action - question  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
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 ]



    Re: Struts portlet Action and regular action - question  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-05-06 12:15 AM

Hi,

Can anyone please tell me how to forward from a regular Action class to a (P
ortlet specific) StrutsAction class?

Appreciate your help
Thanks





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:27 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register