struts流程:Struts开发指南的工作流程

  下图是Struts工作流程前边我们提到所有请求都提交给ActionServlet来处理

    ("request".equals(mapping.getScope))
  request.removeAttribute(mapping.getAttribute);
 
  session.removeAttribute(mapping.getAttribute);
}
// Forward control to the specied success URI
(mapping.findForward("success"));
}
/**
* Look up the user, throwing an exception to simulate business logic
* rule exceptions.
*
* @param database Database in which to look up the user
* @param username Username specied on the logon form
*
* @exception ModuleException a business logic rule is violated
*/
public User getUser(UserDatabase database, String username)
throws ModuleException {
// Force an ArithmeticException which can be handled explicitly
("arithmetic".equals(username)) {
 throw ArithmeticException;
}
// Force an application-specic exception which can be handled
("expired".equals(username)) {
 throw ExpiredPasswordException(username);
}
// Look up and the specied user
((User) database.findUser(username));
}
}

Tags:  struts开发 struts的处理流程 struts的流程 struts流程

延伸阅读

最新评论

发表评论