Hi Thomas,

Thanks for your reply. I have gone thru the documentation that you mentioned. I think I do understand it a little bit.

However I am facing some difficulties --

Following is an excerpt from my portlet.xml file --

<portlet>
<init-param>
<name>ServletContextProvider</name>
<value>org.apache.jetspeed.portlet.ServletContextProviderImpl</value>
</init-param>
<init-param>
<name>ViewPage</name>
<value>/showFirstPage.do</value>
</init-param>
<portlet-name>tagportal</portlet-name>
<display-name>Tag Test Portlet</display-name>
<portlet-class>org.apache.portals.bridges.struts.StrutsPortlet</portlet-class>
<expiration-cache>-1</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
</supports>
<portlet-info>
<title>Tag Test Portlet</title>
<short-title>Tag Test Portlet</short-title>
</portlet-info>
</portlet>




And following are my actionMappings --

<action-mappings>
<action path="/displayFirstPage" name="firstPageForm" scope="session"
validate="false" include="/WEB-INF/view/firstPage.jsp"/>
<action path="/showFirstPage"
type="com.tagaudit.tagportal.struts.actions.FirstPageRenderAction"
name="firstPageForm" scope="session" validate="false">
<forward name="success" path="/displayFirstPage.do"
redirect="true"/>
</action>
<action path="/secondPage" include="/WEB-INF/view/secondPage.jsp"/>
<action path="/thirdPage"
type="com.tagaudit.tagportal.struts.actions.TestAction"
name="secondPageForm" scope="session" validate="false">
<forward name="success" path="/secondPage.do" redirect="true"/>
</action>
</action-mappings>




Now the problem is, with this setup, I can see the execute method of FirstPageRenderAction.java being called. But it is not being forwarded to /displayFirstPage.do as specified in my actionMapping. And as a result, I get an empty portlet without any content. The thing is, there are no errors anywhere in any logs so :(

I spent almost whole day trying to figure that out ... Any help is very very appreciated !!

Thanks,
Amit

----Original Message Follows----
From: [EMAIL PROTECTED]
Reply-To: "Jetspeed Users List" <jetspeed-user@jakarta.apache.org>
To: "Jetspeed Users List" <jetspeed-user@jakarta.apache.org>
Subject: Re: Struts bridge concept related Question
Date: Wed, 23 Mar 2005 15:42:35 +0100

i hope it's ok for ate.
i have same words from him:

If you post form data to Struts it should (preferrably) be processed in an
"action handling only" Struts Action. The form should post using an
ActionURL (required by the specs).
In the ActionRequest, the targetted Struts Action updates your Model (the
M in MVC) if need be and forwards (preferrably with redirect="true") to an
"
view handling only" Struts Action.
Within the following RenderRequest(s), the "view handling" Struts Action
uses the Model to configure the required JSP rendering state/data if need
be.
Its very easy to use an include only Action mapping for that if nothing
has to be configured: <action "/index" include="/WEB-INF/view/index.jsp"/>
It is advised to use an ActionMapping even for those situations as it
properly hides the rendering solution.
This applies to all Struts applications in general and a strong
recommendation from the Struts team too.

I also suggest you read up a bit on the Struts Bridge if you haven't done
so yet.
You should start with the README.txt in the Struts Bridge source tree.
Although the README.txt is a bit outdated already (haven't found the time
yet to write a proper userguide), it explains the above recommended flow
of actions.
And for more up todate information about the new features of the current
Struts Bridge 0.2 version:

http://portals.apache.org/jetspeed-2/multiproject/portals-bridges-struts/features.html


Happy coding, Ate






Hi all,

Please pardon my stupid question because I dont have much experience with
struts or portals !!!

I have gone thru the struts-bridge documentation that is given on the
jetspeed website, and I have a few questions as to what would be the best
way to solve my problem.

I have two pages in a portlet. On the first page there is a submit button,

and a textField. When user clicks the button, the second page should come
up. The second page has a drop down which needs to be loaded based on the
textField value that the user entered on the first page.

From the documentation, I think here is how I should do it ---

I need to have two actions. When user clicks submit button, the first action (which is action-URL) gets called, I save the textField value in DB. Then redirect to the second action in the actionMapping. And the second action will be a render-URL, and that will call the DB and load the dropdown and put it in session and forward to the second page ??

Please bear with me if the question is very dumb :(

Thanks,
Amit



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to