net.jot.web
Class JOTMainFilter

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by net.jot.web.JOTMainFilter
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Filter, javax.servlet.Servlet, javax.servlet.ServletConfig

public class JOTMainFilter
extends javax.servlet.http.HttpServlet
implements javax.servlet.Filter

This is the Main entry point for JOT when used in a webapp This is the main object, that will catch all the requests and process them. This filter MUST be regsitered in web.xml for requests to be processed by JOT

Author:
thibautc
See Also:
Serialized Form

Field Summary
protected  java.lang.String confPath
           
protected static java.lang.String context
           
protected  javax.servlet.FilterConfig filterConfig
           
protected  JOTFlowConfig flowConfig
           
protected  boolean sendToContainer
           
 
Constructor Summary
JOTMainFilter()
           
 
Method Summary
 void destroy()
          try to cleanup all used resources at shutdown.
 void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain filterChain)
          Main request processing method, process a user web request.
static java.lang.String getContextName()
          Returns the servlet context name: ie /mywebapp/
protected  java.lang.String getURI(javax.servlet.ServletRequest request)
           
 void init(javax.servlet.FilterConfig filterConfig)
          Initialize the filter, calls the JOT initialization as well.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filterConfig

protected javax.servlet.FilterConfig filterConfig

confPath

protected java.lang.String confPath

flowConfig

protected JOTFlowConfig flowConfig

context

protected static java.lang.String context

sendToContainer

protected boolean sendToContainer
Constructor Detail

JOTMainFilter

public JOTMainFilter()
Method Detail

init

public void init(javax.servlet.FilterConfig filterConfig)
Initialize the filter, calls the JOT initialization as well. Loads and validate the jot.conf file right away. If this succeeds, JOT should be ready to go. If there is an error, fail right away so the use knows there is a problem right of the bat.

Specified by:
init in interface javax.servlet.Filter

doFilter

public void doFilter(javax.servlet.ServletRequest request,
                     javax.servlet.ServletResponse response,
                     javax.servlet.FilterChain filterChain)
              throws java.io.IOException,
                     javax.servlet.ServletException
Main request processing method, process a user web request.

Specified by:
doFilter in interface javax.servlet.Filter
Throws:
java.io.IOException
javax.servlet.ServletException

getURI

protected java.lang.String getURI(javax.servlet.ServletRequest request)

destroy

public void destroy()
try to cleanup all used resources at shutdown.

Specified by:
destroy in interface javax.servlet.Filter
Specified by:
destroy in interface javax.servlet.Servlet
Overrides:
destroy in class javax.servlet.GenericServlet

getContextName

public static java.lang.String getContextName()
Returns the servlet context name: ie /mywebapp/

Returns: