LogonAction.java~3~
资源名称:某公司的java培训教材 [点击查看]
上传用户:dinglihq
上传日期:2013-02-04
资源大小:99958k
文件大小:1k
源码类别:
Java编程
开发平台:
Java
- package firststrut;
- import org.apache.struts.action.*;
- import javax.servlet.http.*;
- import javax.servlet.*;
- public class LogonAction extends Action {
- public ActionForward perform(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) {
- /**@todo: complete the business logic here, this is just a skeleton.*/
- if(request.getAttribute("loginattem").toString().equals("true")){
- return (actionMapping.findForward("success"));
- }else{
- request.setAttribute("login","wrong!");
- return actionMapping.findForward(actionMapping.getInput());
- }
- }
- }