this should ideally be handled in your ActionClass.
set that 'something extra' in your Action class and use the <s:if> tag to
see if it is there. if its there then just display it.
<action name="fromNormalRequest" class="org.MyClass">
<result>/commonPage.jsp</result>
</action>
<action name="specialAction" class="org.MyClass">
<result>/commonPage.jsp</result>
</action>
import com.opensymphony.xwork2.ActionContext;
public class MyClass extends ActionSupport
{
private String somethingExtra;
public String execute()
{
if
(ActionContext.getContext().getName().equalsIgnoreCase("specialAction"))
this.somethingExtra = "I just set something extra dude!";
return SUCCESS;
}
}
On Thu, Jun 11, 2009 at 8:25 PM, akoo <[email protected]> wrote:
>
> Hi,
> I have an jsp page which is used as a result by two actions. However if
> the
> request comes from one of the actions something extra needs to be on the
> page. Is there way I can access the action name on the jsp page.
>
> i.e
> <s:if test="action == specialaction">
> print something extra here
>
> </s:if>
>
>
> --
> View this message in context:
> http://www.nabble.com/checking-which-action-on-the-jsp-tp23991107p23991107.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>