|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.struts.action.Action
org.apache.struts.webapp.example2.LogonAction
public final class LogonAction
Implementation of Action that validates a user logon.
| Field Summary |
|---|
| Fields inherited from class org.apache.struts.action.Action |
|---|
servlet |
| Constructor Summary | |
|---|---|
LogonAction()
|
|
| Method Summary | |
|---|---|
ActionForward |
execute(ActionMapping mapping,
ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Process the specified HTTP request, and create the corresponding HTTP response (or forward to another web component that will create it). |
User |
getUser(UserDatabase database,
java.lang.String username)
Look up the user, throwing an exception to simulate business logic rule exceptions. |
| Methods inherited from class org.apache.struts.action.Action |
|---|
addErrors, addMessages, execute, generateToken, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LogonAction()
| Method Detail |
|---|
public ActionForward execute(ActionMapping mapping,
ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
ActionForward instance describing where and how
control should be forwarded, or null if the response has
already been completed.
execute in class Actionmapping - The ActionMapping used to select this instanceform - The optional ActionForm bean for this request (if any)request - The HTTP request we are processingresponse - The HTTP response we are creating
null if the response has been completed.
java.lang.Exception - if business logic throws an exception
public User getUser(UserDatabase database,
java.lang.String username)
throws ModuleException
database - Database in which to look up the userusername - Username specified on the logon form
AppException - if a business logic rule is violated
ModuleException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||