com.itmill.toolkit.terminal.gwt.server
Class ApplicationServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.itmill.toolkit.terminal.gwt.server.ApplicationServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class ApplicationServlet
extends HttpServlet

This servlet connects IT Mill Toolkit Application to Web.

Since:
5.0
Version:
5.3.0
Author:
IT Mill Ltd.
See Also:
Serialized Form

Nested Class Summary
 class ApplicationServlet.ParameterHandlerErrorImpl
          Implementation of ParameterHandler.ErrorEvent interface.
 class ApplicationServlet.RequestError
           
 class ApplicationServlet.URIHandlerErrorImpl
          Implementation of URIHandler.ErrorEvent interface.
 
Field Summary
protected static HashMap<Application,CommunicationManager> applicationToAjaxAppMgrMap
           
static String REQUEST_APPSTYLE
          This request attribute is used to add styles to the main element.
static String REQUEST_FRAGMENT
          If the attribute is present in the request, a html fragment will be written instead of a whole page.
static String REQUEST_WIDGETSET
          This request attribute forces widgetset used; e.g for portlets that can not have different widgetsets.
static String VERSION
          Version number of this release.
static String VERSION_BUILD
          Builds number.
static int VERSION_MAJOR
          Major version number.
static int VERSION_MINOR
          Minor version number.
 
Constructor Summary
ApplicationServlet()
           
 
Method Summary
protected  String getNoScriptMessage()
          Returns a message printed for browsers without scripting support or if browsers scripting support is disabled.
 String getResourceLocation(String theme, ThemeResource resource)
          Gets relative location of a theme resource.
protected static String getResourcePath(ServletContext servletContext, String path)
          Gets resource path using different implementations.
 void init(ServletConfig servletConfig)
          Called by the servlet container to indicate to a servlet that the servlet is being placed into service.
 boolean isProductionMode()
          Returns true if the servlet is running in production mode.
protected  void service(HttpServletRequest request, HttpServletResponse response)
          Receives standard HTTP requests from the public service method and dispatches them.
 
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

VERSION

public static final String VERSION
Version number of this release. For example "5.0.0".


VERSION_MAJOR

public static final int VERSION_MAJOR
Major version number. For example 5 in 5.1.0.


VERSION_MINOR

public static final int VERSION_MINOR
Minor version number. For example 1 in 5.1.0.


VERSION_BUILD

public static final String VERSION_BUILD
Builds number. For example 0-custom_tag in 5.0.0-custom_tag.


REQUEST_FRAGMENT

public static final String REQUEST_FRAGMENT
If the attribute is present in the request, a html fragment will be written instead of a whole page.


REQUEST_WIDGETSET

public static final String REQUEST_WIDGETSET
This request attribute forces widgetset used; e.g for portlets that can not have different widgetsets.


REQUEST_APPSTYLE

public static final String REQUEST_APPSTYLE
This request attribute is used to add styles to the main element. E.g "height:500px" generates a style="height:500px" to the main element, useful from some embedding situations (e.g portlet include.)


applicationToAjaxAppMgrMap

protected static HashMap<Application,CommunicationManager> applicationToAjaxAppMgrMap
Constructor Detail

ApplicationServlet

public ApplicationServlet()
Method Detail

init

public void init(ServletConfig servletConfig)
          throws ServletException
Called by the servlet container to indicate to a servlet that the servlet is being placed into service.

Specified by:
init in interface Servlet
Overrides:
init in class GenericServlet
Parameters:
servletConfig - the object containing the servlet's configuration and initialization parameters
Throws:
ServletException - if an exception has occurred that interferes with the servlet's normal operation.

service

protected void service(HttpServletRequest request,
                       HttpServletResponse response)
                throws ServletException,
                       IOException
Receives standard HTTP requests from the public service method and dispatches them.

Overrides:
service in class HttpServlet
Parameters:
request - the object that contains the request the client made of the servlet.
response - the object that contains the response the servlet returns to the client.
Throws:
ServletException - if an input or output error occurs while the servlet is handling the TRACE request.
IOException - if the request for the TRACE cannot be handled.

getNoScriptMessage

protected String getNoScriptMessage()
Returns a message printed for browsers without scripting support or if browsers scripting support is disabled.


getResourceLocation

public String getResourceLocation(String theme,
                                  ThemeResource resource)
Gets relative location of a theme resource.

Parameters:
theme - the Theme name.
resource - the Theme resource.
Returns:
External URI specifying the resource

getResourcePath

protected static String getResourcePath(ServletContext servletContext,
                                        String path)
Gets resource path using different implementations. Required to supporting different servlet container implementations (application servers).

Parameters:
servletContext -
path - the resource path.
Returns:
the resource path.

isProductionMode

public boolean isProductionMode()
Returns true if the servlet is running in production mode. Production mode disables all debug facilities.

Returns:
true if in production mode, false if in debug mode


Copyright © 2000-2009 IT Mill Ltd. All Rights Reserved.