org.openswing.swing.server
Class Controller

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byorg.openswing.swing.server.Controller
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class Controller
extends javax.servlet.http.HttpServlet

Title: OpenSwing Framework

Description: Server Controller (HTTP Servlet). It receives all client requests and dispatch them to the correct action class. This controller requires a user authentication before processing other requests: that request have method name: "login" The web.xml file must have the following parameters:

Copyright: Copyright (C) 2006 Mauro Carniel

This file is part of OpenSwing Framework. This library is free software; you can redistribute it and/or modify it under the terms of the (LGPL) Lesser General Public License as published by the Free Software Foundation; GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The author may be contacted at: maurocarniel@tin.it

See Also:
Serialized Form

Field Summary
static java.lang.String ACTION_CLASSES
          action classes
static java.lang.String CONTROLLER_CALLBACKS
          class that derives from ControllerCallbacks
static java.lang.String RESOURCES_FACTORY
          identifier of internationalization settings (Resources object) stored in the servlet context
static java.lang.String SESSION_ID_GENERATOR
          session identifiers generator
static java.lang.String SESSION_IDS
          identifier of session identifiers stored in the servlet context
static java.lang.String USER_SESSIONS
          identifier of user sessions info stored in the servlet context
 
Constructor Summary
Controller()
           
 
Method Summary
 void destroy()
           
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Process the HTTP GET request: this method is used to receive browser HTTP requests (like document requests...)
 void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Process the HTTP POST request: this method is coupled with ClientUtils.getData method.
 void init()
          Initialize global variables.
 
Methods inherited from class javax.servlet.http.HttpServlet
service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SESSION_IDS

public static final java.lang.String SESSION_IDS
identifier of session identifiers stored in the servlet context

See Also:
Constant Field Values

USER_SESSIONS

public static final java.lang.String USER_SESSIONS
identifier of user sessions info stored in the servlet context

See Also:
Constant Field Values

RESOURCES_FACTORY

public static final java.lang.String RESOURCES_FACTORY
identifier of internationalization settings (Resources object) stored in the servlet context

See Also:
Constant Field Values

SESSION_ID_GENERATOR

public static final java.lang.String SESSION_ID_GENERATOR
session identifiers generator

See Also:
Constant Field Values

ACTION_CLASSES

public static final java.lang.String ACTION_CLASSES
action classes

See Also:
Constant Field Values

CONTROLLER_CALLBACKS

public static final java.lang.String CONTROLLER_CALLBACKS
class that derives from ControllerCallbacks

See Also:
Constant Field Values
Constructor Detail

Controller

public Controller()
Method Detail

init

public void init()
          throws javax.servlet.ServletException
Initialize global variables.

Throws:
javax.servlet.ServletException

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws javax.servlet.ServletException,
                  java.io.IOException
Process the HTTP GET request: this method is used to receive browser HTTP requests (like document requests...)

Throws:
javax.servlet.ServletException
java.io.IOException

doPost

public void doPost(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws javax.servlet.ServletException,
                   java.io.IOException
Process the HTTP POST request: this method is coupled with ClientUtils.getData method.

Throws:
javax.servlet.ServletException
java.io.IOException

destroy

public void destroy()