Re: Rewriting an application in Struts2 from Struts 1

2012-10-22 Thread Lukasz Lenart
2012/10/20 Srineel Mazumdar :
> 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 :  name="namespace">/shop ?

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-22 Thread Lukasz Lenart
2012/10/20 Srineel Mazumdar :
> Also would like to add another thing :
>
> If I add the following line  :
>
> 
>
> 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-19 Thread Srineel Mazumdar
Also would like to add another thing :

If I add the following line  :



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 wrote:

> 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 :
>
>  type="org.springframework.samples.jpetstore.web.struts.EditAccountAction"
>  name="workingAccountForm" scope="session" validate="true"
> input="/WEB-INF/jsp/struts/EditAccountForm.jsp">
>  
> 
>
> in strutsconfig.xml. What should be the equivalent entry in struts.xml for
> this entry in Struts1 ?
>
> Regards,
> Srineel
>


Re: Rewriting an application in Struts2 from Struts 1

2012-10-18 Thread Lukasz Lenart
2012/10/19 Srineel Mazumdar :
> 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 :
>
>  type="org.springframework.samples.jpetstore.web.struts.EditAccountAction"
> name="workingAccountForm" scope="session" validate="true"
> input="/WEB-INF/jsp/struts/EditAccountForm.jsp">
> 
> 
>
> in strutsconfig.xml. What should be the equivalent entry in struts.xml for
> this entry in Struts1 ?


index
/shop

/WEB-INF/jsp/struts/EditAccountForm.jsp



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