com.tivoli.am.eb.web.eaidemo
Class SimpleEAIDemoServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended bycom.tivoli.am.eb.web.eaidemo.AbstractEAIDemoServlet
              extended bycom.tivoli.am.eb.web.eaidemo.SimpleEAIDemoServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class SimpleEAIDemoServlet
extends AbstractEAIDemoServlet
implements javax.servlet.Servlet

A demo EAI servlet that returns the EAI user ID headers.

Author:
Tivoli Systems
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.tivoli.am.eb.web.eaidemo.AbstractEAIDemoServlet
config, ORIG_USER_ATTR_NAME
 
Constructor Summary
SimpleEAIDemoServlet()
           
 
Method Summary
protected  java.lang.Object doAuthentication(javax.servlet.http.HttpServletRequest req)
          Locates the username submitted from the EAI login form.
protected  void doEAIHeaders(java.lang.Object principal, javax.servlet.http.HttpServletResponse resp)
          Sets the appropriate user ID headers in the response to the client.
 void init()
          Sets up common servlet configuration.
 
Methods inherited from class com.tivoli.am.eb.web.eaidemo.AbstractEAIDemoServlet
doPost, getDeclaredAuthLevel, getDeclaredTamUser, getRequestedUrl
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, 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
 
Methods inherited from interface javax.servlet.Servlet
destroy, getServletConfig, getServletInfo, init, service
 

Constructor Detail

SimpleEAIDemoServlet

public SimpleEAIDemoServlet()
Method Detail

init

public void init()
          throws javax.servlet.ServletException
Description copied from class: AbstractEAIDemoServlet
Sets up common servlet configuration.

Overrides:
init in class AbstractEAIDemoServlet
Throws:
javax.servlet.ServletException - if an error occured which causes the servlet to initialize incorrectly.

doAuthentication

protected java.lang.Object doAuthentication(javax.servlet.http.HttpServletRequest req)
Locates the username submitted from the EAI login form.

Specified by:
doAuthentication in class AbstractEAIDemoServlet
Parameters:
req - The HTTP request containing the login data from the EAI login form.
Returns:
The username submitted from the EAI login form.

doEAIHeaders

protected void doEAIHeaders(java.lang.Object principal,
                            javax.servlet.http.HttpServletResponse resp)
Sets the appropriate user ID headers in the response to the client. Headers set will be: eai-user-id, eai-auth-level, eai-xattrs, and eai-redir-url. If a header is not configured in the web.xml file for this application, it will not be included in the response. This method will set the user ID typed into the EAI login form as an extended attribute. The actual user ID returned can be configred in the web.xml file, and must match a user ID that exists in the TAM registry.

Specified by:
doEAIHeaders in class AbstractEAIDemoServlet
Parameters:
principal - The user information returned from doAuthentication()
resp - The HTTP response that will be sent to the client


Copyright © 2004 IBM Corp. All Rights Reserved.