I used the GuiceWebApplicationFactory as follows in my web.xml:

  <display-name>my_project</display-name>
    <filter>
        <filter-name>MyProjectFilter</filter-name>

<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>

        <init-param>
            <param-name>applicationClassName</param-name>
            <param-value>com.myproject.Application</param-value>
        </init-param>
        <init-param>
           <param-name>applicationFactoryClassName</param-name>

 <param-value>org.apache.wicket.guice.GuiceWebApplicationFactory</param-value>
        </init-param>
        <init-param>
           <param-name>module</param-name>
           <param-value>com.myproject.GuiceModule</param-value>
        </init-param>
        <init-param>
           <param-name>wicket-guice.stage</param-name>
           <param-value>PRODUCTION</param-value>
        </init-param>
        <init-param>
            <param-name>configuration</param-name>
            <param-value>deployment</param-value>
        </init-param>
    </filter>


Then in the GuiceModule I link up the important bits:

    @Override
    protected void configure() {
        bind(WebApplication.class).to(Application.class);
    }

I haven't used @SessionScoped or @RequestScoped at all so I cannot help
with that. Otherwise, everything works as expected...

Bill-


On Fri, Jan 11, 2013 at 4:41 PM, Eric Jablow <erjab...@gmail.com> wrote:

> Sirs:
>
> How do I take a Wicket-Guice project using the
> GuiceWebApplicationFactory and add support for @SessionScoped and
> @RequestScoped? I tried adding the GuiceFilter before that, but I did
> not add the Guice ServletModule; would that interfere with the web
> application factory? Do I add the ServletModule to module we are
> using, or do I even extend ServletModule?
>
> Respectfully,
> Eric Jablow
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to