com.sptci.echo2.http
Class Servlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by nextapp.echo2.webrender.WebRenderServlet
              extended by nextapp.echo2.webcontainer.WebContainerServlet
                  extended by com.sptci.echo2.http.Servlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class Servlet
extends WebContainerServlet

Generic Echo2 Servlet Implementation. The following init-param parameters must be configured for the servlet.

  1. applicationInstance - The fully qualified name of the ApplicationInstance class to initialise in newApplicationInstance().
  2. contentPane - The fully qualified name of the ContentPane class to use in Application.init().
  3. styleSheet - The fully qualified name of the StyleSheet class to use in Application.init().
ApplicationInstance to be returned must be configured as an init-param in the web.xml descriptor for this servlet.

Copyright 2006 Sans Pareil Technologies, Inc.

Version:
$Id: Servlet.java 3217 2007-05-07 11:06:01Z rakesh $
Author:
Rakesh Vidyadharan 2006-11-23
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class nextapp.echo2.webrender.WebRenderServlet
WebRenderServlet.MultipartRequestWrapper
 
Field Summary
static String APPLICATION_INSTANCE
          The name of the init-param used to configure the name of the ApplicationInstance that is to be returned by this servlet.
protected  String className
          The fully qualified name of the ApplicationInstance class that will be returned by newApplicationInstance().
static String CONTENT_PANE
          The name of the init-param used to configure the name of the ContentPane that is to be set for Application.window in Application.init().
protected  String contentPane
          The fully qualified name of the ContentPane class that will be used in Application.init().
protected static Logger logger
          The logger used to log errors to.
static String STYLE_SHEET
          The name of the init-param used to configure the name of the StyleSheet that is to be set for Application in Application.init().
protected  String styleSheet
          The fully qualified name of StyleSheet class that will be used in Application.init().
protected  ThreadLocal<User> user
          A ThreadLocal field used to store the User object that represents the currently logged in user.
 
Fields inherited from class nextapp.echo2.webrender.WebRenderServlet
DISABLE_CACHING, SERVICE_ID_DEFAULT, SERVICE_ID_NEW_INSTANCE, SERVICE_ID_PARAMETER, SERVICE_ID_SESSION_EXPIRED
 
Constructor Summary
Servlet()
          Default constructor.
 
Method Summary
 void init()
          Over-ridden to load the application property file and set the necessary properties.
 ApplicationInstance newApplicationInstance()
          Implementation of mandatory method in WebContainerServlet.
protected  void process(HttpServletRequest request, HttpServletResponse response)
          Over-ridden to handle all uncaught exceptions.
 
Methods inherited from class nextapp.echo2.webrender.WebRenderServlet
doGet, doPost, getActiveConnection, getMultipartRequestWrapper, getServiceRegistry, setMultipartRequestWrapper
 
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
 

Field Detail

logger

protected static final Logger logger
The logger used to log errors to.


APPLICATION_INSTANCE

public static final String APPLICATION_INSTANCE
The name of the init-param used to configure the name of the ApplicationInstance that is to be returned by this servlet. "applicationInstance"

See Also:
Constant Field Values

CONTENT_PANE

public static final String CONTENT_PANE
The name of the init-param used to configure the name of the ContentPane that is to be set for Application.window in Application.init(). "contentPane"

See Also:
Constant Field Values

STYLE_SHEET

public static final String STYLE_SHEET
The name of the init-param used to configure the name of the StyleSheet that is to be set for Application in Application.init(). "styleSheet"

See Also:
Constant Field Values

className

protected String className
The fully qualified name of the ApplicationInstance class that will be returned by newApplicationInstance().


contentPane

protected String contentPane
The fully qualified name of the ContentPane class that will be used in Application.init().


styleSheet

protected String styleSheet
The fully qualified name of StyleSheet class that will be used in Application.init().


user

protected ThreadLocal<User> user
A ThreadLocal field used to store the User object that represents the currently logged in user. This is populated only for applications that require authentication and/or authorisation.

Constructor Detail

Servlet

public Servlet()
Default constructor. Set the system property for headless operation, in case we need access to the graphics context.

Method Detail

newApplicationInstance

public ApplicationInstance newApplicationInstance()
Implementation of mandatory method in WebContainerServlet.

Specified by:
newApplicationInstance in class WebContainerServlet
Returns:
Returns a new instance of the configured application instance.

init

public void init()
Over-ridden to load the application property file and set the necessary properties.

Overrides:
init in class GenericServlet

process

protected void process(HttpServletRequest request,
                       HttpServletResponse response)
                throws IOException,
                       ServletException
Over-ridden to handle all uncaught exceptions. The default action is to log the full stack trace for the error condition.

Overrides:
process in class WebRenderServlet
Throws:
IOException
ServletException