my dog learned polymorphism*
The moose likes Tomcat and the fly likes struts2 result Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "struts2 result " Watch "struts2 result " New topic
Author

struts2 result

yash wardhan
Ranch Hand

Joined: Jan 22, 2008
Posts: 46
Hi,
can we use regular expression/EL in result tag of an action in struts.xml

What I want is somthing like this,

<action name="anyAction" method="myMethod" class="pack.MyAction">
<result name="*">{1}</result>
</action>

This works for,
<action name="*" method="{1}" class="pack.MyAction">
<result name="success">any.jsp</result>
</action>

Thanks in Advance
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60055
    
  65

"jq jr", please check your private messages for an important administrative matter.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
yash wardhan
Ranch Hand

Joined: Jan 22, 2008
Posts: 46
Any replyies in the above question?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60055
    
  65

No. The EL is part of JSP and only applied to JSP pages.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: struts2 result
 
Similar Threads
can any one explain how the data is comming in Action directly pls
struts2: howto correctly deligate actions on the struts.xml's include files
struts2: how to invoke a method from the xml conf file. what shoud be the type?
But this code, throws the exception "The Struts dispatcher cannot be found".
Interceptor messes up action class in Struts2