com.vaadin.server
Class GAEVaadinServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.vaadin.server.VaadinServlet
com.vaadin.server.GAEVaadinServlet
- All Implemented Interfaces:
- Constants, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public class GAEVaadinServlet
- extends VaadinServlet
ApplicationServlet to be used when deploying to Google App Engine, in
web.xml:
<servlet>
<servlet-name>HelloWorld</servlet-name>
<servlet-class>com.vaadin.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:
Do not change application state when serving an ApplicationResource.
Avoid changing application state in transaction handlers, unless you're
confident you fully understand the synchronization issues in App Engine.
The application remains locked while uploading - no progressbar is
possible.
- See Also:
- Serialized Form
Fields inherited from interface com.vaadin.server.Constants |
ATMOSPHERE_MISSING_ERROR, DEFAULT_BUFFER_SIZE, DEFAULT_THEME_CACHETIME, DEFAULT_THEME_NAME, DEFAULT_WIDGETSET, ERROR_NO_UI_FOUND, INVALID_ATMOSPHERE_VERSION_WARNING, 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, PUSH_NOT_SUPPORTED_ERROR, REQUIRED_ATMOSPHERE_RUNTIME_VERSION, SERVLET_PARAMETER_CLOSE_IDLE_SESSIONS, SERVLET_PARAMETER_DISABLE_XSRF_PROTECTION, SERVLET_PARAMETER_HEARTBEAT_INTERVAL, SERVLET_PARAMETER_LEGACY_PROPERTY_TOSTRING, SERVLET_PARAMETER_PRODUCTION_MODE, SERVLET_PARAMETER_PUSH_MODE, SERVLET_PARAMETER_RESOURCE_CACHE_TIME, SERVLET_PARAMETER_UI_PROVIDER, THEME_DIR_PATH, URL_PARAMETER_THEME, WARNING_HEARTBEAT_INTERVAL_NOT_NUMERIC, WARNING_LEGACY_PROPERTY_TOSTRING, WARNING_PUSH_MODE_NOT_RECOGNIZED, WARNING_RESOURCE_CACHING_TIME_NOT_NUMERIC, WARNING_UNKNOWN_LEGACY_PROPERTY_TOSTRING_VALUE, WARNING_XSRF_PROTECTION_DISABLED, WIDGETSET_DIR_PATH, WIDGETSET_MISMATCH_INFO |
Methods inherited from class com.vaadin.server.VaadinServlet |
createDeploymentConfiguration, createServletService, createVaadinRequest, criticalNotification, destroy, getApplicationUrl, getCurrent, getDefaultTheme, getRequestType, getResourcePath, getService, handleContextRootWithoutSlash, init, isAllowedVAADINResourceUrl, isStaticResourceRequest, safeEscapeForHtml, servletInitialized, stripSpecialChars, writeStaticResourceResponse |
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service |
Methods inherited from class javax.servlet.GenericServlet |
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 |
GAEVaadinServlet
public GAEVaadinServlet()
sendDeadlineExceededNotification
protected void sendDeadlineExceededNotification(VaadinServletRequest request,
VaadinServletResponse response)
throws java.io.IOException
- Throws:
java.io.IOException
sendNotSerializableNotification
protected void sendNotSerializableNotification(VaadinServletRequest request,
VaadinServletResponse response)
throws java.io.IOException
- Throws:
java.io.IOException
sendCriticalErrorNotification
protected void sendCriticalErrorNotification(VaadinServletRequest request,
VaadinServletResponse response)
throws java.io.IOException
- Throws:
java.io.IOException
service
protected void service(javax.servlet.http.HttpServletRequest unwrappedRequest,
javax.servlet.http.HttpServletResponse unwrappedResponse)
throws javax.servlet.ServletException,
java.io.IOException
- Description copied from class:
VaadinServlet
- Receives standard HTTP requests from the public service method and
dispatches them.
- Overrides:
service
in class VaadinServlet
- Parameters:
unwrappedRequest
- the object that contains the request the client made of the
servlet.unwrappedResponse
- the object that contains the response the servlet returns to
the client.
- Throws:
javax.servlet.ServletException
- if an input or output error occurs while the servlet is
handling the TRACE request.
java.io.IOException
- if the request for the TRACE cannot be handled.
getMaxInactiveIntervalSeconds
protected int getMaxInactiveIntervalSeconds(javax.servlet.http.HttpSession session)
- Returns the maximum inactive time for a session. This is used for
handling the expiration of session related information in caches etc.
- Parameters:
session
-
- Returns:
- inactive timeout in seconds, greater than zero
getApplicationContext
protected VaadinSession getApplicationContext(javax.servlet.http.HttpServletRequest request,
com.google.appengine.api.memcache.MemcacheService memcache)
throws javax.servlet.ServletException
- Throws:
javax.servlet.ServletException
Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.