ForwardAction supports Tiles so NoOpAction is deprecated.

David



From: "Peterkofsky, Don" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Subject: RE: How to link to an Action which has no Form.
Date: Thu, 13 Feb 2003 11:37:05 -0800

Actually, as of 1.1b2 this action does *not* take a Tiles definition as a
parameter; it is not "Tiles-aware".

Tiles provided an action class to mimic this functionality:
org.apache.struts.tiles.actions.NoOpAction

If the ForwardAction behavior has changed in 1.1b3, I'd be interested to
know (it is not documented as such).

-----Original Message-----
From: Raible, Matt [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 11:27 AM
To: 'Struts Users Mailing List'
Subject: RE: How to link to an Action which has no Form.


Use the ActionForward built-in class:

     <action
        path="/logout"
        type="org.apache.struts.actions.ForwardAction"
        parameter="/logout.jsp"/>

You can specify a JSP or a tiles' definition as the parameter.

HTH,

Matt

> -----Original Message-----
> From: Bert Catsburg [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 13, 2003 12:26 PM
> To: Struts Users Mailing List
> Subject: How to link to an Action which has no Form.
>
>
> Hello,
>
> How do you include a link in your code which triggers an Action
> which has no Form. The Action class will activate a global
> forward.
> I hope somebody can help me since I am on this problem for
> two days now and have search the whole list, docs and both
> Struts-books.
> A simple direction where to look any further would be of much
> help.
>
> Thank you,
>
> Bert Catsburg
>
>
>
> Code samples:
>
> JSP with the link:
> ------------------
>    <p><html:link page="/petrol">Petrol</html:link></p>
>
> Struts Config
> -------------
>      <global-forwards>
>         <forward name="index" path="/index.jsp" />
>      </global-forwards>
>
>      <!-- Process a Petrol request -->
>      <action    path="/petrol"
>                 type="senktar.PetrolAction"
>                 scope="request" />
>
> PetrolAction.java
> -----------------
>    package senktar
>    public class PetrolAction extends Action {
>      public ActionForward execute(ActionMapping mapping,
>                                  HttpServletRequest request,
>                                  HttpServletResponse response)
>      throws Exception {
>
>        ..... // Lines of code
>
>        return mapping.findForward("index");
>      }
>     }
>
>
>
> ---------------------------------------------------------------------
> 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]



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

_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail


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

Reply via email to