You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Puneet Babbar 2 <pb...@sapient.com> on 2012/03/05 07:00:20 UTC

RE: Struts, spring integration while using struts annotations

Finally I was able to achieve the explicit creation of an action class as a bean and got the object to be used to service requests.

The change I made was to remove the "id" attribute from the bean tag, previously I was trying to map the id with the url name of the action, which wasn't working. Now with the hit and trial I was doing, I discovered that there is no connection between the two( I was doing this cos of some stuff I had seen on some sites)

So if I am specifying my bean definition in applicationContext.xml as - 

<bean class="com.test.LoginPage" scope="prototype">
 	<property name="loginName" value="Test Value"></property>
 </bean>

And not doing anything extra in my action class, i was getting the action class wired as needed.

scope="prototype" takes care of the fact that by-default all beans in spring are created with singleton as scope.

Why can't they mention this on the spring plugin page? There is nothing mentioned about "How-to" in context of using annotataions using convention plugin.

How can we get this added?

Regards

Puneet babbar



-----Original Message-----
From: Łukasz Lenart [mailto:lukasz.lenart@googlemail.com] 
Sent: Wednesday, February 29, 2012 5:34 PM
To: Puneet Babbar 2; Struts Users Mailing List
Subject: Re: Struts, spring integration while using struts annotations

Maybe it is a bug, that way I asked to check that.

2012/2/29 Puneet Babbar 2 <pb...@sapient.com>:
> Haven't tried that till now, was hoping to get some tips from the community users.
>
> I am able to use the default auto-wiring done by the struts2-spring plugin, but not able to explicitly create a bean from an action class and get that object used by the framework to service requests.
>
> Regards
>
> Puneet
>
> -----Original Message-----
> From: Łukasz Lenart [mailto:lukasz.lenart@googlemail.com]
> Sent: Wednesday, February 29, 2012 4:24 PM
> To: Puneet Babbar 2
> Cc: Struts Users Mailing List
> Subject: Re: Struts, spring integration while using struts annotations
>
> 2012/2/29 Puneet Babbar 2 <pb...@sapient.com>:
>> Tried after you suggested it, but doesn’t work :(
>
> Did you try to debug SpringObjectFactory#buildBean methods ?
>
>
> Regards
> --
> Łukasz http://www.lenart.org.pl/
> mobile +48 606 323 122, office +27 11 0838747
> Warszawa JUG conference - Confitura http://confitura.pl/

Re: Struts, spring integration while using struts annotations

Posted by Łukasz Lenart <lu...@googlemail.com>.
2012/3/5 Puneet Babbar 2 <pb...@sapient.com>:
> This may sound dumb, but I am new and don’t know about CLA.
> What is CLA?

https://cwiki.apache.org/WW/editing-the-documentation.html

> And where can I file the issue?

https://issues.apache.org/jira/browse/WW


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

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


RE: Struts, spring integration while using struts annotations

Posted by Puneet Babbar 2 <pb...@sapient.com>.
This may sound dumb, but I am new and don’t know about CLA. 
What is CLA?

And where can I file the issue?

Regards

Puneet

-----Original Message-----
From: Łukasz Lenart [mailto:lukasz.lenart@googlemail.com] 
Sent: Monday, March 05, 2012 11:51 AM
To: Puneet Babbar 2
Cc: Struts Users Mailing List
Subject: Re: Struts, spring integration while using struts annotations

2012/3/5 Puneet Babbar 2 <pb...@sapient.com>:
> How can we get this added?

There are two ways, full CLA and send to ASF or fill an issue with
description of the problem and someone will update the docs.


Kind regards
-- 
Łukasz http://www.lenart.org.pl/
mobile +48 606 323 122, office +27 11 0838747
Warszawa JUG conference - Confitura http://confitura.pl/

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

Re: Struts, spring integration while using struts annotations

Posted by Łukasz Lenart <lu...@googlemail.com>.
2012/3/5 Puneet Babbar 2 <pb...@sapient.com>:
> How can we get this added?

There are two ways, full CLA and send to ASF or fill an issue with
description of the problem and someone will update the docs.


Kind regards
-- 
Łukasz http://www.lenart.org.pl/
mobile +48 606 323 122, office +27 11 0838747
Warszawa JUG conference - Confitura http://confitura.pl/

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