1 25 26 package org.objectweb.jonas.webapp.jonasadmin.catalina; 27 28 import java.io.IOException ; 29 30 import javax.management.ObjectName ; 31 import javax.servlet.ServletException ; 32 import javax.servlet.http.HttpServletRequest ; 33 import javax.servlet.http.HttpServletResponse ; 34 35 import org.apache.struts.action.ActionForm; 36 import org.apache.struts.action.ActionForward; 37 import org.apache.struts.action.ActionMapping; 38 import org.objectweb.jonas.jmx.JonasManagementRepr; 39 import org.objectweb.jonas.jmx.CatalinaObjectName; 40 import org.objectweb.jonas.webapp.jonasadmin.JonasBaseAction; 41 42 45 46 public class SaveCatalinaAction extends JonasBaseAction { 47 48 50 public ActionForward executeAction(ActionMapping p_Mapping, ActionForm p_Form 51 , HttpServletRequest p_Request, HttpServletResponse p_Response) 52 throws IOException , ServletException { 53 54 try { 56 ObjectName on = CatalinaObjectName.catalinaServer(); 57 JonasManagementRepr.invoke(on, "storeConfig", null, null); 58 } 59 catch (Throwable t) { 60 addGlobalError(t); 61 saveErrors(p_Request, m_Errors); 62 return (p_Mapping.findForward("Global Error")); 63 } 64 65 String sForward = p_Request.getParameter("forward"); 67 if (sForward == null) { 68 sForward = "ActionEditServletServer"; 69 } 70 71 return (p_Mapping.findForward(sForward)); 73 } 74 75 77 } 78 | Popular Tags |