BaseAction
时间:2010-07-06 来源:mozhx
/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package com.newspager.struts.action; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.DispatchAction; import com.newspager.model.Account;
public class BaseAction extends DispatchAction {
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)throws Exception {
Account loginUser = (Account)request.getSession().getAttribute("login");
if(loginUser == null){
//return mapping.findForward("back_login");
return new ActionForward("/goto.jsp");
}
return super.execute(mapping, form, request, response);
}
}
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package com.newspager.struts.action; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.DispatchAction; import com.newspager.model.Account;
public class BaseAction extends DispatchAction {
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)throws Exception {
Account loginUser = (Account)request.getSession().getAttribute("login");
if(loginUser == null){
//return mapping.findForward("back_login");
return new ActionForward("/goto.jsp");
}
return super.execute(mapping, form, request, response);
}
}
相关阅读 更多 +