1 25 26 package org.objectweb.jonas.webapp.jonasadmin.service.container; 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.webapp.jonasadmin.WhereAreYou; 39 40 43 44 public class EditWebAppJettyAction extends BaseWebAppAction { 45 46 48 public ActionForward executeAction(ActionMapping p_Mapping, ActionForm p_Form 49 , HttpServletRequest p_Request, HttpServletResponse p_Response) 50 throws IOException , ServletException { 51 52 boolean bPopulate = initialize(p_Mapping, p_Request); 54 55 try { 56 if (mWebAppForm != null && mWebAppForm.getObjectName() != null) { 58 m_WhereAreYou.selectNameNode(getTreeBranchName(DEPTH_SERVER) 59 + WhereAreYou.NODE_SEPARATOR + "services" + WhereAreYou.NODE_SEPARATOR + "web" 60 + WhereAreYou.NODE_SEPARATOR + mWebAppForm.getObjectName(), true); 61 } 62 63 if (bPopulate) { 65 populateWebAppJetty(mWebAppForm.getObjectName(), (WebAppJettyForm) mWebAppForm); 67 String pathContext = mWebAppForm.getPathContext(); 70 ObjectName on = findJonasMbeanWar(pathContext); 71 if (on != null) { 72 mWarForm = createWarForm(p_Mapping, p_Request); 74 populateJettyWar(on, mWarForm); 75 } 78 } 79 } 80 catch (Throwable t) { 81 addGlobalError(t); 82 saveErrors(p_Request, m_Errors); 83 return (p_Mapping.findForward("Global Error")); 84 } 85 return (p_Mapping.findForward("WebApp Jetty")); 87 } 88 89 91 } 92 | Popular Tags |