google-code-export / google-guice

Automatically exported from code.google.com/p/google-guice
Apache License 2.0
2 stars 1 forks source link

Need information about web.xml on Struts2Integration wiki page #423

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hello :) 
I've tried to create new struts2+guice application and use 
Struts2Integration wiki page as example. 
All fine except @SessionScoped. ServletScopes will not work untill you 
add GuiceFilter to your web.xml. 
Yes, it's clear if you made guice+servlet apllication before, but I 
didn't do it and spent much time to find the truth. 
Please add infromation about it to http://code.google.com/p/google-
guice/wiki/Struts2Integration 
My web.xml (not full): 
    <filter> 
        <filter-name>guiceFilter</filter-name> 
        <filter-class>com.google.inject.servlet.GuiceFilter</filter- 
class> 
    </filter> 
    <filter> 
        <filter-name>struts</filter-name> 
        <filter- 
class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter 
</ 
filter-class> 
    </filter> 
    <filter-mapping> 
        <filter-name>guiceFilter</filter-name> 
        <url-pattern>/*</url-pattern> 
    </filter-mapping> 
    <filter-mapping> 
        <filter-name>struts</filter-name> 
        <url-pattern>/*</url-pattern> 
    </filter-mapping> 

Original issue reported on code.google.com by aleksey....@gmail.com on 3 Sep 2009 at 2:33

GoogleCodeExporter commented 9 years ago
The latest web.xml linked on the documentation page includes GuiceFilter in it.

Original comment by sberlin on 20 Feb 2011 at 12:38