Please commit my patch in the HEAD branch.
Made changes to struts-config, internationalization
ApplicationResources.properties files, and tree builder for the new
"server" screen.
Index: ./WEB-INF/struts-config.xml
===================================================================
RCS file: /home/cvspublic/jakarta-tomcat-4.0/webapps/admin/WEB-INF/struts-config.xml,v
retrieving revision 1.8
diff -u -r1.8 struts-config.xml
--- WEB-INF/struts-config.xml 2001/11/21 01:10:09 1.8
+++ WEB-INF/struts-config.xml 2001/12/06 21:10:42
@@ -19,6 +19,10 @@
<form-bean name="sampleForm"
type="org.apache.webapp.admin.SampleForm"/>
+ <!-- Server form bean -->
+ <form-bean name="serverForm"
+ type="org.apache.webapp.admin.ServerForm"/>
+
<!-- Set Locale form bean -->
<form-bean name="setLocaleForm"
type="org.apache.webapp.admin.SetLocaleForm"/>
@@ -46,6 +50,10 @@
path="/tree-control-test.jsp"
redirect="false"/>
+ <forward name="Server"
+ path="/server.jsp"
+ redirect="false"/>
+
<forward name="Save Successful"
path="/saved.jsp"
redirect="false"/>
@@ -73,6 +81,16 @@
redirect="true"/>
</action>
+ <!-- Set up Tree datastructure -->
+ <action path="/setUpServer"
+ type="org.apache.webapp.admin.SetUpServerAction"
+ name="serverForm"
+ scope="session">
+ <forward name="SetUpServer"
+ path="/server.jsp"
+ redirect="true"/>
+ </action>
+
<!-- Log out of the application -->
<action path="/logOut"
type="org.apache.webapp.admin.LogOutAction">
@@ -87,6 +105,14 @@
name="sampleForm"
scope="session"
input="/sample.jsp">
+ </action>
+
+ <!-- Process a user server change -->
+ <action path="/server"
+ type="org.apache.webapp.admin.ServerAction"
+ name="serverForm"
+ scope="session"
+ input="/server.jsp">
</action>
<!-- Process a set-locale action -->
Index: ./WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_en.properties
===================================================================
RCS file:
/home/cvspublic/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_en.properties,v
retrieving revision 1.4
diff -u -r1.4 ApplicationResources_en.properties
--- WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_en.properties
2001/11/18 17:17:08 1.4
+++ WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_en.properties
+2001/12/06 21:10:42
@@ -8,6 +8,7 @@
button.reset=Reset
button.save=Save
button.change=Change
+button.cancel=Cancel
login.enter=Enter a username and password to start a new session
login.changeLanguage=Change the language
index.success=Login successful!
@@ -21,3 +22,7 @@
sample.someText.required=<li>"Some Text" cannot be empty</li>
sample.moreText.required=<li>"More Text" cannot be empty</li>
save.success=Save sucessful!
+server.heading=Tomcat Server
+server.portnumber=Port Number
+server.debuglevel=Debug Level
+server.shutdown=Shutdown
Index: ./WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_es.properties
===================================================================
RCS file:
/home/cvspublic/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_es.properties,v
retrieving revision 1.4
diff -u -r1.4 ApplicationResources_es.properties
--- WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_es.properties
2001/11/18 17:17:08 1.4
+++ WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_es.properties
+2001/12/06 21:10:42
@@ -8,6 +8,7 @@
button.reset=Reiniciar
button.save=Guardar
button.change=Cambiar
+button.cancel=Cancelan
login.enter=Introduzca un nombre de usuario y una contrase\u00f1a que empezar una
sesi\u00f3n nueva
login.changeLanguage=Cambie el idioma
index.success=\u00a1Autenticaci\u00f3n tiene \u00e9xito!
@@ -21,3 +22,7 @@
sample.someText.required=<li>\u00abAlg\u00fan Texto\u00bb no puede ser vac\u00edo</li>
sample.moreText.required=<li>\u00abM\u00e1s Texto\u00bb no puede ser vac\u00edo</li>
save.success=\u00a1Guardar tiene \u00e9xito!
+server.heading=Tomcat Servidor
+server.portnumber=N�mero de acceso
+server.debuglevel=Ponga a punto Llano
+server.shutdown=Parada normal
Index: ./WEB-INF/classes/org/apache/webapp/admin/TomcatTreeBuilder.java
===================================================================
RCS file:
/home/cvspublic/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/TomcatTreeBuilder.java,v
retrieving revision 1.1
diff -u -r1.1 TomcatTreeBuilder.java
--- WEB-INF/classes/org/apache/webapp/admin/TomcatTreeBuilder.java 2001/11/27
02:46:28 1.1
+++ WEB-INF/classes/org/apache/webapp/admin/TomcatTreeBuilder.java 2001/12/06
+21:10:42
@@ -100,11 +100,11 @@
// This SERVER_LABEL needs to be localized
private final static String SERVER_LABEL = "Tomcat Server";
- private final static String SERVER_TYPE = "Catalina:type=Server";
+ public final static String SERVER_TYPE = "Catalina:type=Server";
private final static String SERVICE_TYPE = "Catalina:type=Service";
private final static String ENGINE_TYPE = "Engine";
private final static String CONNECTOR_TYPE = "Catalina:type=Connector";
- private final static String WILDCARD = ",*";
+ public final static String WILDCARD = ",*";
private static MBeanServer mBServer = null;
@@ -135,15 +135,15 @@
// HACK to take into account special characters like = and &
// in the node name, could remove this code if encode URL
// and later request.getParameter() could deal with = and &
- // character in parameter values. Must decode name in users action.
- // TreeControlTest.java in this case
+ // character in parameter values. Decoding name not needed
+ // because Tomcat does this automatically
String encodedServerName = URLEncoder.encode(serverObjName);
TreeControlNode serverNode =
new TreeControlNode(serverObjName,
"folder_16_pad.gif", SERVER_LABEL,
- "treeControlTest.do?select=" + encodedServerName,
- null, true);
+ "setUpServer.do?select=" + encodedServerName,
+ "content", true);
return serverNode;
@@ -168,8 +168,9 @@
// HACK to take into account special characters like = and &
// in the node name, could remove this code if encode URL
// and later request.getParameter() could deal with = and &
- // character in parameter values. Must decode name in users action.
- // TreeControlTest.java in this case
+ // character in parameter values. Decoding name not needed
+ // because Tomcat does this automatically
+
encodedServiceName =
URLEncoder.encode(service.getObjectName().toString());
TreeControlNode serviceNode =
@@ -210,8 +211,9 @@
// HACK to take into account special characters like = and &
// in the node name, could remove this code if encode URL
// and later request.getParameter() could deal with = and &
- // character in parameter values. Must decode name in users action.
- // TreeControlTest.java in this case
+ // character in parameter values. Decoding name not needed
+ // because Tomcat does this automatically
+
encodedConnectorName =
URLEncoder.encode(connectorObj.getObjectName().toString());
connectorNode =
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>