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.webapp.jonasadmin.JonasBaseAction; 39 40 43 public class EditRegistryAction extends JonasBaseAction { 44 45 57 public ActionForward executeAction(ActionMapping pMapping, ActionForm pForm 58 , HttpServletRequest pRequest, HttpServletResponse pResponse) 59 throws IOException , ServletException { 60 61 m_WhereAreYou.selectNameNode(getTreeBranchName(DEPTH_SERVER), true); 63 64 String sObjectName = pRequest.getParameter("select"); 66 if (sObjectName != null) { 67 try { 68 ObjectName on = ObjectName.getInstance(sObjectName); 69 JndiResourceForm oForm = new JndiResourceForm(); 70 oForm.setListNames(getListAttribute(on, "Names")); 71 oForm.setRegistryProtocol(getStringAttribute(on, "Name")); 72 pRequest.setAttribute("jndiResourceForm", oForm); 73 } catch (Throwable t) { 74 addGlobalError(t); 75 saveErrors(pRequest, m_Errors); 76 return (pMapping.findForward("Global Error")); 77 } 78 } 79 80 return (pMapping.findForward("List Registry")); 82 } 83 } 84 | Popular Tags |