1 25 26 package org.objectweb.jonas.webapp.jonasadmin; 27 28 import java.io.IOException ; 29 30 import javax.servlet.ServletException ; 31 import javax.servlet.http.HttpServletRequest ; 32 import javax.servlet.http.HttpServletResponse ; 33 34 import org.apache.struts.action.ActionMessage; 35 import org.apache.struts.action.ActionMessages; 36 import org.apache.struts.action.ActionForm; 37 import org.apache.struts.action.ActionForward; 38 import org.apache.struts.action.ActionMapping; 39 40 import org.objectweb.jonas.jmx.JonasManagementRepr; 41 42 47 public class ApplyTopAction extends JonasBaseAction { 48 49 51 public ActionForward executeAction(ActionMapping p_Mapping, ActionForm p_Form, HttpServletRequest p_Request 52 , HttpServletResponse p_Response) 53 throws IOException , ServletException { 54 String sRequested = ((TopForm) p_Form).getServerSelect(); 56 57 if (sRequested != null) { 59 String sCurrentRMIConnectorName = null; 60 try { 61 sCurrentRMIConnectorName = JonasManagementRepr.getCurrentRMIConnectorName(); 63 JonasManagementRepr.setCurrentRMIConnectorName(sRequested); 65 m_WhereAreYou.refreshServers(p_Request); 67 } catch (Exception e) { 68 ActionMessages errors = new ActionMessages(); 69 String sServerName = sRequested.substring(13); 71 errors.add("serverSelect", new ActionMessage("error.server.jonas.serverName.bad" 72 , sServerName)); 73 try { 74 JonasManagementRepr.setCurrentRMIConnectorName(sCurrentRMIConnectorName); 76 } catch (Exception eBis) { 77 } 79 saveErrors(p_Request, errors); 80 } 81 } 82 return (p_Mapping.findForward("ActionEditTop")); 84 } 85 } 86 | Popular Tags |