PageMixer demonstration with Servlet

pagemixer.servlet
Class AuthServlet

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--pagemixer.servlet.ServletTemplate
                    |
                    +--pagemixer.servlet.AuthServlet
All Implemented Interfaces:
AuthConstants, AuthKeys, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, ServletConstants, ServletKeys

public class AuthServlet
extends ServletTemplate
implements AuthKeys

Servlet for authentication.

See Also:
Serialized Form

Fields inherited from class pagemixer.servlet.ServletTemplate
authPage_, basketPage_, topPage_
 
Fields inherited from interface common.AuthKeys
KEY_FAREWELL, KEY_INVALID_PASSWORD, KEY_LOGIN, KEY_LOGIN_REQUEST, KEY_LOGIN_REQUIRED, KEY_LOGOUT_REQUEST, KEY_PASSWORD, KEY_USER_UNKNOWN, KEY_USERNAME, KEY_WELCOME
 
Fields inherited from interface common.AuthConstants
CLASS_ALREADY_LOGIN, CLASS_FAREWELL, CLASS_INVALID_PASSWORD, CLASS_LOGIN_REQUIRED, CLASS_NOT_YET_LOGIN, CLASS_USER_UNKNOWN, CLASS_USERNAME, CLASS_WELCOME, PARAM_LOGIN, PARAM_LOGIN_REQUEST, PARAM_LOGOUT_REQUEST, PARAM_PASSWORD, PARAM_USERNAME, REQUEST_FAREWELL, REQUEST_WELCOME, SESSION_LOGIN
 
Fields inherited from interface common.ServletKeys
KEY_BASE_HREF
 
Fields inherited from interface common.ServletConstants
INIT_AUTH_PASSWORD, INIT_AUTH_USERNAME, INIT_PAGE_AUTH, INIT_PAGE_SHOP_BASKET, INIT_PAGE_TOP, REQUEST_BASE_HREF
 
Constructor Summary
AuthServlet()
           
 
Method Summary
protected  void doAction(jp.ne.dti.lares.foozy.pagemixer.servlet.ServletConsumerContext context)
          Do something for authentication.
 void init()
           
 
Methods inherited from class pagemixer.servlet.ServletTemplate
doGet, doPost, forward
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doOptions, doPut, doTrace, getLastModified, service, 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
 

Constructor Detail

AuthServlet

public AuthServlet()
Method Detail

doAction

protected void doAction(jp.ne.dti.lares.foozy.pagemixer.servlet.ServletConsumerContext context)
                 throws javax.servlet.ServletException,
                        java.io.IOException
Do something for authentication.

Action/page matrix is shown below:

request user status
LOGON LOGOUT NOT-LOGON LOGON
0 0 ---/"logon" ---/"logon"
0 1 ---/"logon" logout/"top"(forward)
1 1 logon/"logon" or "top" logout/"top"(forward)
1 0 logon/"logon" or "top" ---/"logon"

"action/page" means that: action is done and redner "page" in that condition.

Overrides:
doAction in class ServletTemplate

init

public void init()
          throws javax.servlet.ServletException
Overrides:
init in class ServletTemplate

PageMixer demonstration with Servlet