Re: Rewriting an application in Struts2 from Struts 1

2012-10-22 Thread Lukasz Lenart
2012/10/20 Srineel Mazumdar smaz19...@gmail.com:
 Also would like to add another thing :

 If I add the following line  :

 package name=newpetstore extends=struts-default namespace=/shop

 then I think I do not need to add namespace in all the entries??

Yes


Regards
-- 
Łukasz
mobile +48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Rewriting an application in Struts2 from Struts 1

2012-10-22 Thread Lukasz Lenart
2012/10/20 Srineel Mazumdar smaz19...@gmail.com:
 Hi,

 Thanks for  your reply. However I still have some queries :

 1) Why the namespace = path added ? I could have given /shop/editAccount.
 What difference it would have made ?

You should use namespaces as action should be just a simple labels, no
slashes. In Struts 1 you have modules, in Struts 2 are namespaces.

 2) Why added redirect action ?

To redirect to an action, you can chain actions but it isn't preferred.

 3) Why add an extra entry : param
 name=namespace/shop/param ?

to redirect to action named index in namespace /shop as you can have
an index action in default namespace as well


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Rewriting an application in Struts2 from Struts 1

2012-10-19 Thread Lukasz Lenart
2012/10/19 Srineel Mazumdar smaz19...@gmail.com:
 Hi,

 I am trying t rewrite the jpetstore project in Struts 2. I am referring to
 the Struts 1 implementation of the petstore project. I am having the
 following problem :

 There is an entry :

 action path=/shop/editAccount
 type=org.springframework.samples.jpetstore.web.struts.EditAccountAction
 name=workingAccountForm scope=session validate=true
 input=/WEB-INF/jsp/struts/EditAccountForm.jsp
 forward name=success path=/shop/index.do/
 /action

 in strutsconfig.xml. What should be the equivalent entry in struts.xml for
 this entry in Struts1 ?

action name=editAccount namespace=/shop
class=org.springframework.samples.jpetstore.web.struts.EditAccountAction
result type=redirectAction
param name=actionNameindex/param
param name=namespace/shop/param
/result
result name=input/WEB-INF/jsp/struts/EditAccountForm.jsp/result
/action


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Rewriting an application in Struts2 from Struts 1

2012-10-19 Thread Srineel Mazumdar
Also would like to add another thing :

If I add the following line  :

package name=newpetstore extends=struts-default namespace=/shop

then I think I do not need to add namespace in all the entries??

On Fri, Oct 19, 2012 at 9:28 AM, Srineel Mazumdar smaz19...@gmail.comwrote:

 Hi,

 I am trying t rewrite the jpetstore project in Struts 2. I am referring to
 the Struts 1 implementation of the petstore project. I am having the
 following problem :

 There is an entry :

 action path=/shop/editAccount
 type=org.springframework.samples.jpetstore.web.struts.EditAccountAction
  name=workingAccountForm scope=session validate=true
 input=/WEB-INF/jsp/struts/EditAccountForm.jsp
  forward name=success path=/shop/index.do/
 /action

 in strutsconfig.xml. What should be the equivalent entry in struts.xml for
 this entry in Struts1 ?

 Regards,
 Srineel