|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.vaadin.server.VaadinServlet
public class VaadinServlet
Nested Class Summary | |
---|---|
protected static class |
VaadinServlet.RequestType
Deprecated. As of 7.0. This is no longer used and only provided for backwards compatibility. Each RequestHandler can
individually decide whether it wants to handle a request or
not. |
Field Summary |
---|
Constructor Summary | |
---|---|
VaadinServlet()
|
Method Summary | |
---|---|
protected boolean |
allowServePrecompressedResource(javax.servlet.http.HttpServletRequest request,
java.lang.String url)
Returns whether this servlet should attempt to serve a precompressed version of the given static resource. |
protected DeploymentConfiguration |
createDeploymentConfiguration(java.util.Properties initParameters)
|
protected VaadinServletService |
createServletService(DeploymentConfiguration deploymentConfiguration)
|
protected VaadinServletRequest |
createVaadinRequest(javax.servlet.http.HttpServletRequest request)
Create a Vaadin request for a http servlet request. |
protected void |
criticalNotification(VaadinServletRequest request,
VaadinServletResponse response,
java.lang.String caption,
java.lang.String message,
java.lang.String details,
java.lang.String url)
Deprecated. As of 7.0. This method is retained only for backwards compatibility and for GAEVaadinServlet . |
void |
destroy()
|
protected java.net.URL |
getApplicationUrl(javax.servlet.http.HttpServletRequest request)
Deprecated. As of 7.0. Will likely change or be removed in a future version |
protected int |
getCacheTime(java.lang.String filename)
Calculates the cache lifetime for the given filename in seconds. |
static VaadinServlet |
getCurrent()
Gets the currently used Vaadin servlet. |
static java.lang.String |
getDefaultTheme()
Returns the default theme. |
protected static java.lang.String |
getLastPathParameter(java.lang.String uri)
Finds any path parameter added to the last part of the uri. |
protected VaadinServlet.RequestType |
getRequestType(VaadinServletRequest request)
Deprecated. As of 7.0. This is no longer used and only provided for backwards compatibility. Each RequestHandler can
individually decide whether it wants to handle a request or
not. |
protected static java.lang.String |
getResourcePath(javax.servlet.ServletContext servletContext,
java.lang.String path)
Deprecated. As of 7.0. Will likely change or be removed in a future version |
protected VaadinServletService |
getService()
Gets a the vaadin service for this servlet. |
protected boolean |
handleContextRootWithoutSlash(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Invoked for every request to this servlet to potentially send a redirect to avoid problems with requests to the context root with no trailing slash. |
void |
init(javax.servlet.ServletConfig servletConfig)
Called by the servlet container to indicate to a servlet that the servlet is being placed into service. |
protected boolean |
isAllowedVAADINResourceUrl(javax.servlet.http.HttpServletRequest request,
java.net.URL resourceUrl)
Deprecated. As of 7.0. Will likely change or be removed in a future version |
protected boolean |
isStaticResourceRequest(javax.servlet.http.HttpServletRequest request)
|
static java.lang.String |
safeEscapeForHtml(java.lang.String unsafe)
Deprecated. As of 7.0. Will likely change or be removed in a future version |
protected void |
service(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Receives standard HTTP requests from the public service method and dispatches them. |
protected void |
servletInitialized()
|
static java.lang.String |
stripSpecialChars(java.lang.String themeName)
Deprecated. As of 7.0. Will likely change or be removed in a future version |
protected void |
writeStaticResourceResponse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.net.URL resourceUrl)
Writes the contents of the given resourceUrl in the response. |
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 |
Constructor Detail |
---|
public VaadinServlet()
Method Detail |
---|
public void init(javax.servlet.ServletConfig servletConfig) throws javax.servlet.ServletException
init
in interface javax.servlet.Servlet
init
in class javax.servlet.GenericServlet
servletConfig
- the object containing the servlet's configuration and
initialization parameters
javax.servlet.ServletException
- if an exception has occurred that interferes with the
servlet's normal operation.protected void servletInitialized() throws javax.servlet.ServletException
javax.servlet.ServletException
public static VaadinServlet getCurrent()
InheritableThreadLocal
). In other cases,
(e.g. from background threads started in some other way), the current
servlet is not automatically defined.
The current servlet is derived from the current service using
VaadinService.getCurrent()
null
protected DeploymentConfiguration createDeploymentConfiguration(java.util.Properties initParameters)
protected VaadinServletService createServletService(DeploymentConfiguration deploymentConfiguration) throws ServiceException
ServiceException
protected void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
service
in class javax.servlet.http.HttpServlet
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.
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.protected boolean handleContextRootWithoutSlash(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
request
- the processed requestresponse
- the processed response
true
if a redirect has been sent and the request
should not be processed further; false
if the
request should be processed as usual
java.io.IOException
- If an input or output exception occursprotected static java.lang.String getLastPathParameter(java.lang.String uri)
For example the uri http://myhost.com/foo;a=1/bar;b=1 contains two path parameters, a=1 related to /foo and b=1 related to /bar.
For http://myhost.com/foo;a=1/bar;b=1 this method will return ;b=1
uri
- a URI
protected VaadinServletRequest createVaadinRequest(javax.servlet.http.HttpServletRequest request)
request
- the original http servlet request
protected VaadinServletService getService()
@Deprecated protected void criticalNotification(VaadinServletRequest request, VaadinServletResponse response, java.lang.String caption, java.lang.String message, java.lang.String details, java.lang.String url) throws java.io.IOException
GAEVaadinServlet
.
request
- the HTTP request instance.response
- the HTTP response to write to.caption
- the notification captionmessage
- to notification bodydetails
- a detail message to show in addition to the message. Currently
shown directly below the message but could be hidden behind a
details drop down in the future. Mainly used to give
additional information not necessarily useful to the end user.url
- url to load when the message is dismissed. Null will reload
the current page.
java.io.IOException
- if the writing failed due to input/output error.@Deprecated protected static java.lang.String getResourcePath(javax.servlet.ServletContext servletContext, java.lang.String path)
servletContext
- path
- the resource path.
@Deprecated public static java.lang.String stripSpecialChars(java.lang.String themeName)
themeName
-
public static java.lang.String getDefaultTheme()
protected int getCacheTime(java.lang.String filename)
filename
-
protected void writeStaticResourceResponse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.net.URL resourceUrl) throws java.io.IOException
request
- The request for the resourceresponse
- The responseresourceUrl
- The url to send
java.io.IOException
protected boolean allowServePrecompressedResource(javax.servlet.http.HttpServletRequest request, java.lang.String url)
.gz
is appended to the URL and the corresponding resource
is served if it exists. It is assumed that the compression method used is
gzip. If this method returns false or a compressed version is not found,
the original URL is used.
The base implementation of this method returns true if and only if the
request indicates that the client accepts gzip compressed responses and
the filename extension of the requested resource is .js, .css, or .html.
request
- the request for the resourceurl
- the URL of the requested resource
@Deprecated protected boolean isAllowedVAADINResourceUrl(javax.servlet.http.HttpServletRequest request, java.net.URL resourceUrl)
request
- resourceUrl
-
@Deprecated protected VaadinServlet.RequestType getRequestType(VaadinServletRequest request)
RequestHandler
can
individually decide whether it wants to handle a request or
not.
request
-
protected boolean isStaticResourceRequest(javax.servlet.http.HttpServletRequest request)
@Deprecated protected java.net.URL getApplicationUrl(javax.servlet.http.HttpServletRequest request) throws java.net.MalformedURLException
request
- the HTTP request.
java.net.MalformedURLException
- if the application is denied access to the persistent data
store represented by the given URL.public void destroy()
destroy
in interface javax.servlet.Servlet
destroy
in class javax.servlet.GenericServlet
@Deprecated public static final java.lang.String safeEscapeForHtml(java.lang.String unsafe)
unsafe
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |