wheel
Class WheelServlet

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

public class WheelServlet
extends javax.servlet.http.HttpServlet

The servlet that handles all requests to Wheel. Has three functions:

  1. Reads configuration from web.xml.
  2. Dispatches requests to EngineImpl
  3. Isolates the wheel.enhance.WheelClassLoader from other classloaders to enable non-delegating class loading.
Configuration settings:
basePackageForPages
Mandatory. Tells Wheel where to load pages. The value must be a java package name that is given up to the point where Wheel sould start loading pages. Example: Your page-classes are in com.foo.bar.pages -package which is what you'd set as the value for this parameter. When the application starts, all pages that are in that package can be viewed by simply appending the page class name at the end of the url. Also sub-packages for the given package are available by appending also the sub-packagename to the url and replacing '.' with '/'. So for example "admin/Main" would load the class com.foo.bar.pages.admin.Main.
applicationPackages
Mandatory. All packages that will contain pages or components used by your application should be here, inlcuding the package given in basePackageForPages. For example if you use components from an external jar, you need to add the package here. Package names are separated by comma.
cssPath
Optional. Sets the path relative to the application root where css-files are. The default is: "css"
jsPath
Optional. Sets the path relative to the application root where js-files are. The default is: "js"
startPage
Optional. Sets the page to load when no page is given. The default is: "Home"
developmentMode
Optional. Enables automatic class reloading. Will slow the application down considrebaly, use with caution.. The default is: "false"
watchForUpdate
Optional. When developmentMode is set on, this setting can be used to add additional locations to check for modified files. The comma-separated entries can be either context-related files (starting with '/') or relative file paths relative to the startup directory.

Author:
Henri Frilund
See Also:
Serialized Form

Constructor Summary
WheelServlet()
           
 
Method Summary
 void doGet(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse)
           
 void doPost(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse)
           
 void init(javax.servlet.ServletConfig servletConfig)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, 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
 

Constructor Detail

WheelServlet

public WheelServlet()
Method Detail

doGet

public void doGet(javax.servlet.http.HttpServletRequest httpServletRequest,
                  javax.servlet.http.HttpServletResponse httpServletResponse)
           throws javax.servlet.ServletException,
                  java.io.IOException
Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException

doPost

public void doPost(javax.servlet.http.HttpServletRequest httpServletRequest,
                   javax.servlet.http.HttpServletResponse httpServletResponse)
            throws javax.servlet.ServletException,
                   java.io.IOException
Overrides:
doPost in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException

init

public void init(javax.servlet.ServletConfig servletConfig)
          throws javax.servlet.ServletException
Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException


Copyright © 2007-2008. All Rights Reserved.