1 18 19 package org.apache.roller.ui.core.struts.actions; 20 21 import javax.servlet.http.HttpServletRequest ; 22 import javax.servlet.http.HttpServletResponse ; 23 import org.apache.struts.action.Action; 24 import org.apache.struts.action.ActionForm; 25 import org.apache.struts.action.ActionForward; 26 import org.apache.struts.action.ActionMapping; 27 28 29 36 public class MainPageAction extends Action { 37 38 39 public ActionForward execute(ActionMapping mapping, ActionForm form, 40 HttpServletRequest request, HttpServletResponse response) 41 throws Exception { 42 43 response.setStatus(response.SC_MOVED_PERMANENTLY); 45 response.setHeader("Location", request.getContextPath()+"/"); 46 47 return null; 48 } 49 50 } 51 52 | Popular Tags |