guice « Filter « JSP-Servlet Q&A





1. How to do filter-mapping with servlet-name in Guice Servlet?    stackoverflow.com

In my web.xml I have

<filter>
    <filter-name>authFilter</filter-name>
    <filter-class>com.mystuff.AuthFilter</filter-class>
</filter>

<filter-mapping>
    <filter-name>authFilter</filter-name>
    <servlet-name>requestFactoryServlet</servlet-name>
</filter-mapping>

<!-- Servlets -->
<servlet>
    <servlet-name>requestFactoryServlet</servlet-name>
  ...

2. bindInterceptor vs filter for guice security?    stackoverflow.com

I have a simple use case where I want to grab a session variable at the beginning of the session and only allow access to certain pages based on the result. ...