1 25 26 package org.objectweb.jonas.webapp.jonasadmin.jonasserver; 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.JonasObjectName; 39 import org.objectweb.jonas.webapp.jonasadmin.JonasBaseAction; 40 41 44 45 public class EditServletServerAction extends JonasBaseAction { 46 47 60 public ActionForward executeAction(ActionMapping pMapping, ActionForm pForm 61 , HttpServletRequest pRequest, HttpServletResponse pResponse) 62 throws IOException , ServletException { 63 64 m_WhereAreYou.selectNameNode(getTreeBranchName(DEPTH_SERVER), true); 66 ServletServerForm oForm = new ServletServerForm(); 68 pRequest.setAttribute("servletServerForm", oForm); 69 try { 70 ObjectName oObjectName = JonasObjectName.webContainerService(); 72 oForm.setServerName(getStringAttribute(oObjectName, "ServerName")); 73 oForm.setServerVersion(getStringAttribute(oObjectName, "ServerVersion")); 74 if (m_WhereAreYou.isCatalinaServer()) { 75 oForm.setServerCatalina(true); 76 oForm.setServerCatalinaService(m_WhereAreYou.getCurrentCatalinaServiceName()); 77 oForm.setServerCatalinaEngine(m_WhereAreYou.getCurrentCatalinaEngineName()); 78 oForm.setServerCatalinaDefaultHost(m_WhereAreYou.getCurrentCatalinaDefaultHostName()); 79 80 String sForward = pRequest.getParameter("forward"); 82 if (sForward == null) { 83 sForward = (String ) pRequest.getAttribute("forward"); 84 } 85 oForm.setForwardAfter(sForward); 86 } 87 } catch (Throwable t) { 88 addGlobalError(t); 89 saveErrors(pRequest, m_Errors); 90 return (pMapping.findForward("Global Error")); 91 } 92 return (pMapping.findForward("Servlet Server")); 94 } 95 96 } 97 | Popular Tags |