📄 switchpageaction.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 + -