This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have developed two struts portlets(in 2 differrent wars) using Struts Bridge-1.2.7-1.0.4.
The struts version is 1.2.7.
I am using Jetspeed as my portlet container.
These portlets are then embedded onto Jahia portal.
The portlets work fine when run independently, i.e. one portlet on a page. However, the problem starts in case of multiple portlets on a single page and that too, from second portlet onwards.
As per my undersatnding, on submit of first page,
i. An ActionRequest is generated, wherein my struts action get called and I forward to a jsp(in my case a RenderAction with redirect=true which then forwards to a jsp).
ii. A RenderRequest cycle begins for each portlet during which the struts render conext is restored(for the portlet we submitted) and next page is displayed.
This should happen for all portlets on a page irrespective of their position(container position).
In my case, everthing works as expected in case of first portlet on a page. However, the problem starts in case of second(or consequent portlets).
The following are sequence of events that happens on submit of first page of second portlet.
i. Action request is trigerred for the second portlet and my Action gets called. I forward to a render action(dummy action which forwards to a jsp with redirects in place).
ii. Render Request occurs for other portlet as expected.
iii. Now, something happens which I fail to understand .......
The action mentioned as 'ViewPage' in my portlet.xml gets called (which is the method which populates data from DB) This action forwards to the first page of my application (which I can make out frm the log statements). However, before the page can be rendered, another render request comes in which takes me to the jsp I originally forwarded during my ActionRequest.
This happens whenever I submit a button from my second portlet.