struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <davelnew...@gmail.com>
Subject Re: Struts 2 Rest Showcase Example : Issue in understanding code
Date Tue, 01 May 2012 18:34:41 GMT
On Tue, May 1, 2012 at 4:33 AM, Srineel Mazumdar wrote:

> 1) What is meant by :
> @Results({
>    @Result(name="success", type="redirectAction", params = {"actionName" ,
> "orders"})
> })
>
> in OrdersController.java ?
>

http://struts.apache.org/2.x/docs/convention-plugin.html


> 2) Meaning of the entries in struts.xml:
>
> <struts>
>    <!--  Overwrite Convention -->
>    <constant name="struts.convention.action.suffix" value="Controller"/>
>    <constant name="struts.convention.action.mapAllMatches" value="true"/>
>    <constant name="struts.convention.default.parent.package"
> value="rest-default"/>
>
>    <constant name="struts.convention.package.locators" value="example"/>
> </struts>
>

http://struts.apache.org/2.x/docs/convention-plugin.html


> 3) a) How the code "understands and decides" which method to call
> in OrdersController.java  ?
>    b) We have *"return "editNew";" *etc return types . Where exactly are
> these being used and how does the applciation decide which page to navigate
> based on the return types ?
>

http://struts.apache.org/2.x/docs/result-configuration.html

Please consider spending some time with the existing S2 documentation; all
of this stuff is discussed.

Getting a basic handle on how the framework is configured etc. will pay
dividends and save countless hours of time.

http://struts.apache.org/2.x/docs/guides.html

Dave

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message