[EMAIL PROTECTED] said:
>>Actually, the preferred way to use Struts within a Portlet is to use two
>>Struts Actions: one for processAction forwarding to a RenderAction which
>>in the end dispatches to a JSP.
>>But yes, if an Struts Action forwards to a JSP from within an
> ActionRequest
>>the Struts bridge will break in and defer the JSP rendering.
>
> i have a question to this statement.
> you say the preffered way is follow:
>
> jsp --> start action --> action is not forwarding to a jsp, but to a next
> action --> this action do nothing, only forward to a jsp ?!
No, of course not :-)
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

>
> i'm asking, because it's not clear for me, what handicap i will get, if i
> do it like this:
> jsp--> start action --> action forwarded to jsp
>
> because i have a application which is running as portlet like this way.
>
> thanks
>
> thomas


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

Reply via email to