1 16 17 package org.apache.webapp.admin.host; 18 19 import java.io.IOException ; 20 import java.util.Locale ; 21 import java.util.ArrayList ; 22 import javax.servlet.ServletException ; 23 import javax.servlet.http.HttpServletRequest ; 24 import javax.servlet.http.HttpServletResponse ; 25 import javax.servlet.http.HttpSession ; 26 import org.apache.struts.action.Action; 27 import org.apache.struts.action.ActionErrors; 28 import org.apache.struts.action.ActionForm; 29 import org.apache.struts.action.ActionForward; 30 import org.apache.struts.action.ActionMapping; 31 import org.apache.struts.util.MessageResources; 32 import org.apache.webapp.admin.LabelValueBean; 33 import org.apache.webapp.admin.Lists; 34 35 41 42 public class AddHostAction extends Action { 43 44 46 61 public ActionForward execute(ActionMapping mapping, 62 ActionForm form, 63 HttpServletRequest request, 64 HttpServletResponse response) 65 throws IOException , ServletException { 66 67 HttpSession session = request.getSession(); 69 Locale locale = getLocale(request); 70 MessageResources resources = getResources(request); 71 72 String serviceName = request.getParameter("select"); 75 76 HostForm hostFm = new HostForm(); 78 session.setAttribute("hostForm", hostFm); 79 hostFm.setAdminAction("Create"); 80 hostFm.setObjectName(""); 81 hostFm.setHostName(""); 82 hostFm.setServiceName(serviceName); 83 hostFm.setAppBase(""); 84 hostFm.setAutoDeploy("true"); 85 hostFm.setDeployXML("true"); 86 hostFm.setDeployOnStartup("true"); 87 hostFm.setUnpackWARs("true"); 88 hostFm.setXmlNamespaceAware("false"); 89 hostFm.setXmlValidation("false"); 90 hostFm.setBooleanVals(Lists.getBooleanValues()); 91 92 return (mapping.findForward("Host")); 94 95 } 96 97 98 } 99 | Popular Tags |