⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 switchpageaction.java

📁 软件开发过程通常包括五个阶段:分析、设计、编码、测试和发布。如果在Web应用开发中套用现成的Struts框架
💻 JAVA
字号:
/* * SwitchPageAction.java * * Created on 2005年3月1日, 下午2:10 */package test.action;import org.apache.struts.action.*;import javax.servlet.http.*;import test.bean.UserName;/* * @author LiuPOPO */public class SwitchPageAction extends Action{        /** Creates a new instance of SwitchPageAction */    public SwitchPageAction() {    }    public ActionForward execute(ActionMapping mapping,             ActionForm form,            HttpServletRequest request,            HttpServletResponse response)             throws Exception {        ActionForward retValue;                SwitchPageForm switchPageForm = (SwitchPageForm)form;        UserName userName = new UserName();        userName.setId(switchPageForm.getId());        if(userName.getName().equals("your name is A")){            retValue = mapping.findForward("a");        } else if(userName.getName().equals("your name is B")){            retValue = mapping.findForward("b");        } else if(userName.getName().equals("your name is C")){            retValue = mapping.findForward("c");        } else {            retValue = mapping.findForward("other");        }                return retValue;    }    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -