It's actually quite simple.
In your ServletModule.configureServlets(), you have all the methods that
you need :
-
bindListener(typeMatcher, listener);
-
getServletContext().setAttribute("productionMode", "true");
On Wednesday, September 12, 2012 9:04:42 AM UTC+2, Mathias Birkkjær Nielsen
wrote:
>
> I'm working on a web project using guice and guice servlet. I've already
> setup both guice filter and listener.
>
> With this setup I can emulate web.xml filters and servlets in a
> servletmodule using the serve(...) and filter(...) methods.
>
> Now the question:
>
> On the guice servlet page they claim that web.xml is no longer needed, but
> I have failed at figuring out how to:
>
> register contextlisteners (listener-tag in web.xml) and
>
> Add context-param (I an able to setup init-param thou)
>
> Is this even possible with guice servlet?
>
--
You received this message because you are subscribed to the Google Groups
"google-guice" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-guice/-/Dy6YIrXpv1AJ.
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.