You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/03/06 22:39:06 UTC
DO NOT REPLY [Bug 17744] New: -
Broken functionality when not rooted under /admin
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17744>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17744
Broken functionality when not rooted under /admin
Summary: Broken functionality when not rooted under /admin
Product: Tomcat 4
Version: 4.1.18
Platform: Alpha
OS/Version: Other
Status: NEW
Severity: Major
Priority: Other
Component: Webapps:Administration
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: Richard.June@hp.com
When the admin webapp isn't rooted under "/admin", a number of links don't work
because they are hardcoded as "/admin/rest_of_link". The "/admin" part should
be removed from these URLs to make them relative. Note that the admin webapp
not being rooted under "/admin" is a pretty common need, like when Tomcat is
accessed through a web server and having the Tomcat administration utility
hanging off "/admin" beneath the web server root doesn't make sense.
Note also that bug 10057 reports one of the problems detailed below.
Diffs for the following files are attached below:
org/apache/webapp/admin/connector/AddConnectorAction.java
org/apache/webapp/admin/logger/AddLoggerAction.java
org/apache/webapp/admin/realm/AddRealmAction.java
org/apache/webapp/admin/valve/AddValveAction.java
webapps/admin/banner.jsp
*** AddConnectorAction.java.orig Thu Mar 6 16:04:45 2003
--- AddConnectorAction.java Thu Mar 6 16:05:33 2003
***************
*** 174,185 ****
ArrayList types = new ArrayList();
// the first element in the select list should be the type selected
types.add(new LabelValueBean(type,
! "/admin/AddConnector.do?serviceName=" +
URLEncoder.encode(serviceName)
+ "&type=" + type));
for (int i=0; i< schemeTypes.length; i++) {
if (!type.equalsIgnoreCase(schemeTypes[i])) {
types.add(new LabelValueBean(schemeTypes[i],
! "/admin/AddConnector.do?serviceName=" +
URLEncoder.encode(serviceName)
+ "&type=" + schemeTypes[i]));
}
}
--- 174,185 ----
ArrayList types = new ArrayList();
// the first element in the select list should be the type selected
types.add(new LabelValueBean(type,
! "AddConnector.do?serviceName=" + URLEncoder.encode(serviceName)
+ "&type=" + type));
for (int i=0; i< schemeTypes.length; i++) {
if (!type.equalsIgnoreCase(schemeTypes[i])) {
types.add(new LabelValueBean(schemeTypes[i],
! "AddConnector.do?serviceName=" + URLEncoder.encode(serviceName)
+ "&type=" + schemeTypes[i]));
}
}
*** AddLoggerAction.java.orig Thu Mar 6 16:05:55 2003
--- AddLoggerAction.java Thu Mar 6 16:06:23 2003
***************
*** 147,158 ****
ArrayList types = new ArrayList();
// the first element in the select list should be the type selected
types.add(new LabelValueBean(type,
! "/admin/AddLogger.do?parent=" + URLEncoder.encode(parent)
+ "&type=" + type));
for (int i=0; i< loggerTypes.length; i++) {
if (!type.equalsIgnoreCase(loggerTypes[i])) {
types.add(new LabelValueBean(loggerTypes[i],
! "/admin/AddLogger.do?parent=" + URLEncoder.encode(parent)
+ "&type=" + loggerTypes[i]));
}
}
--- 147,158 ----
ArrayList types = new ArrayList();
// the first element in the select list should be the type selected
types.add(new LabelValueBean(type,
! "AddLogger.do?parent=" + URLEncoder.encode(parent)
+ "&type=" + type));
for (int i=0; i< loggerTypes.length; i++) {
if (!type.equalsIgnoreCase(loggerTypes[i])) {
types.add(new LabelValueBean(loggerTypes[i],
! "AddLogger.do?parent=" + URLEncoder.encode(parent)
+ "&type=" + loggerTypes[i]));
}
}
*** AddRealmAction.java.orig Thu Feb 27 15:35:15 2003
--- AddRealmAction.java Thu Feb 27 15:36:20 2003
***************
*** 142,153 ****
types = new ArrayList();
// the first element in the select list should be the type selected
types.add(new LabelValueBean(type,
! "/admin/AddRealm.do?parent=" + URLEncoder.encode(parent)
+ "&type=" + type));
for (int i=0; i< realmTypes.length; i++) {
if (!type.equalsIgnoreCase(realmTypes[i])) {
types.add(new LabelValueBean(realmTypes[i],
! "/admin/AddRealm.do?parent=" + URLEncoder.encode(parent)
+ "&type=" + realmTypes[i]));
}
}
--- 142,153 ----
types = new ArrayList();
// the first element in the select list should be the type selected
types.add(new LabelValueBean(type,
! "AddRealm.do?parent=" + URLEncoder.encode(parent)
+ "&type=" + type));
for (int i=0; i< realmTypes.length; i++) {
if (!type.equalsIgnoreCase(realmTypes[i])) {
types.add(new LabelValueBean(realmTypes[i],
! "AddRealm.do?parent=" + URLEncoder.encode(parent)
+ "&type=" + realmTypes[i]));
}
}
*** AddValveAction.java.orig Thu Mar 6 16:06:55 2003
--- AddValveAction.java Thu Mar 6 16:07:12 2003
***************
*** 142,153 ****
types = new ArrayList();
// the first element in the select list should be the type selected
types.add(new LabelValueBean(type,
! "/admin/AddValve.do?parent=" + URLEncoder.encode(parent)
+ "&type=" + type));
for (int i=0; i< valveTypes.length; i++) {
if (!type.equalsIgnoreCase(valveTypes[i])) {
types.add(new LabelValueBean(valveTypes[i],
! "/admin/AddValve.do?parent=" + URLEncoder.encode(parent)
+ "&type=" + valveTypes[i]));
}
}
--- 142,153 ----
types = new ArrayList();
// the first element in the select list should be the type selected
types.add(new LabelValueBean(type,
! "AddValve.do?parent=" + URLEncoder.encode(parent)
+ "&type=" + type));
for (int i=0; i< valveTypes.length; i++) {
if (!type.equalsIgnoreCase(valveTypes[i])) {
types.add(new LabelValueBean(valveTypes[i],
! "AddValve.do?parent=" + URLEncoder.encode(parent)
+ "&type=" + valveTypes[i]));
}
}
*** banner.jsp.orig Thu Mar 6 16:10:18 2003
--- banner.jsp Thu Mar 6 16:15:58 2003
***************
*** 20,26 ****
<td align="left" valign="middle">
<div class="masthead-title-text" align="left"><img
src="images/TomcatBanner.jpg" height="120"></div>
</td>
! <form method='post' action='/admin/commitChanges.do' target='_self'>
<td align="right" valign="middle">
<html:submit>
<bean:message key="button.commit"/>
--- 20,26 ----
<td align="left" valign="middle">
<div class="masthead-title-text" align="left"><img
src="images/TomcatBanner.jpg" height="120"></div>
</td>
! <form method='post' action='commitChanges.do' target='_self'>
<td align="right" valign="middle">
<html:submit>
<bean:message key="button.commit"/>
***************
*** 30,36 ****
<td width="1%">
<div class="table-normal-text" align="left">  </div>
</td>
! <form method='post' action='/admin/logOut.do' target='_top'>
<td align="right" valign="middle">
<html:submit>
<bean:message key="button.logout"/>
--- 30,36 ----
<td width="1%">
<div class="table-normal-text" align="left">  </div>
</td>
! <form method='post' action='logOut.do' target='_top'>
<td align="right" valign="middle">
<html:submit>
<bean:message key="button.logout"/>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org