GWTP Dispatch Server Base 0.7-redhat-1

com.gwtplatform.dispatch.server
Class AbstractHttpSessionSecurityCookieFilter

java.lang.Object
  extended by com.gwtplatform.dispatch.server.AbstractHttpSessionSecurityCookieFilter
All Implemented Interfaces:
javax.servlet.Filter

public abstract class AbstractHttpSessionSecurityCookieFilter
extends Object
implements javax.servlet.Filter

This filter will automatically inject a security cookie inside the request the first time the page is loaded. This security cookie is based on the HttpSession and will only work if the session is enabled. To setup this filter, add the following line at before any other serve call in your own com.google.inject.servlet.ServletModule#configureServlets:

 filter("*.jsp").through(HttpSessionSecurityCookieFilter.class);
 
You also have to use a .jsp file instead of a .html as your main GWT file.

Author:
Philippe Beaudoin

Constructor Summary
protected AbstractHttpSessionSecurityCookieFilter(String securityCookieName)
           
 
Method Summary
 void destroy()
           
 void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)
           
protected abstract  javax.servlet.http.HttpSession getSession()
           
 void init(javax.servlet.FilterConfig filterConfig)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractHttpSessionSecurityCookieFilter

protected AbstractHttpSessionSecurityCookieFilter(String securityCookieName)
Method Detail

destroy

public void destroy()
Specified by:
destroy in interface javax.servlet.Filter

getSession

protected abstract javax.servlet.http.HttpSession getSession()

doFilter

public void doFilter(javax.servlet.ServletRequest request,
                     javax.servlet.ServletResponse response,
                     javax.servlet.FilterChain chain)
              throws IOException,
                     javax.servlet.ServletException
Specified by:
doFilter in interface javax.servlet.Filter
Throws:
IOException
javax.servlet.ServletException

init

public void init(javax.servlet.FilterConfig filterConfig)
          throws javax.servlet.ServletException
Specified by:
init in interface javax.servlet.Filter
Throws:
javax.servlet.ServletException

GWTP Dispatch Server Base 0.7-redhat-1

Copyright © 2010-2013 JBoss by Red Hat. All Rights Reserved.