I am working on the Login module of my Struts2 app. I have created the Login Page, a开发者_运维百科nd a home Page(which is rendered by Login.action). Now i want to add another feature, forgot password which after performing its business must call the Login.action so that the user need not have to Login explicitly. what should i code and where so that as soon as the ForgotPassword.action finishes its work it passes control to Login.action.
Encapsulate the logic for logging a user in into a separate class (e.g., UserLoginTask
) and then call that class from your LoginAction
and your ForgotPasswordAction
.
精彩评论