| javax.servlet.http.HttpServlet org.wings.session.SessionServlet
SessionServlet | final class SessionServlet extends HttpServlet implements HttpSessionBindingListener(Code) | | The servlet engine creates for each user a new HttpSession. This
HttpSession can be accessed by all Serlvets running in the engine. A
WingServlet creates one wings SessionServlet per HTTPSession and stores
it in its context.
As the SessionServlets acts as Wrapper for the WingsServlet, you can
access from there as used the ServletContext and the HttpSession.
Additionally the SessionServlet containts also the wingS-Session with
all important services and the superordinated SFrame. To this SFrame all
wings-Components and hence the complete application state is attached.
The developer can access from any place via the SessionManager a
reference to the wingS-Session. Additionally the SessionServlet
provides access to the all containing HttpSession.
author: Armin Haaf |
Method Summary | |
public void | destroy() Destroy and cleanup the session servlet. | final public synchronized void | doGet(HttpServletRequest req, HttpServletResponse response) Verarbeitet Informationen vom Browser:
- setzt Locale
- Dispatch Get Parameter
- feuert Form Events
Ist synchronized, damit nur ein Frame gleichzeitig bearbeitet
werden kann. | final public void | doPost(HttpServletRequest req, HttpServletResponse res) | public String | getInitParameter(String name) | public Enumeration | getInitParameterNames() | public ServletConfig | getServletConfig() | public ServletContext | getServletContext() | public String | getServletInfo() | final public Session | getSession() | public static String | getSessionEncoding(HttpServletResponse response) get the Session Encoding, that is appended to each URL. | protected void | handleException(HttpServletResponse response, Throwable thrown) In case of an error, display an error page to the user. | final protected void | handleLocale(HttpServletRequest req) The Locale of the current wings session servlet is determined by
the locale transmitted by the browser. | protected void | handleUnknownResourceRequested(HttpServletRequest req, HttpServletResponse res) This method is called, whenever a Resource is requested whose
name is not known within this session. | final public void | init(ServletConfig config, HttpServletRequest request, HttpServletResponse response) | public boolean | isValid() A check if this session servlet seems to be alive or is i.e. | public void | log(String msg) Delegates log messages to the according WingsServlet or alternativly
to the HttpServlet logger. | final public void | setLocaleFromHeader(String[] args) Overrides the session set for setLocaleFromHeader by a request parameter. | final protected void | setParent(HttpServlet p) Sets the parent servlet contianint this wings session
servlet (WingsServlet, delegating its requests to the SessionServlet). | public void | valueBound(HttpSessionBindingEvent event) | public void | valueUnbound(HttpSessionBindingEvent event) |
SessionServlet | protected SessionServlet()(Code) | | Default constructor.
|
destroy | public void destroy()(Code) | | Destroy and cleanup the session servlet.
|
doGet | final public synchronized void doGet(HttpServletRequest req, HttpServletResponse response)(Code) | | Verarbeitet Informationen vom Browser:
- setzt Locale
- Dispatch Get Parameter
- feuert Form Events
Ist synchronized, damit nur ein Frame gleichzeitig bearbeitet
werden kann.
|
getSessionEncoding | public static String getSessionEncoding(HttpServletResponse response)(Code) | | get the Session Encoding, that is appended to each URL.
Basically, this is response.encodeURL(""), but unfortuntatly, this
empty encoding isn't supported by Tomcat 4.x anymore.
|
handleException | protected void handleException(HttpServletResponse response, Throwable thrown)(Code) | | In case of an error, display an error page to the user. This is only
done if there is a properties wings.error.handler defined
in the web.xml file. If the property is present, the following steps
are performed:
Load the class named by the value of that property, using the
current thread's context class loader,
Instantiate that class using its zero-argument constructor,
Cast the instance to ExceptionHandler,
Invoke the handler's handle method, passing it the
thrown argument that was passed to this method.
See Also: DefaultExceptionHandler Parameters: response - the HTTP Response to use Parameters: thrown - the Exception to report |
handleLocale | final protected void handleLocale(HttpServletRequest req)(Code) | | The Locale of the current wings session servlet is determined by
the locale transmitted by the browser. The request parameter
LocaleFromHeader can override the behaviour
of a wings session servlet to adopt the clients browsers Locale.
Parameters: req - The request to determine the local from. |
handleUnknownResourceRequested | protected void handleUnknownResourceRequested(HttpServletRequest req, HttpServletResponse res) throws IOException(Code) | | This method is called, whenever a Resource is requested whose
name is not known within this session.
Parameters: req - the causing HttpServletRequest Parameters: res - the HttpServletResponse of this request |
isValid | public boolean isValid()(Code) | | A check if this session servlet seems to be alive or is i.e. invalid because it
was deserialized.
true , if this session servlet seems to be valid and alive. |
log | public void log(String msg)(Code) | | Delegates log messages to the according WingsServlet or alternativly
to the HttpServlet logger.
Parameters: msg - The logmessage |
setLocaleFromHeader | final public void setLocaleFromHeader(String[] args)(Code) | | Overrides the session set for setLocaleFromHeader by a request parameter.
Hence you can force the wings session to adopt the clients Locale.
|
setParent | final protected void setParent(HttpServlet p)(Code) | | Sets the parent servlet contianint this wings session
servlet (WingsServlet, delegating its requests to the SessionServlet).
|
Methods inherited from javax.servlet.http.HttpServlet | protected void doDelete(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected void doHead(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected void doOptions(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected void doTrace(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) protected long getLastModified(HttpServletRequest req)(Code)(Java Doc) protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc) public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException(Code)(Java Doc)
|
|
|