You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by st...@apache.org on 2002/09/07 02:06:29 UTC
cvs commit: xml-axis/java/src/org/apache/axis/transport/http AdminServlet.java AxisServletBase.java
stevel 2002/09/06 17:06:29
Modified: java/src/org/apache/axis/transport/http AdminServlet.java
AxisServletBase.java
Log:
fixed bugs in getBaseURL, and moved isProduction() to isDevelopment ... you should only add things in dev; default is secure production system
Revision Changes Path
1.18 +2 -2 xml-axis/java/src/org/apache/axis/transport/http/AdminServlet.java
Index: AdminServlet.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/AdminServlet.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- AdminServlet.java 23 Aug 2002 00:33:41 -0000 1.17
+++ AdminServlet.java 7 Sep 2002 00:06:29 -0000 1.18
@@ -102,7 +102,7 @@
if (cmd != null) {
//who called?
String callerIP=request.getRemoteAddr();
- if (!isProduction()) {
+ if (isDevelopment()) {
//only in dev mode do these command work
if (cmd.equals("start")) {
log.info(JavaUtils.getMessage("adminServiceStart", callerIP));
@@ -127,7 +127,7 @@
buffer.append(JavaUtils.getMessage("serverStop00"));
}
//add commands
- if(!isProduction()) {
+ if(isDevelopment()) {
buffer.append("<p><a href=\"AdminServlet?cmd=start\">start server</a>\n");
buffer.append("<p><a href=\"AdminServlet?cmd=stop\">stop server</a>\n");
}
1.17 +10 -11 xml-axis/java/src/org/apache/axis/transport/http/AxisServletBase.java
Index: AxisServletBase.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/AxisServletBase.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- AxisServletBase.java 29 Aug 2002 20:05:51 -0000 1.16
+++ AxisServletBase.java 7 Sep 2002 00:06:29 -0000 1.17
@@ -125,13 +125,13 @@
/**
* flag set to true for a 'production' server
*/
- private boolean isProduction;
+ private boolean isDevelopment;
/**
* property name for a production server
*/
- private static final String INIT_PROPERTY_PRODUCTION_SYSTEM=
- "axis.production-system";
+ private static final String INIT_PROPERTY_DEVELOPMENT_SYSTEM=
+ "axis.development.system";
/**
@@ -145,8 +145,8 @@
isDebug = log.isDebugEnabled();
if(log.isDebugEnabled()) log.debug("In AxisServletBase init");
- isProduction= JavaUtils.isTrueExplicitly(getOption(context,
- INIT_PROPERTY_PRODUCTION_SYSTEM, null));
+ isDevelopment= JavaUtils.isTrueExplicitly(getOption(context,
+ INIT_PROPERTY_DEVELOPMENT_SYSTEM, null));
}
@@ -342,19 +342,18 @@
/**
* extract the base of our webapp from an inbound request
*
- * @param request request containing http://foobar/axis/services/
+ * @param request request containing http://foobar/axis/services/something
* @return http://foobar/axis/services/
*/
protected String getWebappBase(HttpServletRequest request) {
StringBuffer baseURL=new StringBuffer(128);
baseURL.append(request.getScheme());
- baseURL.append("//");
+ baseURL.append("://");
baseURL.append(request.getServerName());
if(request.getServerPort()!=80) {
baseURL.append(":");
baseURL.append(request.getServerPort());
}
- baseURL.append("/");
baseURL.append(request.getContextPath());
return baseURL.toString();
}
@@ -407,10 +406,10 @@
/**
* probe for the system being 'production'
- * @return true for a secure/robust system.
+ * @return true for a dev system.
*/
- public boolean isProduction() {
- return isProduction;
+ public boolean isDevelopment() {
+ return isDevelopment;
}
}