Class LogonExitServletBase
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.ebasetech.ufs.security.authentication.LogonExitServletBase
- All Implemented Interfaces:
- java.io.Serializable,- javax.servlet.Servlet,- javax.servlet.ServletConfig
public abstract class LogonExitServletBase
extends javax.servlet.http.HttpServlet
- Version:
- 1.0
- Author:
- Jon Rickard Base class for logon exits.
- See Also:
- Serialized Form
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringEBASE_SESSION
- 
Constructor SummaryConstructors Constructor Description LogonExitServletBase()
- 
Method SummaryModifier and Type Method Description voidclearCallingParameters(javax.servlet.http.HttpServletRequest req)Clears all URL parameters - used in cleanup onlyvoidclearEbaseSession(javax.servlet.http.HttpServletRequest req)Removes the Ebase session object from session state - cleanup onlyvoidclearInitialCallFlag(javax.servlet.http.HttpServletRequest req)Clears the flag used by method isInitialCall()voiddisplayErrorPage(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String message)Displays an error page to the end user containing the passed error messagevoiddisplayIllegalCallPage(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Displays an error page to the end user with text "Illegal request"com.ebasetech.ufs.kernel.EbaseSessiongetEbaseSession(javax.servlet.http.HttpServletRequest req)Returns the Ebase session objectbooleanisInitialCall(javax.servlet.http.HttpServletRequest req)Answers the question is this the first call to this servlet for this http sessionbooleanisRequestLegal(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)Check the request is legal.voidlinkToPage(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, java.lang.String page)Displays the page to the end user as specified by the passed URLvoidreturnToEbase(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)Returns to Ebase by forwarding the URL to the ufsmain servlet and re-attaching all parameters attached to the original URL.voidsaveCallingParameters(javax.servlet.http.HttpServletRequest req)Saves all parameters attached to the initial URL.static voidsaveEbaseSession(javax.servlet.http.HttpServletRequest req)Saves the Ebase session in session statestatic voidsaveSubjectInEbaseSession(javax.servlet.http.HttpServletRequest req, javax.security.auth.Subject subject)Saves the subject in the Ebase session objectvoidsetHTTPResponseHeader(javax.servlet.http.HttpServletResponse response)Sets response headers to ensure that no caching takes placeMethods inherited from class javax.servlet.http.HttpServletserviceMethods inherited from class javax.servlet.GenericServletdestroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, logMethods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
- 
Field Details- 
EBASE_SESSIONpublic static final java.lang.String EBASE_SESSION- See Also:
- Constant Field Values
 
 
- 
- 
Constructor Details- 
LogonExitServletBasepublic LogonExitServletBase()
 
- 
- 
Method Details- 
isInitialCallpublic boolean isInitialCall(javax.servlet.http.HttpServletRequest req)Answers the question is this the first call to this servlet for this http session
- 
clearInitialCallFlagpublic void clearInitialCallFlag(javax.servlet.http.HttpServletRequest req)Clears the flag used by method isInitialCall()
- 
saveCallingParameterspublic void saveCallingParameters(javax.servlet.http.HttpServletRequest req)Saves all parameters attached to the initial URL. These are automatically added to the URL used to return to the Ebase system in method returnToEbase()
- 
clearCallingParameterspublic void clearCallingParameters(javax.servlet.http.HttpServletRequest req)Clears all URL parameters - used in cleanup only
- 
returnToEbasepublic void returnToEbase(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, java.io.IOExceptionReturns to Ebase by forwarding the URL to the ufsmain servlet and re-attaching all parameters attached to the original URL.- Throws:
- javax.servlet.ServletException
- java.io.IOException
 
- 
isRequestLegalpublic boolean isRequestLegal(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)Check the request is legal. This is true when the servlet has not been directly invoked
- 
getEbaseSessionpublic com.ebasetech.ufs.kernel.EbaseSession getEbaseSession(javax.servlet.http.HttpServletRequest req)Returns the Ebase session object
- 
clearEbaseSessionpublic void clearEbaseSession(javax.servlet.http.HttpServletRequest req)Removes the Ebase session object from session state - cleanup only
- 
setHTTPResponseHeaderpublic void setHTTPResponseHeader(javax.servlet.http.HttpServletResponse response)Sets response headers to ensure that no caching takes place
- 
linkToPagepublic void linkToPage(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, java.lang.String page) throws javax.servlet.ServletException, java.io.IOExceptionDisplays the page to the end user as specified by the passed URL- Throws:
- javax.servlet.ServletException
- java.io.IOException
 
- 
displayErrorPagepublic void displayErrorPage(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String message) throws javax.servlet.ServletException, java.io.IOExceptionDisplays an error page to the end user containing the passed error message- Throws:
- javax.servlet.ServletException
- java.io.IOException
 
- 
displayIllegalCallPagepublic void displayIllegalCallPage(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOExceptionDisplays an error page to the end user with text "Illegal request"- Throws:
- javax.servlet.ServletException
- java.io.IOException
 
- 
saveSubjectInEbaseSessionpublic static void saveSubjectInEbaseSession(javax.servlet.http.HttpServletRequest req, javax.security.auth.Subject subject)Saves the subject in the Ebase session object
- 
saveEbaseSessionpublic static void saveEbaseSession(javax.servlet.http.HttpServletRequest req)Saves the Ebase session in session state
 
-