com.pmdesigns.jvc
Class JVCDispatcher

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.pmdesigns.jvc.JVCDispatcher
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class JVCDispatcher
extends javax.servlet.http.HttpServlet

JVC request dispatching servlet

Author:
mike dooley
See Also:
Serialized Form

Field Summary
static java.lang.String PKG_PREFIX_KEY
           
 
Constructor Summary
JVCDispatcher()
           
 
Method Summary
 void destroy()
          Notify the Application that its shutdown time.
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handle a GET request.
 void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handle a POST request.
static JVCRequestContext getRC()
          Return the thread local request context
 void init()
          Get the package prefix (from config) so we know the fully qualified name of page generators and controllers.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PKG_PREFIX_KEY

public static final java.lang.String PKG_PREFIX_KEY
See Also:
Constant Field Values
Constructor Detail

JVCDispatcher

public JVCDispatcher()
Method Detail

getRC

public static JVCRequestContext getRC()
Return the thread local request context

Returns:
the JVCRequestContext associated with the current thread or null

init

public void init()
Get the package prefix (from config) so we know the fully qualified name of page generators and controllers. Also create and instance of the Application object.

Overrides:
init in class javax.servlet.GenericServlet

destroy

public void destroy()
Notify the Application that its shutdown time.

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

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws java.io.IOException,
                  javax.servlet.ServletException
Handle a GET request. Called by servlet container.

Overrides:
doGet in class javax.servlet.http.HttpServlet
Parameters:
request -
response -
Throws:
java.io.IOException
javax.servlet.ServletException

doPost

public void doPost(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws java.io.IOException,
                   javax.servlet.ServletException
Handle a POST request. Called by servlet container.

Overrides:
doPost in class javax.servlet.http.HttpServlet
Parameters:
request -
response -
Throws:
java.io.IOException
javax.servlet.ServletException