Overview | Package | Class | Use | Deprecated | Help
| GWT 2.7.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.gwt.core.server
Class GwtServletBase

    java.lang.Object
      javax.servlet.GenericServlet
          javax.servlet.http.HttpServlet
              com.google.gwt.core.server.GwtServletBase

All Implemented Interfaces:
  java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

    public class GwtServletBase

extends javax.servlet.http.HttpServlet

Base servlet for GWT server-side code which extracts properties from the request and sets them for this thread.

For now, subclasses should override `init()` and set the locale configuration fields - eventually this will be read from a deploy artifact.

See Also:
  Serialized Form

Field Summary
`protected java.lang.String` | `defaultLocale`
`protected java.lang.String` | `localeCookie`
`protected java.lang.String` | `localeQueryParam`
`protected java.lang.String[]` | `localeSearchOrder`

Constructor Summary
`GwtServletBase()`

Method Summary
`protected java.lang.String` | `getCookie(javax.servlet.http.HttpServletRequest req, java.lang.String cookieName)` Fetch a cookie from the HTTP request.
`protected java.lang.String` | `getGwtLocale(javax.servlet.http.HttpServletRequest req)` Get the GWT locale to use from this request.
`void` | `init()`
`protected void` | `service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)`
`protected void` | `setGwtProperties(javax.servlet.http.HttpServletRequest req)` Sets all GWT properties from the request.

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

### localeSearchOrder

    protected java.lang.String[] localeSearchOrder

### defaultLocale

    protected java.lang.String defaultLocale

### localeCookie

    protected java.lang.String localeCookie

### localeQueryParam

    protected java.lang.String localeQueryParam

Constructor Detail

### GwtServletBase

    public GwtServletBase()

Method Detail

### init

    public void init()
              throws javax.servlet.ServletException

  Overrides:
    `init` in class `javax.servlet.GenericServlet`
  Throws:
    `javax.servlet.ServletException`

### getCookie

    protected final java.lang.String getCookie(javax.servlet.http.HttpServletRequest req,
                                               java.lang.String cookieName)

  Fetch a cookie from the HTTP request.

  Parameters:
    `req` -
    `cookieName` -
  Returns:
    the value of the cookie or null if not found

### getGwtLocale

    protected java.lang.String getGwtLocale(javax.servlet.http.HttpServletRequest req)

  Get the GWT locale to use from this request.

  Parameters:
    `req` -
  Returns:
    the GWT locale to use as a String

### service

    protected void service(javax.servlet.http.HttpServletRequest req,
                           javax.servlet.http.HttpServletResponse resp)
                    throws javax.servlet.ServletException,
                           java.io.IOException

  Overrides:
    `service` in class `javax.servlet.http.HttpServlet`
  Throws:
    `javax.servlet.ServletException`
    `java.io.IOException`

### setGwtProperties

    protected void setGwtProperties(javax.servlet.http.HttpServletRequest req)

  Sets all GWT properties from the request.

  If this method is overridden, this version should be called first and then any modifications to property values should be done.

  Parameters:
    `req` -

Overview | Package | Class | Use | Deprecated | Help
| GWT 2.7.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD