org.javaWebGen
Class ControllerServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.javaWebGen.ControllerServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class ControllerServlet
extends javax.servlet.http.HttpServlet

See Also:
Serialized Form

Field Summary
static java.lang.String ERROR_PAGE
           
 java.util.HashMap<java.lang.String,WebController> mapping
           
static java.lang.String PAGE
           
 
Constructor Summary
ControllerServlet()
           
 
Method Summary
 void init(javax.servlet.ServletConfig config)
          read config file location if it exists xml file location
 void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Main web controller entry point calls a registered Web Controller based on a req.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, 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

PAGE

public static final java.lang.String PAGE
See Also:
Constant Field Values

ERROR_PAGE

public static final java.lang.String ERROR_PAGE
See Also:
Constant Field Values

mapping

public java.util.HashMap<java.lang.String,WebController> mapping
Constructor Detail

ControllerServlet

public ControllerServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
read config file location if it exists xml file location

Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet
Parameters:
config -
Throws:
javax.servlet.ServletException

service

public void service(javax.servlet.http.HttpServletRequest req,
                    javax.servlet.http.HttpServletResponse res)
             throws javax.servlet.ServletException,
                    java.io.IOException
Main web controller entry point calls a registered Web Controller based on a req. parm called page(page=) jumps to a URL returned by the WebController

Overrides:
service in class javax.servlet.http.HttpServlet
Parameters:
req -
res -
Throws:
javax.servlet.ServletException
java.io.IOException


Copyright(C) 2003-2006 Kevin Scott - All Rights Reserved.