amyroh 2002/06/14 06:29:30 Modified: webapps/admin/WEB-INF/classes/org/apache/webapp/admin TomcatTreeBuilder.java webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources DataSourceForm.java DataSourcesForm.java DeleteEnvEntriesAction.java EnvEntriesForm.java EnvEntryForm.java ListDataSourcesAction.java ListEnvEntriesAction.java ListResourceLinksAction.java ResourceLinkForm.java ResourceLinksForm.java ResourceUtils.java ResourcesTreeBuilder.java SaveDataSourceAction.java SaveEnvEntryAction.java SaveResourceLinkAction.java SetUpDataSourceAction.java SetUpEnvEntryAction.java SetUpResourceLinkAction.java webapps/admin/resources dataSource.jsp dataSources.jspf deleteEnvEntries.jsp envEntries.jspf envEntry.jsp listDataSources.jsp listDataSources.jspf listEnvEntries.jsp listEnvEntries.jspf listResourceLinks.jsp listResourceLinks.jspf resourceLink.jsp resourceLinks.jspf Log: Add global and context JNDI support. Resource Link and delete resources still need fix. Revision Changes Path 1.31 +43 -65 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/TomcatTreeBuilder.java Index: TomcatTreeBuilder.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/TomcatTreeBuilder.java,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- TomcatTreeBuilder.java 13 Jun 2002 18:19:47 -0000 1.30 +++ TomcatTreeBuilder.java 14 Jun 2002 13:29:29 -0000 1.31 @@ -456,8 +456,10 @@ MessageResources resources) throws Exception { ObjectName oname = new ObjectName(containerName); + String type = oname.getKeyProperty("type"); String path = oname.getKeyProperty("path"); - String defaultContext = oname.getKeyProperty("defaultContext"); + String host = oname.getKeyProperty("host"); + String service = oname.getKeyProperty("service"); TreeControlNode subtree = new TreeControlNode ("Context Resource Administration " + containerName, "folder_16_pad.gif", @@ -466,69 +468,45 @@ "content", true); containerNode.addChild(subtree); - if (path != null) { - TreeControlNode datasources = new TreeControlNode - ("Context Data Sources " + containerName, - "Datasource.gif", - resources.getMessage("resources.treeBuilder.datasources"), - "resources/listDataSources.do?parent="+ - URLEncoder.encode(path)+"&parentType=path&forward=" + + TreeControlNode datasources = new TreeControlNode + ("Context Data Sources " + containerName, + "Datasource.gif", + resources.getMessage("resources.treeBuilder.datasources"), + "resources/listDataSources.do?resourcetype=" + + URLEncoder.encode(type) + "&path=" + + URLEncoder.encode(path) + "&host=" + + URLEncoder.encode(host) + "&service=" + + URLEncoder.encode(service) + "&forward=" + URLEncoder.encode("DataSources List Setup"), - "content", - false); - TreeControlNode resourcelinks = new TreeControlNode - ("Resource Links " + containerName, - "Datasource.gif", - resources.getMessage("resources.treeBuilder.resourcelinks"), - "resources/listResourceLinks.do?parent="+ - URLEncoder.encode(path)+"&parentType=path&forward=" + + "content", + false); + TreeControlNode resourcelinks = new TreeControlNode + ("Resource Links " + containerName, + "Datasource.gif", + resources.getMessage("resources.treeBuilder.resourcelinks"), + "resources/listResourceLinks.do?resourcetype=" + + URLEncoder.encode(type) + "&path=" + + URLEncoder.encode(path) + "&host=" + + URLEncoder.encode(host) + "&service=" + + URLEncoder.encode(service) + "&forward=" + URLEncoder.encode("ResourceLinks List Setup"), - "content", - false); - TreeControlNode envs = new TreeControlNode - ("Context Environment Entries "+ containerName, - "EnvironmentEntries.gif", - resources.getMessage("resources.env.entries"), - "resources/listEnvEntries.do?parent="+ - URLEncoder.encode(path)+"&parentType=path&forward=" + + "content", + false); + TreeControlNode envs = new TreeControlNode + ("Context Environment Entries "+ containerName, + "EnvironmentEntries.gif", + resources.getMessage("resources.env.entries"), + "resources/listEnvEntries.do?resourcetype=" + + URLEncoder.encode(type) + "&path=" + + URLEncoder.encode(path) + "&host=" + + URLEncoder.encode(host) + "&service=" + + URLEncoder.encode(service) + "&forward=" + URLEncoder.encode("EnvEntries List Setup"), - "content", - false); - subtree.addChild(datasources); - subtree.addChild(resourcelinks); - subtree.addChild(envs); - } else if (defaultContext != null) { - TreeControlNode datasources = new TreeControlNode - ("Context Data Sources " + containerName, - "Datasource.gif", - resources.getMessage("resources.treeBuilder.datasources"), - "resources/listDataSources.do?parent="+ - URLEncoder.encode(defaultContext)+"&parentType=defaultContext"+ - "&forward=" + URLEncoder.encode("DataSources List Setup"), - "content", - false); - TreeControlNode resourcelinks = new TreeControlNode - ("Resource Links " + containerName, - "Datasource.gif", - resources.getMessage("resources.treeBuilder.resourcelinks"), - "resources/listResourceLinks.do?parent="+ - URLEncoder.encode(defaultContext)+"&parentType=defaultContext"+ - "&forward=" + URLEncoder.encode("ResourceLinks List Setup"), - "content", - false); - TreeControlNode envs = new TreeControlNode - ("Context Environment Entries "+ containerName, - "EnvironmentEntries.gif", - resources.getMessage("resources.env.entries"), - "resources/listEnvEntries.do?parent="+ - URLEncoder.encode(defaultContext)+"&parentType=defaultContext"+ - "&forward=" + URLEncoder.encode("EnvEntries List Setup"), - "content", - false); - subtree.addChild(datasources); - subtree.addChild(resourcelinks); - subtree.addChild(envs); - } + "content", + false); + subtree.addChild(datasources); + subtree.addChild(resourcelinks); + subtree.addChild(envs); } 1.4 +81 -4 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/DataSourceForm.java Index: DataSourceForm.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/DataSourceForm.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- DataSourceForm.java 9 May 2002 21:27:27 -0000 1.3 +++ DataSourceForm.java 14 Jun 2002 13:29:29 -0000 1.4 @@ -194,6 +194,83 @@ public void setWait(String wait) { this.wait = wait; } + + /** + * The resource type of this data source. + */ + private String resourcetype = null; + + /** + * Return the resource type of the data source this bean refers to. + */ + public String getResourcetype() { + return this.resourcetype; + } + + /** + * Set the resource type of the data source this bean refers to. + */ + public void setResourcetype(String resourcetype) { + this.resourcetype = resourcetype; + } + + /** + * The path of this data source. + */ + private String path = null; + + /** + * Return the path of the data source this bean refers to. + */ + public String getPath() { + return this.path; + } + + /** + * Set the path of the data source this bean refers to. + */ + public void setPath(String path) { + this.path = path; + } + + /** + * The host of this data source. + */ + private String host = null; + + /** + * Return the host of the data source this bean refers to. + */ + public String getHost() { + return this.host; + } + + /** + * Set the host of the data source this bean refers to. + */ + public void setHost(String host) { + this.host = host; + } + + + /** + * The service of this data source. + */ + private String service = null; + + /** + * Return the service of the data source this bean refers to. + */ + public String getService() { + return this.service; + } + + /** + * Set the service of the data source this bean refers to. + */ + public void setService(String service) { + this.service = service; + } /** * The validation query to the data source. 1.2 +80 -4 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/DataSourcesForm.java Index: DataSourcesForm.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/DataSourcesForm.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- DataSourcesForm.java 5 May 2002 22:44:21 -0000 1.1 +++ DataSourcesForm.java 14 Jun 2002 13:29:29 -0000 1.2 @@ -98,6 +98,82 @@ this.dataSources = dataSources; } + /** + * The resource type of this data source. + */ + private String resourcetype = null; + + /** + * Return the resource type of the data source this bean refers to. + */ + public String getResourcetype() { + return this.resourcetype; + } + + /** + * Set the resource type of the data source this bean refers to. + */ + public void setResourcetype(String resourcetype) { + this.resourcetype = resourcetype; + } + + /** + * The path of this data source. + */ + private String path = null; + + /** + * Return the path of the data source this bean refers to. + */ + public String getPath() { + return this.path; + } + + /** + * Set the path of the data source this bean refers to. + */ + public void setPath(String path) { + this.path = path; + } + + /** + * The host of this data source. + */ + private String host = null; + + /** + * Return the host of the data source this bean refers to. + */ + public String getHost() { + return this.host; + } + + /** + * Set the host of the data source this bean refers to. + */ + public void setHost(String host) { + this.host = host; + } + + + /** + * The service of this data source. + */ + private String service = null; + + /** + * Return the service of the data source this bean refers to. + */ + public String getService() { + return this.service; + } + + /** + * Set the service of the data source this bean refers to. + */ + public void setService(String service) { + this.service = service; + } // --------------------------------------------------------- Public Methods 1.2 +11 -4 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/DeleteEnvEntriesAction.java Index: DeleteEnvEntriesAction.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/DeleteEnvEntriesAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- DeleteEnvEntriesAction.java 4 May 2002 17:14:15 -0000 1.1 +++ DeleteEnvEntriesAction.java 14 Jun 2002 13:29:29 -0000 1.2 @@ -151,7 +151,12 @@ } HttpSession session = request.getSession(); Locale locale = (Locale) session.getAttribute(Action.LOCALE_KEY); - + + getServlet().log("resourcetype = "+request.getParameter("resourcetype")); + getServlet().log("path = "+request.getParameter("path")); + getServlet().log("host = "+request.getParameter("host")); + getServlet().log("service = "+request.getParameter("service")); + // Has this transaction been cancelled? if (isCancelled(request)) { return (mapping.findForward("List EnvEntries Setup")); @@ -167,7 +172,9 @@ // Perform any extra validation that is required EnvEntriesForm envEntriesForm = (EnvEntriesForm) form; + getServlet().log("form resourcetype = "+envEntriesForm.getResourcetype()); String envEntries[] = envEntriesForm.getEnvEntries(); + if (envEntries == null) { envEntries = new String[0]; } 1.3 +59 -20 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/EnvEntriesForm.java Index: EnvEntriesForm.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/EnvEntriesForm.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- EnvEntriesForm.java 13 Jun 2002 18:19:48 -0000 1.2 +++ EnvEntriesForm.java 14 Jun 2002 13:29:29 -0000 1.3 @@ -100,41 +100,80 @@ } /** - * The parent name of this environment entry. + * The resource type of this environment entry. */ - private String parentName = null; + private String resourcetype = null; /** - * Return the parent name of the environment entry this bean refers to. + * Return the resource type of the environment entry this bean refers to. */ - public String getParentName() { - return this.parentName; + public String getResourcetype() { + return this.resourcetype; } /** - * Set the parent name of the environment entry this bean refers to. + * Set the resource type of the environment entry this bean refers to. */ - public void setParentName(String parentName) { - this.parentName = parentName; + public void setResourcetype(String resourcetype) { + this.resourcetype = resourcetype; } + + /** + * The path of this environment entry. + */ + private String path = null; + + /** + * Return the path of the environment entry this bean refers to. + */ + public String getPath() { + return this.path; + } + + /** + * Set the path of the environment entry this bean refers to. + */ + public void setPath(String path) { + this.path = path; + } + + /** + * The host of this environment entry. + */ + private String host = null; + + /** + * Return the host of the environment entry this bean refers to. + */ + public String getHost() { + return this.host; + } + + /** + * Set the host of the environment entry this bean refers to. + */ + public void setHost(String host) { + this.host = host; + } + /** - * The parent type of this environment entry. + * The service of this environment entry. */ - private String parentType = null; + private String service = null; /** - * Return the parent type of the environment entry this bean refers to. + * Return the service of the environment entry this bean refers to. */ - public String getParentType() { - return this.parentType; + public String getService() { + return this.service; } /** - * Set the parent type of the environment entry this bean refers to. + * Set the service of the environment entry this bean refers to. */ - public void setParentType(String parentType) { - this.parentType = parentType; + public void setService(String service) { + this.service = service; } // --------------------------------------------------------- Public Methods 1.7 +59 -20 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/EnvEntryForm.java Index: EnvEntryForm.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/EnvEntryForm.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- EnvEntryForm.java 13 Jun 2002 23:17:57 -0000 1.6 +++ EnvEntryForm.java 14 Jun 2002 13:29:29 -0000 1.7 @@ -157,41 +157,80 @@ } /** - * The name of the parent of this environment entry. + * The resource type of this environment entry. */ - private String parentName = null; + private String resourcetype = null; /** - * Return the parent name of the environment entry this bean refers to. + * Return the resource type of the environment entry this bean refers to. */ - public String getParentName() { - return this.parentName; + public String getResourcetype() { + return this.resourcetype; } /** - * Set the parent name of the environment entry this bean refers to. + * Set the resource type of the environment entry this bean refers to. */ - public void setParentName(String parentName) { - this.parentName = parentName; + public void setResourcetype(String resourcetype) { + this.resourcetype = resourcetype; } + + /** + * The path of this environment entry. + */ + private String path = null; + + /** + * Return the path of the environment entry this bean refers to. + */ + public String getPath() { + return this.path; + } + + /** + * Set the path of the environment entry this bean refers to. + */ + public void setPath(String path) { + this.path = path; + } + + /** + * The host of this environment entry. + */ + private String host = null; + + /** + * Return the host of the environment entry this bean refers to. + */ + public String getHost() { + return this.host; + } + + /** + * Set the host of the environment entry this bean refers to. + */ + public void setHost(String host) { + this.host = host; + } + /** - * The parent type of this environment entry. + * The service of this environment entry. */ - private String parentType = null; + private String service = null; /** - * Return the parent type of the environment entry this bean refers to. + * Return the service of the environment entry this bean refers to. */ - public String getParentType() { - return this.parentType; + public String getService() { + return this.service; } /** - * Set the parent type of the environment entry this bean refers to. + * Set the service of the environment entry this bean refers to. */ - public void setParentType(String parentType) { - this.parentType = parentType; + public void setService(String service) { + this.service = service; } /** 1.3 +21 -11 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/ListDataSourcesAction.java Index: ListDataSourcesAction.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/ListDataSourcesAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ListDataSourcesAction.java 13 Jun 2002 18:19:48 -0000 1.2 +++ ListDataSourcesAction.java 14 Jun 2002 13:29:29 -0000 1.3 @@ -145,20 +145,30 @@ HttpSession session = request.getSession(); Locale locale = (Locale) session.getAttribute(Action.LOCALE_KEY); - String parent = request.getParameter("parent"); - String parentType = request.getParameter("parentType"); - if (parent != null) { - parent = URLDecoder.decode(parent); + String resourcetype = request.getParameter("resourcetype"); + String path = request.getParameter("path"); + String host = request.getParameter("host"); + String service = request.getParameter("service"); + + if (resourcetype != null) { + resourcetype = URLDecoder.decode(resourcetype); + } + if (path != null) { + path = URLDecoder.decode(path); + } + if (host != null) { + host = URLDecoder.decode(host); } - if (parentType != null) { - parentType = URLDecoder.decode(parentType); + if (service != null) { + service = URLDecoder.decode(service); } // Create a form bean containing the requested MBean Names DataSourcesForm dataSourcesForm = null; try { dataSourcesForm = - ResourceUtils.getDataSourcesForm(mserver, parent, parentType); + ResourceUtils.getDataSourcesForm(mserver, resourcetype, + path, host, service); } catch (Exception e) { getServlet().log(resources.getMessage (locale, 1.4 +21 -11 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/ListEnvEntriesAction.java Index: ListEnvEntriesAction.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/ListEnvEntriesAction.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ListEnvEntriesAction.java 13 Jun 2002 18:19:48 -0000 1.3 +++ ListEnvEntriesAction.java 14 Jun 2002 13:29:29 -0000 1.4 @@ -147,19 +147,29 @@ HttpSession session = request.getSession(); Locale locale = (Locale) session.getAttribute(Action.LOCALE_KEY); - String parent = request.getParameter("parent"); - String parentType = request.getParameter("parentType"); - if (parent != null) { - parent = URLDecoder.decode(parent); + String resourcetype = request.getParameter("resourcetype"); + String path = request.getParameter("path"); + String host = request.getParameter("host"); + String service = request.getParameter("service"); + + if (resourcetype != null) { + resourcetype = URLDecoder.decode(resourcetype); } - if (parentType != null) { - parentType = URLDecoder.decode(parentType); + if (path != null) { + path = URLDecoder.decode(path); + } + if (host != null) { + host = URLDecoder.decode(host); + } + if (service != null) { + service = URLDecoder.decode(service); } // Create a form bean containing the requested MBean Names EnvEntriesForm envEntriesForm = null; try { envEntriesForm = - ResourceUtils.getEnvEntriesForm(mserver, parent, parentType); + ResourceUtils.getEnvEntriesForm(mserver, resourcetype, + path, host, service); } catch (Exception e) { getServlet().log(resources.getMessage (locale, 1.2 +20 -10 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/ListResourceLinksAction.java Index: ListResourceLinksAction.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/ListResourceLinksAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ListResourceLinksAction.java 13 Jun 2002 18:34:32 -0000 1.1 +++ ListResourceLinksAction.java 14 Jun 2002 13:29:29 -0000 1.2 @@ -145,19 +145,29 @@ HttpSession session = request.getSession(); Locale locale = (Locale) session.getAttribute(Action.LOCALE_KEY); - String parent = request.getParameter("parent"); - String parentType = request.getParameter("parentType"); - if (parent != null) { - parent = URLDecoder.decode(parent); + String resourcetype = request.getParameter("resourcetype"); + String path = request.getParameter("path"); + String host = request.getParameter("host"); + String service = request.getParameter("service"); + + if (resourcetype != null) { + resourcetype = URLDecoder.decode(resourcetype); } - if (parentType != null) { - parentType = URLDecoder.decode(parentType); + if (path != null) { + path = URLDecoder.decode(path); + } + if (host != null) { + host = URLDecoder.decode(host); + } + if (service != null) { + service = URLDecoder.decode(service); } // Create a form bean containing the requested MBean Names ResourceLinksForm resourceLinksForm = null; try { resourceLinksForm = - ResourceUtils.getResourceLinksForm(mserver, parent, parentType); + ResourceUtils.getResourceLinksForm(mserver, resourcetype, + path, host, service); } catch (Exception e) { getServlet().log(resources.getMessage (locale, 1.2 +71 -13 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/ResourceLinkForm.java Index: ResourceLinkForm.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/ResourceLinkForm.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ResourceLinkForm.java 13 Jun 2002 18:34:32 -0000 1.1 +++ ResourceLinkForm.java 14 Jun 2002 13:29:29 -0000 1.2 @@ -115,26 +115,84 @@ } /** - * The object name of the parent of this resource link. + * The resource type of this resource link. */ - private String parentObjectName = null; + private String resourcetype = null; /** - * Return the parent object name of the Logger this bean refers to. + * Return the resource type of the resource link this bean refers to. */ - public String getParentObjectName() { - return this.parentObjectName; + public String getResourcetype() { + return this.resourcetype; } /** - * Set the parent object name of the Logger this bean refers to. + * Set the resource type of the resource link this bean refers to. */ - public void setParentObjectName(String parentObjectName) { - this.parentObjectName = parentObjectName; + public void setResourcetype(String resourcetype) { + this.resourcetype = resourcetype; + } + + /** + * The path of this resource link. + */ + private String path = null; + + /** + * Return the path of the resource link this bean refers to. + */ + public String getPath() { + return this.path; + } + + /** + * Set the path of the resource link this bean refers to. + */ + public void setPath(String path) { + this.path = path; + } + + /** + * The host of this resource link. + */ + private String host = null; + + /** + * Return the host of the resource link this bean refers to. + */ + public String getHost() { + return this.host; + } + + /** + * Set the host of the resource link this bean refers to. + */ + public void setHost(String host) { + this.host = host; + } + + + /** + * The service of this resource link. + */ + private String service = null; + + /** + * Return the service of the resource link this bean refers to. + */ + public String getService() { + return this.service; + } + + /** + * Set the service of the resource link this bean refers to. + */ + public void setService(String service) { + this.service = service; } /** - * The type of the resource link. + * The type of the resource link link. */ private String type = null; 1.2 +80 -3 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/ResourceLinksForm.java Index: ResourceLinksForm.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/ResourceLinksForm.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ResourceLinksForm.java 13 Jun 2002 18:34:33 -0000 1.1 +++ ResourceLinksForm.java 14 Jun 2002 13:29:29 -0000 1.2 @@ -97,7 +97,84 @@ public void setResourceLinks(String resourceLinks[]) { this.resourceLinks = resourceLinks; } + + + /** + * The resource type of this resource link. + */ + private String resourcetype = null; + + /** + * Return the resource type of the resource link this bean refers to. + */ + public String getResourcetype() { + return this.resourcetype; + } + /** + * Set the resource type of the resource link this bean refers to. + */ + public void setResourcetype(String resourcetype) { + this.resourcetype = resourcetype; + } + + /** + * The path of this resource link. + */ + private String path = null; + + /** + * Return the path of the resource link this bean refers to. + */ + public String getPath() { + return this.path; + } + + /** + * Set the path of the resource link this bean refers to. + */ + public void setPath(String path) { + this.path = path; + } + + /** + * The host of this resource link. + */ + private String host = null; + + /** + * Return the host of the resource link this bean refers to. + */ + public String getHost() { + return this.host; + } + + /** + * Set the host of the resource link this bean refers to. + */ + public void setHost(String host) { + this.host = host; + } + + + /** + * The service of this resource link. + */ + private String service = null; + + /** + * Return the service of the resource link this bean refers to. + */ + public String getService() { + return this.service; + } + + /** + * Set the service of the resource link this bean refers to. + */ + public void setService(String service) { + this.service = service; + } // --------------------------------------------------------- Public Methods 1.8 +112 -26 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/ResourceUtils.java Index: ResourceUtils.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/ResourceUtils.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- ResourceUtils.java 13 Jun 2002 23:38:26 -0000 1.7 +++ ResourceUtils.java 14 Jun 2002 13:29:29 -0000 1.8 @@ -85,6 +85,9 @@ public final static String RESOURCE_TYPE = "Catalina:type=Resource"; public final static String RESOURCELINK_TYPE = "Catalina:type=ResourceLink"; public final static String NAMINGRESOURCES_TYPE = "Catalina:type=NamingResources"; + public final static String GLOBAL_TYPE = ",resourcetype=Global"; + public final static String CONTEXT_TYPE = ",resourcetype=Context"; + public final static String DEFAULTCONTEXT_TYPE = ",resourcetype=DefaultContext"; // resource class names public final static String USERDB_CLASS = "org.apache.catalina.UserDatabase"; @@ -102,14 +105,20 @@ * @exception Exception if an error occurs */ public static EnvEntriesForm getEnvEntriesForm(MBeanServer mserver, - String parent, String parentType) throws Exception { + String resourcetype, String path, String host, String service) + throws Exception { ObjectName ename = null; - if ((parent == null) || (parentType == null)) { - ename = new ObjectName( ENVIRONMENT_TYPE + ",*"); - } else { - ename = new ObjectName( ENVIRONMENT_TYPE + - ","+parentType+"=" + parent); + if (resourcetype!=null) { + if (resourcetype.equals("Global")) { + ename = new ObjectName( ENVIRONMENT_TYPE + GLOBAL_TYPE + ",*"); + } else if (resourcetype.equals("Context")) { + ename = new ObjectName (ENVIRONMENT_TYPE + CONTEXT_TYPE + + ",path=" + path + ",host=" + host + ",service=" + + service + ",*"); + } else if (resourcetype.equals("DefaultContext")) { + // add defaultcontext support later + } } Iterator iterator = (mserver.queryMBeans(ename, null).iterator()); @@ -126,17 +135,26 @@ envEntriesForm.setEnvEntries((String[]) results.toArray(new String[results.size()])); - if (parent != null) { - envEntriesForm.setParentName(parent); + if (resourcetype != null) { + envEntriesForm.setResourcetype(resourcetype); } else { - envEntriesForm.setParentName(""); + envEntriesForm.setResourcetype(""); } - - if (parentType != null) { - envEntriesForm.setParentType(parentType); + if (path != null) { + envEntriesForm.setPath(path); } else { - envEntriesForm.setParentType(""); - } + envEntriesForm.setPath(""); + } + if (host != null) { + envEntriesForm.setHost(host); + } else { + envEntriesForm.setHost(""); + } + if (service != null) { + envEntriesForm.setService(service); + } else { + envEntriesForm.setService(""); + } return (envEntriesForm); @@ -152,11 +170,23 @@ * @exception Exception if an error occurs */ public static DataSourcesForm getDataSourcesForm(MBeanServer mserver, - String parent, String parentType) throws Exception { + String resourcetype, String path, String host, String service) + throws Exception { - ObjectName rname = new ObjectName( RESOURCE_TYPE + - ",class=" + DATASOURCE_CLASS + ",*"); - + ObjectName rname = null; + if (resourcetype!=null) { + if (resourcetype.equals("Global")) { + rname = new ObjectName( RESOURCE_TYPE + GLOBAL_TYPE + + ",class=" + DATASOURCE_CLASS + ",*"); + } else if (resourcetype.equals("Context")) { + rname = new ObjectName (RESOURCE_TYPE + CONTEXT_TYPE + + ",path=" + path + ",host=" + host + ",service=" + + service + ",class=" + DATASOURCE_CLASS + ",*"); + } else if (resourcetype.equals("DefaultContext")) { + // add defaultcontext support later + } + } + Iterator iterator = (mserver.queryMBeans(rname, null).iterator()); ArrayList results = new ArrayList(); @@ -169,6 +199,28 @@ DataSourcesForm dataSourcesForm = new DataSourcesForm(); dataSourcesForm.setDataSources((String[]) results.toArray(new String[results.size()])); + + if (resourcetype != null) { + dataSourcesForm.setResourcetype(resourcetype); + } else { + dataSourcesForm.setResourcetype(""); + } + if (path != null) { + dataSourcesForm.setPath(path); + } else { + dataSourcesForm.setPath(""); + } + if (host != null) { + dataSourcesForm.setHost(host); + } else { + dataSourcesForm.setHost(""); + } + if (service != null) { + dataSourcesForm.setService(service); + } else { + dataSourcesForm.setService(""); + } + return (dataSourcesForm); } @@ -183,10 +235,22 @@ * @exception Exception if an error occurs */ public static ResourceLinksForm getResourceLinksForm(MBeanServer mserver, - String parent, String parentType) throws Exception { + String resourcetype, String path, String host, String service) + throws Exception { - ObjectName rname = new ObjectName( RESOURCELINK_TYPE + ",*"); - + ObjectName rname = null; + if (resourcetype!=null) { + if (resourcetype.equals("Global")) { + rname = new ObjectName( RESOURCELINK_TYPE + GLOBAL_TYPE + ",*"); + } else if (resourcetype.equals("Context")) { + rname = new ObjectName (RESOURCELINK_TYPE + CONTEXT_TYPE + + ",path=" + path + ",host=" + host + ",service=" + + service + ",*"); + } else if (resourcetype.equals("DefaultContext")) { + // add defaultcontext support later + } + } + Iterator iterator = (mserver.queryMBeans(rname, null).iterator()); ArrayList results = new ArrayList(); @@ -199,8 +263,30 @@ ResourceLinksForm resourceLinksForm = new ResourceLinksForm(); resourceLinksForm.setResourceLinks((String[]) results.toArray(new String[results.size()])); + + if (resourcetype != null) { + resourceLinksForm.setResourcetype(resourcetype); + } else { + resourceLinksForm.setResourcetype(""); + } + if (path != null) { + resourceLinksForm.setPath(path); + } else { + resourceLinksForm.setPath(""); + } + if (host != null) { + resourceLinksForm.setHost(host); + } else { + resourceLinksForm.setHost(""); + } + if (service != null) { + resourceLinksForm.setService(service); + } else { + resourceLinksForm.setService(""); + } + return (resourceLinksForm); - + } /** 1.8 +10 -10 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/ResourcesTreeBuilder.java Index: ResourcesTreeBuilder.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/ResourcesTreeBuilder.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- ResourcesTreeBuilder.java 13 Jun 2002 23:17:57 -0000 1.7 +++ ResourcesTreeBuilder.java 14 Jun 2002 13:29:29 -0000 1.8 @@ -133,7 +133,7 @@ ("Globally Administer Data Sources", "Datasource.gif", resources.getMessage("resources.treeBuilder.datasources"), - "resources/listDataSources.do?forward=" + + "resources/listDataSources.do?resourcetype=Global&forward=" + URLEncoder.encode("DataSources List Setup"), "content", false); @@ -148,11 +148,11 @@ TreeControlNode envs = new TreeControlNode ("Globally Administer Environment Entries", "EnvironmentEntries.gif", - resources.getMessage("resources.env.entries"), - "resources/listEnvEntries.do?forward=" + - URLEncoder.encode("EnvEntries List Setup"), - "content", - false); + resources.getMessage("resources.env.entries"), + "resources/listEnvEntries.do?resourcetype=Global&forward=" + + URLEncoder.encode("EnvEntries List Setup"), + "content", + false); root.addChild(subtree); subtree.addChild(datasources); subtree.addChild(envs); 1.6 +25 -8 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/SaveDataSourceAction.java Index: SaveDataSourceAction.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/SaveDataSourceAction.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- SaveDataSourceAction.java 16 May 2002 21:47:30 -0000 1.5 +++ SaveDataSourceAction.java 14 Jun 2002 13:29:29 -0000 1.6 @@ -177,13 +177,30 @@ Object params[] = new Object[2]; params[0] = dataSourceForm.getJndiName(); params[1] = ResourceUtils.DATASOURCE_CLASS; - + + String resourcetype = dataSourceForm.getResourcetype(); + String path = dataSourceForm.getPath(); + String host = dataSourceForm.getHost(); + String service = dataSourceForm.getService(); + ObjectName oname = null; try { - - // Construct the MBean Name for the naming source - oname = new ObjectName(ResourceUtils.NAMINGRESOURCES_TYPE); + if (resourcetype!=null) { + // Construct the MBean Name for the naming source + if (resourcetype.equals("Global")) { + oname = + new ObjectName(ResourceUtils.NAMINGRESOURCES_TYPE + + ResourceUtils.GLOBAL_TYPE); + } else if (resourcetype.equals("Context")) { + oname = + new ObjectName (ResourceUtils.NAMINGRESOURCES_TYPE + + ResourceUtils.CONTEXT_TYPE + ",path=" + path + + ",host=" + host + ",service=" + service); + } else if (resourcetype.equals("DefaultContext")) { + // add defaultcontext support later + } + } // Create the new object and associated MBean objectName = (String) mserver.invoke(oname, "addResource", 1.7 +25 -8 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/SaveEnvEntryAction.java Index: SaveEnvEntryAction.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/SaveEnvEntryAction.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- SaveEnvEntryAction.java 7 May 2002 21:13:27 -0000 1.6 +++ SaveEnvEntryAction.java 14 Jun 2002 13:29:29 -0000 1.7 @@ -177,15 +177,32 @@ Object params[] = new Object[2]; params[0] = envEntryForm.getName(); - params[1] = envEntryForm.getEntryType(); + params[1] = envEntryForm.getEntryType(); + + String resourcetype = envEntryForm.getResourcetype(); + String path = envEntryForm.getPath(); + String host = envEntryForm.getHost(); + String service = envEntryForm.getService(); ObjectName oname = null; try { - // Construct the MBean Name for the naming source - oname = new ObjectName(ResourceUtils.NAMINGRESOURCES_TYPE); - + if (resourcetype!=null) { + // Construct the MBean Name for the naming source + if (resourcetype.equals("Global")) { + oname = + new ObjectName(ResourceUtils.NAMINGRESOURCES_TYPE + + ResourceUtils.GLOBAL_TYPE); + } else if (resourcetype.equals("Context")) { + oname = + new ObjectName (ResourceUtils.NAMINGRESOURCES_TYPE + + ResourceUtils.CONTEXT_TYPE + ",path=" + path + + ",host=" + host + ",service=" + service); + } else if (resourcetype.equals("DefaultContext")) { + // add defaultcontext support later + } + } // Create the new object and associated MBean objectName = (String) mserver.invoke(oname, "addEnvironment", params, signature); 1.2 +28 -14 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/SaveResourceLinkAction.java Index: SaveResourceLinkAction.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/SaveResourceLinkAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- SaveResourceLinkAction.java 13 Jun 2002 18:34:33 -0000 1.1 +++ SaveResourceLinkAction.java 14 Jun 2002 13:29:29 -0000 1.2 @@ -176,18 +176,32 @@ Object params[] = new Object[2]; params[0] = resourceLinkForm.getName(); - - // fix the type later ----- - //params[1] = ResourceUtils.DATASOURCE_CLASS; params[1] = resourceLinkForm.getType(); - + + String resourcetype = resourceLinkForm.getResourcetype(); + String path = resourceLinkForm.getPath(); + String host = resourceLinkForm.getHost(); + String service = resourceLinkForm.getService(); + ObjectName oname = null; try { - // Construct the MBean Name for the naming source - oname = new ObjectName(ResourceUtils.NAMINGRESOURCES_TYPE); - + if (resourcetype!=null) { + // Construct the MBean Name for the naming source + if (resourcetype.equals("Global")) { + oname = + new ObjectName(ResourceUtils.NAMINGRESOURCES_TYPE + + ResourceUtils.GLOBAL_TYPE); + } else if (resourcetype.equals("Context")) { + oname = + new ObjectName (ResourceUtils.NAMINGRESOURCES_TYPE + + ResourceUtils.CONTEXT_TYPE + ",path=" + path + + ",host=" + host + ",service=" + service); + } else if (resourcetype.equals("DefaultContext")) { + // add defaultcontext support later + } + } // Create the new object and associated MBean objectName = (String) mserver.invoke(oname, "addResourceLink", params, signature); @@ -196,11 +210,11 @@ getServlet().log (resources.getMessage(locale, "users.error.invoke", - "addResource"), e); + "addResourceLink"), e); response.sendError (HttpServletResponse.SC_INTERNAL_SERVER_ERROR, resources.getMessage(locale, "users.error.invoke", - "addResource")); + "addResourceLink")); return (null); } @@ -211,7 +225,7 @@ try { ObjectName oname = new ObjectName(objectName); - + getServlet().log(objectName); attribute = "name"; mserver.setAttribute (oname, 1.7 +13 -5 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/SetUpDataSourceAction.java Index: SetUpDataSourceAction.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/SetUpDataSourceAction.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- SetUpDataSourceAction.java 16 May 2002 21:47:30 -0000 1.6 +++ SetUpDataSourceAction.java 14 Jun 2002 13:29:29 -0000 1.7 @@ -152,8 +152,16 @@ // Set up the form bean based on the creating or editing state String objectName = request.getParameter("objectName"); + String resourcetype = request.getParameter("resourcetype"); + String path = request.getParameter("path"); + String host = request.getParameter("host"); + String service = request.getParameter("service"); - DataSourceForm dataSourceForm = new DataSourceForm(); + DataSourceForm dataSourceForm = new DataSourceForm(); + dataSourceForm.setResourcetype(resourcetype); + dataSourceForm.setPath(path); + dataSourceForm.setHost(host); + dataSourceForm.setService(service); dataSourceForm.setType(ResourceUtils.DATASOURCE_CLASS); if (objectName == null) { 1.5 +14 -11 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/SetUpEnvEntryAction.java Index: SetUpEnvEntryAction.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/SetUpEnvEntryAction.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- SetUpEnvEntryAction.java 13 Jun 2002 23:17:57 -0000 1.4 +++ SetUpEnvEntryAction.java 14 Jun 2002 13:29:29 -0000 1.5 @@ -150,24 +150,27 @@ } HttpSession session = request.getSession(); Locale locale = (Locale) session.getAttribute(Action.LOCALE_KEY); - - String parentName = request.getParameter("parent"); - String parentType = request.getParameter("parentType"); // Set up the form bean based on the creating or editing state String objectName = request.getParameter("objectName"); + String resourcetype = request.getParameter("resourcetype"); + String path = request.getParameter("path"); + String host = request.getParameter("host"); + String service = request.getParameter("service"); - EnvEntryForm envEntryForm = new EnvEntryForm(); + EnvEntryForm envEntryForm = new EnvEntryForm(); + envEntryForm.setResourcetype(resourcetype); + envEntryForm.setPath(path); + envEntryForm.setHost(host); + envEntryForm.setService(service); if (objectName == null) { envEntryForm.setNodeLabel (resources.getMessage(locale, "resources.actions.env.create")); - envEntryForm.setObjectName(null); + envEntryForm.setObjectName(null); } else { envEntryForm.setNodeLabel (resources.getMessage(locale, "resources.actions.env.edit")); envEntryForm.setObjectName(objectName); - envEntryForm.setParentName(parentName); - envEntryForm.setParentType(parentType); String attribute = null; try { 1.2 +14 -8 jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/SetUpResourceLinkAction.java Index: SetUpResourceLinkAction.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/SetUpResourceLinkAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- SetUpResourceLinkAction.java 13 Jun 2002 18:34:33 -0000 1.1 +++ SetUpResourceLinkAction.java 14 Jun 2002 13:29:29 -0000 1.2 @@ -152,14 +152,20 @@ // Set up the form bean based on the creating or editing state String objectName = request.getParameter("objectName"); + String resourcetype = request.getParameter("resourcetype"); + String path = request.getParameter("path"); + String host = request.getParameter("host"); + String service = request.getParameter("service"); - ResourceLinkForm resourceLinkForm = new ResourceLinkForm(); - // fix type - //resourceLinkForm.setType(ResourceUtils.DATASOURCE_CLASS); - + ResourceLinkForm resourceLinkForm = new ResourceLinkForm(); + resourceLinkForm.setResourcetype(resourcetype); + resourceLinkForm.setPath(path); + resourceLinkForm.setHost(host); + resourceLinkForm.setService(service); if (objectName == null) { resourceLinkForm.setNodeLabel (resources.getMessage(locale, "resources.actions.resourcelk.create")); + resourceLinkForm.setObjectName(null); } else { resourceLinkForm.setNodeLabel 1.7 +4 -0 jakarta-tomcat-4.0/webapps/admin/resources/dataSource.jsp Index: dataSource.jsp =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/resources/dataSource.jsp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- dataSource.jsp 10 May 2002 22:41:41 -0000 1.6 +++ dataSource.jsp 14 Jun 2002 13:29:29 -0000 1.7 @@ -21,6 +21,10 @@ <html:hidden property="objectName"/> <html:hidden property="type"/> + <html:hidden property="resourcetype"/> + <html:hidden property="path"/> + <html:hidden property="host"/> + <html:hidden property="service"/> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr class="page-title-row"> 1.8 +5 -1 jakarta-tomcat-4.0/webapps/admin/resources/dataSources.jspf Index: dataSources.jspf =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/resources/dataSources.jspf,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- dataSources.jspf 9 May 2002 21:27:27 -0000 1.7 +++ dataSources.jspf 14 Jun 2002 13:29:29 -0000 1.8 @@ -29,7 +29,11 @@ </logic:present> <td><div align="left" class="table-normal-text"> <html:link page='<%= "/resources/setUpDataSource.do?objectName=" + - URLEncoder.encode(dataSource) %>'> + URLEncoder.encode(dataSource) + "&resourcetype=" + + URLEncoder.encode(resourcetypeInfo) + "&path="+ + URLEncoder.encode(pathInfo) + "&host="+ + URLEncoder.encode(hostInfo) + "&service="+ + URLEncoder.encode(serviceInfo) %>'> <controls:attribute name="dataSource" attribute="name"/> </html:link> </div></td> 1.3 +33 -0 jakarta-tomcat-4.0/webapps/admin/resources/deleteEnvEntries.jsp Index: deleteEnvEntries.jsp =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/resources/deleteEnvEntries.jsp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- deleteEnvEntries.jsp 10 May 2002 22:41:41 -0000 1.2 +++ deleteEnvEntries.jsp 14 Jun 2002 13:29:29 -0000 1.3 @@ -18,6 +18,21 @@ <html:form action="/resources/listEnvEntries"> + <bean:define id="resourcetypeInfo" type="java.lang.String" + name="envEntriesForm" property="resourcetype"/> + <html:hidden property="resourcetype"/> + + <bean:define id="pathInfo" type="java.lang.String" + name="envEntriesForm" property="path"/> + <html:hidden property="path"/> + + <bean:define id="hostInfo" type="java.lang.String" + name="envEntriesForm" property="host"/> + <html:hidden property="host"/> + + <bean:define id="serviceInfo" type="java.lang.String" + name="envEntriesForm" property="service"/> + <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr bgcolor="7171A5"> <td width="81%"> @@ -36,8 +51,26 @@ </html:form> <br> + <bean:define id="checkboxes" scope="page" value="true"/> + <html:form action="/resources/deleteEnvEntries"> + + <bean:define id="resourcetypeInfo" type="java.lang.String" + name="envEntriesForm" property="resourcetype"/> + <html:hidden property="resourcetype"/> + + <bean:define id="pathInfo" type="java.lang.String" + name="envEntriesForm" property="path"/> + <html:hidden property="path"/> + + <bean:define id="hostInfo" type="java.lang.String" + name="envEntriesForm" property="host"/> + <html:hidden property="host"/> + + <bean:define id="serviceInfo" type="java.lang.String" + name="envEntriesForm" property="service"/> + <%@ include file="../buttons.jsp" %> <br> <%@ include file="envEntries.jspf" %> 1.8 +5 -5 jakarta-tomcat-4.0/webapps/admin/resources/envEntries.jspf Index: envEntries.jspf =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/resources/envEntries.jspf,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- envEntries.jspf 13 Jun 2002 23:17:57 -0000 1.7 +++ envEntries.jspf 14 Jun 2002 13:29:29 -0000 1.8 @@ -32,11 +32,11 @@ </logic:present> <td><div align="left" class="table-normal-text"> <html:link page='<%= "/resources/setUpEnvEntry.do?objectName=" + - URLEncoder.encode(envEntry) + - "&parent=" + - URLEncoder.encode(parentNameInfo) + - "&parentType="+ - URLEncoder.encode(parentTypeInfo) %>'> + URLEncoder.encode(envEntry) + "&resourcetype=" + + URLEncoder.encode(resourcetypeInfo) + "&path="+ + URLEncoder.encode(pathInfo) + "&host="+ + URLEncoder.encode(hostInfo) + "&service="+ + URLEncoder.encode(serviceInfo) %>'> <controls:attribute name="envEntry" attribute="name"/> </html:link> </div></td> 1.6 +4 -0 jakarta-tomcat-4.0/webapps/admin/resources/envEntry.jsp Index: envEntry.jsp =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/resources/envEntry.jsp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- envEntry.jsp 10 May 2002 22:41:41 -0000 1.5 +++ envEntry.jsp 14 Jun 2002 13:29:29 -0000 1.6 @@ -20,6 +20,10 @@ <html:form method="POST" action="/resources/saveEnvEntry"> <html:hidden property="objectName"/> + <html:hidden property="resourcetype"/> + <html:hidden property="path"/> + <html:hidden property="host"/> + <html:hidden property="service"/> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr class="page-title-row"> 1.3 +17 -2 jakarta-tomcat-4.0/webapps/admin/resources/listDataSources.jsp Index: listDataSources.jsp =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/resources/listDataSources.jsp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- listDataSources.jsp 10 May 2002 22:41:41 -0000 1.2 +++ listDataSources.jsp 14 Jun 2002 13:29:29 -0000 1.3 @@ -18,6 +18,22 @@ <html:form action="/resources/listDataSources"> + <bean:define id="resourcetypeInfo" type="java.lang.String" + name="dataSourcesForm" property="resourcetype"/> + <html:hidden property="resourcetype"/> + + <bean:define id="pathInfo" type="java.lang.String" + name="dataSourcesForm" property="path"/> + <html:hidden property="path"/> + + <bean:define id="hostInfo" type="java.lang.String" + name="dataSourcesForm" property="host"/> + <html:hidden property="host"/> + + <bean:define id="serviceInfo" type="java.lang.String" + name="dataSourcesForm" property="service"/> + <html:hidden property="service"/> + <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr bgcolor="7171A5"> <td width="81%"> @@ -33,13 +49,12 @@ </tr> </table> -</html:form> - <br> <%@ include file="dataSources.jspf" %> <br> +</html:form> </body> </html:html> 1.3 +5 -1 jakarta-tomcat-4.0/webapps/admin/resources/listDataSources.jspf Index: listDataSources.jspf =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/resources/listDataSources.jspf,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- listDataSources.jspf 8 May 2002 00:34:02 -0000 1.2 +++ listDataSources.jspf 14 Jun 2002 13:29:30 -0000 1.3 @@ -8,7 +8,11 @@ --------------------------------- </controls:action> - <controls:action url="/resources/setUpDataSource.do"> + <controls:action url='<%= "/resources/setUpDataSource.do?resourcetype=" + + URLEncoder.encode(resourcetypeInfo) + "&path="+ + URLEncoder.encode(pathInfo) + "&host="+ + URLEncoder.encode(hostInfo) + "&service="+ + URLEncoder.encode(serviceInfo) %>'> <bean:message key="resources.actions.datasrc.create"/> </controls:action> 1.6 +14 -6 jakarta-tomcat-4.0/webapps/admin/resources/listEnvEntries.jsp Index: listEnvEntries.jsp =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/resources/listEnvEntries.jsp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- listEnvEntries.jsp 13 Jun 2002 23:17:57 -0000 1.5 +++ listEnvEntries.jsp 14 Jun 2002 13:29:30 -0000 1.6 @@ -18,13 +18,21 @@ <html:form action="/resources/listEnvEntries"> - <bean:define id="parentNameInfo" type="java.lang.String" - name="envEntriesForm" property="parentName"/> - <html:hidden property="parentName"/> + <bean:define id="resourcetypeInfo" type="java.lang.String" + name="envEntriesForm" property="resourcetype"/> + <html:hidden property="resourcetype"/> - <bean:define id="parentTypeInfo" type="java.lang.String" - name="envEntriesForm" property="parentType"/> - <html:hidden property="parentType"/> + <bean:define id="pathInfo" type="java.lang.String" + name="envEntriesForm" property="path"/> + <html:hidden property="path"/> + + <bean:define id="hostInfo" type="java.lang.String" + name="envEntriesForm" property="host"/> + <html:hidden property="host"/> + + <bean:define id="serviceInfo" type="java.lang.String" + name="envEntriesForm" property="service"/> + <html:hidden property="service"/> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr bgcolor="7171A5"> 1.5 +11 -5 jakarta-tomcat-4.0/webapps/admin/resources/listEnvEntries.jspf Index: listEnvEntries.jspf =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/resources/listEnvEntries.jspf,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- listEnvEntries.jspf 13 Jun 2002 23:17:57 -0000 1.4 +++ listEnvEntries.jspf 14 Jun 2002 13:29:30 -0000 1.5 @@ -8,14 +8,20 @@ --------------------------------- </controls:action> - <controls:action url='<%= "/resources/setUpEnvEntry.do?parent=" + - URLEncoder.encode(parentNameInfo) + "&parentType="+ - URLEncoder.encode(parentTypeInfo) %>'> + <controls:action url='<%= "/resources/setUpEnvEntry.do?resourcetype=" + + URLEncoder.encode(resourcetypeInfo) + "&path="+ + URLEncoder.encode(pathInfo) + "&host="+ + URLEncoder.encode(hostInfo) + "&service="+ + URLEncoder.encode(serviceInfo) %>'> <bean:message key="resources.actions.env.create"/> </controls:action> - <controls:action url='<%= "/resources/listEnvEntries.do?forward=" - + URLEncoder.encode("EnvEntries Delete List") %>'> + <controls:action url='<%= "/resources/listEnvEntries.do?resourcetype=" + + URLEncoder.encode(resourcetypeInfo) + "&path="+ + URLEncoder.encode(pathInfo) + "&host="+ + URLEncoder.encode(hostInfo) + "&service="+ + URLEncoder.encode(serviceInfo) + "&forward="+ + URLEncoder.encode("EnvEntries Delete List") %>'> <bean:message key="resources.actions.env.delete"/> </controls:action> 1.2 +17 -2 jakarta-tomcat-4.0/webapps/admin/resources/listResourceLinks.jsp Index: listResourceLinks.jsp =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/resources/listResourceLinks.jsp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- listResourceLinks.jsp 13 Jun 2002 18:34:45 -0000 1.1 +++ listResourceLinks.jsp 14 Jun 2002 13:29:30 -0000 1.2 @@ -18,6 +18,22 @@ <html:form action="/resources/listResourceLinks"> + <bean:define id="resourcetypeInfo" type="java.lang.String" + name="resourceLinksForm" property="resourcetype"/> + <html:hidden property="resourcetype"/> + + <bean:define id="pathInfo" type="java.lang.String" + name="resourceLinksForm" property="path"/> + <html:hidden property="path"/> + + <bean:define id="hostInfo" type="java.lang.String" + name="resourceLinksForm" property="host"/> + <html:hidden property="host"/> + + <bean:define id="serviceInfo" type="java.lang.String" + name="resourceLinksForm" property="service"/> + <html:hidden property="service"/> + <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr bgcolor="7171A5"> <td width="81%"> @@ -33,13 +49,12 @@ </tr> </table> -</html:form> - <br> <%@ include file="resourceLinks.jspf" %> <br> +</html:form> </body> </html:html> 1.2 +5 -1 jakarta-tomcat-4.0/webapps/admin/resources/listResourceLinks.jspf Index: listResourceLinks.jspf =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/resources/listResourceLinks.jspf,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- listResourceLinks.jspf 13 Jun 2002 18:34:45 -0000 1.1 +++ listResourceLinks.jspf 14 Jun 2002 13:29:30 -0000 1.2 @@ -8,7 +8,11 @@ --------------------------------- </controls:action> - <controls:action url="/resources/setUpResourceLink.do"> + <controls:action url='<%= "/resources/setUpResourceLink.do?resourcetype=" + + URLEncoder.encode(resourcetypeInfo) + "&path="+ + URLEncoder.encode(pathInfo) + "&host="+ + URLEncoder.encode(hostInfo) + "&service="+ + URLEncoder.encode(serviceInfo) %>'> <bean:message key="resources.actions.resourcelk.create"/> </controls:action> 1.2 +4 -1 jakarta-tomcat-4.0/webapps/admin/resources/resourceLink.jsp Index: resourceLink.jsp =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/resources/resourceLink.jsp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- resourceLink.jsp 13 Jun 2002 18:34:45 -0000 1.1 +++ resourceLink.jsp 14 Jun 2002 13:29:30 -0000 1.2 @@ -19,8 +19,11 @@ <html:form method="POST" action="/resources/saveResourceLink"> - <html:hidden property="parentObjectName"/> <html:hidden property="objectName"/> + <html:hidden property="resourcetype"/> + <html:hidden property="path"/> + <html:hidden property="host"/> + <html:hidden property="service"/> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr class="page-title-row"> 1.2 +5 -1 jakarta-tomcat-4.0/webapps/admin/resources/resourceLinks.jspf Index: resourceLinks.jspf =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/resources/resourceLinks.jspf,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- resourceLinks.jspf 13 Jun 2002 18:34:45 -0000 1.1 +++ resourceLinks.jspf 14 Jun 2002 13:29:30 -0000 1.2 @@ -29,7 +29,11 @@ </logic:present> <td><div align="left" class="table-normal-text"> <html:link page='<%= "/resources/setUpResourceLink.do?objectName=" + - URLEncoder.encode(resourceLink) %>'> + URLEncoder.encode(resourceLink) + "&resourcetype=" + + URLEncoder.encode(resourcetypeInfo) + "&path="+ + URLEncoder.encode(pathInfo) + "&host="+ + URLEncoder.encode(hostInfo) + "&service="+ + URLEncoder.encode(serviceInfo) %>'> <controls:attribute name="resourceLink" attribute="name"/> </html:link> </div></td>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>