You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Srineel Mazumdar <sm...@gmail.com> on 2012/05/01 10:33:55 UTC
Struts 2 Rest Showcase Example : Issue in understanding code
Hi,
I am new to Struts 2 and hence I am downloading the the samples from Apache
site. Struts 2 Rest Showcase Example is the one I am refering to.
I have the follwoing questions :
1) What is meant by :
@Results({
@Result(name="success", type="redirectAction", params = {"actionName" ,
"orders"})
})
in OrdersController.java ?
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>
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 ?
Regards
Srrineel Mazumdar
Re: Struts 2 Rest Showcase Example : Issue in understanding code
Posted by rahul bhalla <ur...@gmail.com>.
http://viralpatel.net/blogs/2009/12/introduction-to-struts-2-framework.html
I started learning from above tutorial i hope this will also help you to
learn Struts2
Re: Struts 2 Rest Showcase Example : Issue in understanding code
Posted by Dave Newton <da...@gmail.com>.
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
Re: Struts 2 Rest Showcase Example : Issue in understanding code
Posted by Srineel Mazumdar <sm...@gmail.com>.
Hi ,
I will definitely follow your advice. Meanwhile can anyone answer these
questions?
On Tue, May 1, 2012 at 6:00 PM, Steve Higham <st...@sjlt.co.uk> wrote:
> Hi Srineel,
>
> I would recommend purchasing a copy of Struts 2 In Action published by
> Manning. You're not going to pick Struts up by browsing through a couple of
> examples.
>
> Cheers,
>
> Steve
>
> -----Original Message-----
> From: Srineel Mazumdar [mailto:smaz19584@gmail.com]
> Sent: 01 May 2012 09:34
> To: Struts Users Mailing List
> Subject: Struts 2 Rest Showcase Example : Issue in understanding code
>
> Hi,
>
> I am new to Struts 2 and hence I am downloading the the samples from Apache
> site. Struts 2 Rest Showcase Example is the one I am refering to.
>
> I have the follwoing questions :
>
> 1) What is meant by :
> @Results({
> @Result(name="success", type="redirectAction", params = {"actionName" ,
> "orders"})
> })
>
> in OrdersController.java ?
>
> 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>
>
> 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 ?
>
> Regards
>
> Srrineel Mazumdar
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
RE: Struts 2 Rest Showcase Example : Issue in understanding code
Posted by Steve Higham <st...@sjlt.co.uk>.
Hi Srineel,
I would recommend purchasing a copy of Struts 2 In Action published by
Manning. You're not going to pick Struts up by browsing through a couple of
examples.
Cheers,
Steve
-----Original Message-----
From: Srineel Mazumdar [mailto:smaz19584@gmail.com]
Sent: 01 May 2012 09:34
To: Struts Users Mailing List
Subject: Struts 2 Rest Showcase Example : Issue in understanding code
Hi,
I am new to Struts 2 and hence I am downloading the the samples from Apache
site. Struts 2 Rest Showcase Example is the one I am refering to.
I have the follwoing questions :
1) What is meant by :
@Results({
@Result(name="success", type="redirectAction", params = {"actionName" ,
"orders"})
})
in OrdersController.java ?
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>
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 ?
Regards
Srrineel Mazumdar
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org