Hi,

I've had the same problem you're having and I solved by doing the follow:

I've just put the guice-struts2-plugin 1.0 (it's pretty important that you
use the 1.0)
Then you put your objectFactory on struts as "guice" and setup the module:

<constant name="struts.objectFactory" value="guice"/>
<constant name="guice.module" value="com.test.ioc.MyModule"/>

It doesn't need any configuration on web.xml, the struts will use
guiceobjectfactory to instantiate the actions what enable the guice inject,
but I couldn't use the newest versions of guice with the configurations that
i've seen on internet and I think you are in the same position once you're
using sitemesh, probably freemarket / velocity.

If you want more information, feel free to e-mail me.

Atenciosamente,

*Jayr Motta*
Software Developer
*
*
I'm  on 
BlackBeltFactory.com<http://www.blackbeltfactory.com/ui#!User/jmotta/ref=jmotta>
!



On Mon, Apr 11, 2011 at 12:17 PM, Sam Berlin <[email protected]> wrote:

> The issues are closed as "Will not fix" or "Duplicate" because we're not
> sure if the problem is fixable.  If you're able to write some test cases &
> patches and attach them to one of the issues, that would be very helpful.
>  Maybe it is fixable.  I'm personally not too familiar with struts2 (and
> don't use it at all), so I don't have much inclination or ability to fix
> it.. but someone else probably does.
>
> sam
>
>
> On Mon, Apr 11, 2011 at 10:56 AM, Scott <[email protected]> wrote:
>
>> Yup, I have the subclassed listener that gets my injector, and it is
>> in web.xml.
>>
>> On Apr 11, 12:35 am, Michael <[email protected]> wrote:
>> > Hi Scott,
>> >
>> > Have you defined a listener which is a subclass of
>> > GuiceServletContextListener in your web.xml ?
>> >
>> > You could refer tohttp://
>> code.google.com/p/google-guice/wiki/Struts2Integration
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "google-guice" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/google-guice?hl=en.
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "google-guice" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-guice?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en.

Reply via email to