public class GAEVaadinServlet extends VaadinServlet
<servlet> <servlet-name>HelloWorld</servlet-name> <servlet-class>com.vaadin.server.GAEApplicationServlet</servlet-class> <init-param> <param-name>UI</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:
VaadinServlet.RequestType
ATMOSPHERE_MISSING_ERROR, CANNOT_ACQUIRE_CLASSLOADER_SEVERE, 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, PORTLET_CONTEXT, 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_DESIGN_PREFIX, SERVLET_PARAMETER_LEGACY_PROPERTY_TOSTRING, SERVLET_PARAMETER_PRODUCTION_MODE, SERVLET_PARAMETER_PUSH_MODE, SERVLET_PARAMETER_PUSH_SUSPEND_TIMEOUT_LONGPOLLING, SERVLET_PARAMETER_RESOURCE_CACHE_TIME, SERVLET_PARAMETER_SENDURLSASPARAMETERS, SERVLET_PARAMETER_SYNC_ID_CHECK, 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
Constructor and Description |
---|
GAEVaadinServlet() |
Modifier and Type | Method and Description |
---|---|
protected VaadinSession |
getApplicationContext(javax.servlet.http.HttpServletRequest request,
MemcacheService memcache) |
protected int |
getMaxInactiveIntervalSeconds(javax.servlet.http.HttpSession session)
Returns the maximum inactive time for a session.
|
protected void |
sendCriticalErrorNotification(VaadinServletRequest request,
VaadinServletResponse response) |
protected void |
sendDeadlineExceededNotification(VaadinServletRequest request,
VaadinServletResponse response) |
protected void |
sendNotSerializableNotification(VaadinServletRequest request,
VaadinServletResponse response) |
protected void |
service(javax.servlet.http.HttpServletRequest unwrappedRequest,
javax.servlet.http.HttpServletResponse unwrappedResponse)
Receives standard HTTP requests from the public service method and
dispatches them.
|
allowServePrecompressedResource, createDeploymentConfiguration, createServletService, createVaadinRequest, criticalNotification, destroy, findResourceURL, getApplicationUrl, getCacheTime, getCurrent, getDefaultTheme, getLastPathParameter, getRequestType, getResourcePath, getService, handleContextRootWithoutSlash, init, isAllowedVAADINResourceUrl, isStaticResourceRequest, safeEscapeForHtml, serveStaticResources, serveStaticResourcesInVAADIN, servletInitialized, stripSpecialChars, writeStaticResourceResponse
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
protected void sendDeadlineExceededNotification(VaadinServletRequest request, VaadinServletResponse response) throws IOException
IOException
protected void sendNotSerializableNotification(VaadinServletRequest request, VaadinServletResponse response) throws IOException
IOException
protected void sendCriticalErrorNotification(VaadinServletRequest request, VaadinServletResponse response) throws IOException
IOException
protected void service(javax.servlet.http.HttpServletRequest unwrappedRequest, javax.servlet.http.HttpServletResponse unwrappedResponse) throws javax.servlet.ServletException, IOException
VaadinServlet
service
in class VaadinServlet
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.javax.servlet.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.protected int getMaxInactiveIntervalSeconds(javax.servlet.http.HttpSession session)
session
- protected VaadinSession getApplicationContext(javax.servlet.http.HttpServletRequest request, MemcacheService memcache) throws javax.servlet.ServletException
javax.servlet.ServletException
Copyright © 2019 Vaadin Ltd. All rights reserved.