|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.tivoli.am.eb.web.eaidemo.AbstractEAIDemoServlet
An abstract servlet that performs EAI operations common to both the user ID and PAC operations.
Field Summary | |
protected EAIDemoServerConfig |
config
|
static java.lang.String |
ORIG_USER_ATTR_NAME
The name of the header used to communicate the user id entered in the login form. |
Constructor Summary | |
AbstractEAIDemoServlet()
|
Method Summary | |
protected abstract java.lang.Object |
doAuthentication(javax.servlet.http.HttpServletRequest req)
Finds the authentication data in the client's request and converts it to a principal appropriate to the type of EAI operation (user ID or PAC). |
protected abstract void |
doEAIHeaders(java.lang.Object principal,
javax.servlet.http.HttpServletResponse resp)
Sets the appropriate headers and respective values based on the configuration of the servlet and EAI type (user ID or PAC). |
void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Responds to a POST operation by adding the EAI headers and printing a simple message to the user. |
java.lang.String |
getDeclaredAuthLevel()
Returns the authentication level the user declared in the login page. |
java.lang.String |
getDeclaredTamUser()
Returns the user name that was inputted in the login page. |
java.lang.String |
getRequestedUrl()
Returns the url that was initially requested. |
void |
init()
Sets up common servlet configuration. |
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 |
Field Detail |
public static final java.lang.String ORIG_USER_ATTR_NAME
protected EAIDemoServerConfig config
Constructor Detail |
public AbstractEAIDemoServlet()
Method Detail |
public java.lang.String getDeclaredAuthLevel()
public java.lang.String getDeclaredTamUser()
public java.lang.String getRequestedUrl()
public void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, java.io.IOException
req
- The HTTP request objectresp
- The HTTP response object
javax.servlet.ServletException
- if the servlet cannot process the request
java.io.IOException
- if the servlet encounters a problem writing to the
clientpublic void init() throws javax.servlet.ServletException
javax.servlet.ServletException
- if an error occured which causes the servlet to
initialize incorrectly.protected abstract java.lang.Object doAuthentication(javax.servlet.http.HttpServletRequest req) throws java.lang.Exception
req
- The HTTP request from the client.
java.lang.Exception
protected abstract void doEAIHeaders(java.lang.Object principal, javax.servlet.http.HttpServletResponse resp)
WEB-INF/web.xml
.
principal
- The object returned from doAuthentication(). It is
assumed that the developer knows the data type and can cast down
appropriately.resp
- The HTTP response where the headers will be sent.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |