net.craftforge.essential.example.servlets
Class FrontServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by net.craftforge.essential.context.servlet.EssentialHttpServlet
              extended by net.craftforge.essential.example.servlets.FrontServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class FrontServlet
extends EssentialHttpServlet

A front servlet extends the default essential http servlet by overriding the controller configuration creation.

Since:
07.08.11
Author:
Christian Bick
See Also:
Serialized Form

Constructor Summary
FrontServlet()
           
 
Method Summary
protected  net.craftforge.essential.controller.Configuration getControllerConfiguration(javax.servlet.http.HttpServletRequest servletRequest)
          Gets the controller configuration from the given HTTP servlet.
 
Methods inherited from class net.craftforge.essential.context.servlet.EssentialHttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, getControllerPackage, getControllerRequest, getControllerResponse
 
Methods inherited from class javax.servlet.http.HttpServlet
doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, 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
 

Constructor Detail

FrontServlet

public FrontServlet()
Method Detail

getControllerConfiguration

protected net.craftforge.essential.controller.Configuration getControllerConfiguration(javax.servlet.http.HttpServletRequest servletRequest)
Gets the controller configuration from the given HTTP servlet. Assigns a database for the requesting remote host depending on its client host name. The resulting database name is then set as a configuration property which can be accessed by resources via @Property("databaseName").

Overrides:
getControllerConfiguration in class EssentialHttpServlet
Parameters:
servletRequest - The http servlet request
Returns:
The controller configuration


Copyright © 2011. All Rights Reserved.