public class Servlet extends WebContainerServlet
init-param
parameters must be configured for the servlet.
ApplicationInstance class to initialise in
newApplicationInstance().ContentPane
class to use in Application.init().StyleSheet
class to use in Application.init().In addition the followin optional parameters may be configured:
Copyright 2006 Sans Pareil Technologies, Inc.
WebContainerServlet.MultipartRequestWrapper| Modifier and Type | Field and Description |
|---|---|
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 Map<String,String> |
contextParameters
The map of all the context parameters specified for the web app.
|
static String |
DATA_DIRECTORY
The name of the
init-param used to specify the name
of the System Property that must be set for the JVM
that indicates the location of the root persistent state directory. |
protected String |
dataDirectory
The name of the system property used to specify the root directory
to use to store persistent state information.
|
protected static Logger |
logger
The logger used to log errors to.
|
protected ThreadLocal<Principal> |
principal
A
ThreadLocal field used to store the Principal object that represents the name of the current
authenticated user. |
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 MutableStyleSheet |
styleSheet
The global instance of the style sheet for the application
used in
Application.init(). |
protected ThreadLocal<User> |
user
A
ThreadLocal field used to store the User object that represents the currently
logged in user. |
DEBUG_PRINT_MESSAGES_TO_CONSOLE, DISABLE_CACHING, ENABLE_CLIENT_DEBUG_CONSOLE, INSTANCE_MODE_SINGLE, INSTANCE_MODE_WINDOW, SERVICE_ID_BLANK_DOCUMENT, SERVICE_ID_DEFAULT, SERVICE_ID_NEW_INSTANCE, SERVICE_ID_PARAMETER, SERVICE_ID_SESSION_EXPIRED, USER_INSTANCE_ID_PARAMETER| Constructor and Description |
|---|
Servlet()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getBookmarkIcon() |
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 |
populateContextParameters()
Populate
contextParameters with the information in web.xml. |
protected void |
process(HttpServletRequest request,
HttpServletResponse response)
Over-ridden to handle all uncaught exceptions.
|
protected void |
processBackground()
Set the background system property if specified in web.xml
|
protected void |
processLogo()
Configure the application logo is specified in web.xml
|
protected String |
processParameter(String name)
Search for the specified parameter in the servlet config or servlet
context and if available set a system property with the name-value
pair.
|
addInitScript, addInitStyleSheet, doGet, doPost, getActiveConnection, getInitScripts, getInitStyleSheets, getInstanceMode, getMultipartRequestWrapper, getResourceRegistry, getServiceRegistry, setMultipartRequestWrapperdoDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, servicedestroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, logprotected static final Logger logger
public static final String APPLICATION_INSTANCE
init-param used to configure the name
of the ApplicationInstance that is to be
returned by this servlet.
"applicationInstance"public static final String CONTENT_PANE
init-param used to configure the name
of the ContentPane that is to be set for
Application.window in Application.init().
"contentPane"public static final String STYLE_SHEET
init-param used to configure the name
of the StyleSheet that is to be set for
Application in Application.init().
"styleSheet"public static final String DATA_DIRECTORY
init-param used to specify the name
of the System Property that must be set for the JVM
that indicates the location of the root persistent state directory.
"dataDirectory"protected String className
ApplicationInstance class
that will be returned by newApplicationInstance().protected String contentPane
ContentPane class
that will be used in Application.init().protected MutableStyleSheet styleSheet
Application.init().protected String dataDirectory
protected final Map<String,String> contextParameters
protected transient ThreadLocal<User> user
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.protected transient ThreadLocal<Principal> principal
ThreadLocal field used to store the Principal object that represents the name of the current
authenticated user. This applies usually to container managed
authentication as opposed to user that applies to application
managed authentication.public Servlet()
public ApplicationInstance newApplicationInstance()
WebContainerServlet.newApplicationInstance in class WebContainerServletpublic String getBookmarkIcon()
getBookmarkIcon in class WebContainerServletfavicon.ico.public void init()
throws ServletException
init in class GenericServletServletException - If errors are encountered while initialising the
styleSheet.protected void populateContextParameters()
contextParameters with the information in web.xml.protected void processBackground()
protected void processLogo()
protected String processParameter(String name)
name - The name of the parameter to search for.protected void process(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
process in class WebContainerServletIOExceptionServletException