com.vaadin.terminal.gwt.server
Class GAEApplicationServlet

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

public class GAEApplicationServlet
extends ApplicationServlet

ApplicationServlet to be used when deploying to Google App Engine, in web.xml:

      <servlet>
              <servlet-name>HelloWorld</servlet-name>
              <servlet-class>com.vaadin.terminal.gwt.server.GAEApplicationServlet</servlet-class>
              <init-param>
                      <param-name>application</param-name>
                      <param-value>com.vaadin.demo.HelloWorld</param-value>
              </init-param>
      </servlet>
 
Session support must be enabled in appengine-web.xml:
      <sessions-enabled>true</sessions-enabled>
 
Appengine datastore cleanup can be invoked by calling one of the applications with an additional path "/CLEAN". This can be set up as a cron-job in cron.xml (see appengine documentation for more information):
 <cronentries>
   <cron>
     <url>/HelloWorld/CLEAN</url>
     <description>Clean up sessions</description>
     <schedule>every 2 hours</schedule>
   </cron>
 </cronentries>
 
It is recommended (but not mandatory) to extract themes and widgetsets and have App Engine server these statically. Extract VAADIN folder (and it's contents) 'next to' the WEB-INF folder, and add the following to appengine-web.xml:
      <static-files>
           <include path="/VAADIN/**" />
      </static-files>
 
Additional limitations:

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.vaadin.terminal.gwt.server.AbstractApplicationServlet
AbstractApplicationServlet.RequestError, AbstractApplicationServlet.RequestType
 
Field Summary
 
Fields inherited from interface com.vaadin.terminal.gwt.server.Constants
AJAX_UIDL_URI, DEFAULT_BUFFER_SIZE, DEFAULT_THEME_CACHETIME, DEFAULT_THEME_NAME, DEFAULT_WIDGETSET, ERROR_NO_ROOT_FOUND, INVALID_SECURITY_KEY_MSG, MAX_BUFFER_SIZE, NOT_PRODUCTION_MODE_INFO, PARAMETER_VAADIN_RESOURCES, PARAMETER_WIDGETSET, PORTAL_PARAMETER_VAADIN_RESOURCE_PATH, PORTAL_PARAMETER_VAADIN_THEME, PORTAL_PARAMETER_VAADIN_WIDGETSET, SERVLET_PARAMETER_DISABLE_XSRF_PROTECTION, SERVLET_PARAMETER_PRODUCTION_MODE, SERVLET_PARAMETER_RESOURCE_CACHE_TIME, THEME_DIRECTORY_PATH, URL_PARAMETER_CLOSE_APPLICATION, URL_PARAMETER_REPAINT_ALL, URL_PARAMETER_RESTART_APPLICATION, URL_PARAMETER_THEME, WARNING_RESOURCE_CACHING_TIME_NOT_NUMERIC, WARNING_XSRF_PROTECTION_DISABLED, WIDGETSET_DIRECTORY_PATH, WIDGETSET_MISMATCH_INFO
 
Constructor Summary
GAEApplicationServlet()
           
 
Method Summary
protected  ApplicationContext getApplicationContext(HttpServletRequest request, MemcacheService memcache)
           
protected  void sendCriticalErrorNotification(HttpServletRequest request, HttpServletResponse response)
           
protected  void sendDeadlineExceededNotification(HttpServletRequest request, HttpServletResponse response)
           
protected  void sendNotSerializableNotification(HttpServletRequest request, HttpServletResponse response)
           
protected  void service(HttpServletRequest request, HttpServletResponse response)
          Receives standard HTTP requests from the public service method and dispatches them.
 
Methods inherited from class com.vaadin.terminal.gwt.server.ApplicationServlet
getApplicationClass, getNewApplication, init
 
Methods inherited from class com.vaadin.terminal.gwt.server.AbstractApplicationServlet
createCommunicationManager, createWrappedRequest, criticalNotification, getApplicationContext, getApplicationProperty, getApplicationUrl, getClassLoader, getDefaultTheme, getDeploymentConfiguration, getExistingApplication, getRequestPathInfo, getRequestType, getResourceCacheTime, getResourceLocation, getResourcePath, getStaticFilesLocation, getSystemMessages, getSystemMessages, getSystemProperty, isAllowedVAADINResourceUrl, isProductionMode, safeEscapeForHtml, stripSpecialChars
 
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
 

Constructor Detail

GAEApplicationServlet

public GAEApplicationServlet()
Method Detail

sendDeadlineExceededNotification

protected void sendDeadlineExceededNotification(HttpServletRequest request,
                                                HttpServletResponse response)
                                         throws IOException
Throws:
IOException

sendNotSerializableNotification

protected void sendNotSerializableNotification(HttpServletRequest request,
                                               HttpServletResponse response)
                                        throws IOException
Throws:
IOException

sendCriticalErrorNotification

protected void sendCriticalErrorNotification(HttpServletRequest request,
                                             HttpServletResponse response)
                                      throws IOException
Throws:
IOException

service

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

Overrides:
service in class AbstractApplicationServlet
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.

getApplicationContext

protected ApplicationContext getApplicationContext(HttpServletRequest request,
                                                   MemcacheService memcache)


Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.