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 de...@apache.org on 2006/04/21 12:25:16 UTC

svn commit: r395835 - in /webservices/axis2/trunk/java/modules: core/ core/conf/ core/src/org/apache/axis2/ core/src/org/apache/axis2/transport/http/ webapp/ webapp/Error/ webapp/conf/ webapp/include/

Author: deepal
Date: Fri Apr 21 03:25:10 2006
New Revision: 395835

URL: http://svn.apache.org/viewcvs?rev=395835&view=rev
Log:
- applying Jens Schumann patch
(had to a one line modification)
- Thank you very much for improving web-admin module
- And now it seems to me that web admin module is completely changed !!!
- This kind of contribution is very valuable to improve the project quality 

Added:
    webservices/axis2/trunk/java/modules/webapp/Error/error404.jsp
    webservices/axis2/trunk/java/modules/webapp/Error/error500.jsp
    webservices/axis2/trunk/java/modules/webapp/include/httpbase.jsp
Modified:
    webservices/axis2/trunk/java/modules/core/conf/axis2.xml
    webservices/axis2/trunk/java/modules/core/project.xml
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AbstractAgent.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AdminAgent.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java
    webservices/axis2/trunk/java/modules/webapp/ActivateService.jsp
    webservices/axis2/trunk/java/modules/webapp/EngageToServiceGroup.jsp
    webservices/axis2/trunk/java/modules/webapp/HappyAxis.jsp
    webservices/axis2/trunk/java/modules/webapp/InActivateService.jsp
    webservices/axis2/trunk/java/modules/webapp/LeftFrame.jsp
    webservices/axis2/trunk/java/modules/webapp/ListServiceGroup.jsp
    webservices/axis2/trunk/java/modules/webapp/Login.jsp
    webservices/axis2/trunk/java/modules/webapp/MainFrame.jsp
    webservices/axis2/trunk/java/modules/webapp/SelectService.jsp
    webservices/axis2/trunk/java/modules/webapp/ServiceParaEdit.jsp
    webservices/axis2/trunk/java/modules/webapp/TopFrame.jsp
    webservices/axis2/trunk/java/modules/webapp/conf/web.xml
    webservices/axis2/trunk/java/modules/webapp/engagingglobally.jsp
    webservices/axis2/trunk/java/modules/webapp/engagingtoanoperation.jsp
    webservices/axis2/trunk/java/modules/webapp/engagingtoaservice.jsp
    webservices/axis2/trunk/java/modules/webapp/include/adminheader.jsp
    webservices/axis2/trunk/java/modules/webapp/index.jsp
    webservices/axis2/trunk/java/modules/webapp/listGroupService.jsp
    webservices/axis2/trunk/java/modules/webapp/listService.jsp
    webservices/axis2/trunk/java/modules/webapp/listServices.jsp
    webservices/axis2/trunk/java/modules/webapp/listSingleService.jsp
    webservices/axis2/trunk/java/modules/webapp/project.xml
    webservices/axis2/trunk/java/modules/webapp/upload.jsp

Modified: webservices/axis2/trunk/java/modules/core/conf/axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/conf/axis2.xml?rev=395835&r1=395834&r2=395835&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/conf/axis2.xml (original)
+++ webservices/axis2/trunk/java/modules/core/conf/axis2.xml Fri Apr 21 03:25:10 2006
@@ -14,6 +14,11 @@
     <parameter name="userName" locked="false">admin</parameter>
     <parameter name="password" locked="false">axis2</parameter>
 
+    <!-- If you have a frontend host which exposes this webservice using a different public URL  -->
+    <!-- use this parameter to override autodetected url -->
+    <!--<parameter name="httpFrontendHostUrl" locked="false">https://someotherhost/context</parameter>-->
+
+
     <!--    The way of adding listener to the system-->
     <!--    <listener class="org.apache.axis2.ObserverIMPL">-->
     <!--        <parameter name="RSS_URL" locked="false">http://127.0.0.1/rss</parameter>-->

Modified: webservices/axis2/trunk/java/modules/core/project.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/project.xml?rev=395835&r1=395834&r2=395835&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/project.xml (original)
+++ webservices/axis2/trunk/java/modules/core/project.xml Fri Apr 21 03:25:10 2006
@@ -120,14 +120,6 @@
             <artifactId>XmlSchema</artifactId>
             <version>${XmlSchema.version}</version>
         </dependency>
-        <!--<dependency>
-            <groupId>commons-fileupload</groupId>
-            <artifactId>commons-fileupload</artifactId>
-            <version>${commons.fileupload.version}</version>
-            <properties>
-                <module>true</module>
-            </properties>
-        </dependency>-->
         <dependency>
             <groupId>axis</groupId>
             <artifactId>axis-wsdl4j</artifactId>

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java?rev=395835&r1=395834&r2=395835&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java Fri Apr 21 03:25:10 2006
@@ -110,6 +110,7 @@
     public static final String ENGAGE_MODULE_TO_SERVICE = "engageToService";
     public static final String ENGAGE_GLOBAL_MODULE = "engagingglobally";
     public static final String ADMIN_LOGIN = "adminlogin";
+    public static final String AXIS_WEB_CONTENT_ROOT = "/axis2-web/";
 
     /**
      * List service for admin pages
@@ -183,6 +184,7 @@
      * Addressing Constants
      */
     public static final String ADDRESSING_ACTION = "WS-Addressing:Action";
+    public static final String HTTP_FRONTEND_HOST_URL = "httpFrontendHostUrl";
 
     public static interface Configuration {
         public static final String ENABLE_REST = "enableREST";

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AbstractAgent.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AbstractAgent.java?rev=395835&r1=395834&r2=395835&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AbstractAgent.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AbstractAgent.java Fri Apr 21 03:25:10 2006
@@ -1,5 +1,24 @@
+/*
+* Copyright 2004,2006 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*
+*/
+
 package org.apache.axis2.transport.http;
 
+import org.apache.axis2.Constants;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -9,17 +28,22 @@
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
 import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Arrays;
+import java.lang.reflect.Modifier;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 
 /**
+ * The AbstractAgent acts as a simple dispatcher for http requests.
+ * It delegates incoming requests to processXyz methods while Xyz
+ * is the part of the request uri past last /.
+ *
  * @author Jens Schumann - OpenKnowledge GmbH
  * @version $Id$
  */
 public class AbstractAgent {
+  protected static final String DEFAULT_INDEX_JSP = "index.jsp";
+
+  private static final String METHOD_PREFIX = "process";
   private static final Log log = LogFactory.getLog(AbstractAgent.class);
 
   protected Map operationCache = new HashMap();
@@ -30,10 +54,9 @@
     preloadMethods();
   }
 
-
   public void handle(HttpServletRequest httpServletRequest,
                      HttpServletResponse httpServletResponse)
-    throws IOException, Exception {
+    throws IOException, ServletException {
 
 
     String requestURI = httpServletRequest.getRequestURI();
@@ -43,7 +66,7 @@
     if (i < 0) {
       processUnknown(httpServletRequest, httpServletResponse);
       return;
-    } else if (i == requestURI.length()-1) {
+    } else if (i == requestURI.length() - 1) {
       processIndex(httpServletRequest, httpServletResponse);
       return;
     } else {
@@ -53,17 +76,37 @@
 
     Method method = (Method) operationCache.get(operation.toLowerCase());
     if (method != null) {
-      method.invoke(this, new Object[]{httpServletRequest, httpServletResponse});
+      try {
+        method.invoke(this, new Object[]{httpServletRequest, httpServletResponse});
+      } catch (Exception e) {
+        log.warn("Error dispatching request " + requestURI, e);
+        httpServletResponse.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+      }
     } else {
       processUnknown(httpServletRequest, httpServletResponse);
     }
   }
 
+  /**
+   *
+   * Callback method for index page. Forwards to {@link DEFAULT_INDEX_JSP} by default.
+   *
+   * @param httpServletRequest The incoming request.
+   * @param httpServletResponse The outgoing response.
+   */
   protected void processIndex(HttpServletRequest httpServletRequest,
                               HttpServletResponse httpServletResponse) throws IOException, ServletException {
-    renderView("index.jsp", httpServletRequest, httpServletResponse);
+    renderView(DEFAULT_INDEX_JSP, httpServletRequest, httpServletResponse);
   }
 
+  /**
+   *
+   * Callback method for unknown/unsupported requests. Returns HTTP Status 404 by default.
+   *
+   * @param httpServletRequest The incoming request.
+   * @param httpServletResponse The outgoing response.
+   */
+
   protected void processUnknown(HttpServletRequest httpServletRequest,
                                 HttpServletResponse httpServletResponse) throws IOException, ServletException {
     httpServletResponse.sendError(HttpServletResponse.SC_NOT_FOUND, httpServletRequest.getRequestURI());
@@ -73,29 +116,33 @@
   protected void renderView(String jspName,
                             HttpServletRequest httpServletRequest,
                             HttpServletResponse httpServletResponse) throws IOException, ServletException {
-    httpServletRequest.getRequestDispatcher("/axis2-web/" + jspName).include(httpServletRequest, httpServletResponse);
+    httpServletRequest.getRequestDispatcher(Constants.AXIS_WEB_CONTENT_ROOT + jspName).include(httpServletRequest, httpServletResponse);
 
   }
 
   private void preloadMethods() {
-    List allMethods = new ArrayList();
-    allMethods.addAll(Arrays.asList(getClass().getDeclaredMethods()));
-    Class clazz = getClass().getSuperclass();
+    Class clazz = getClass();
     while (clazz != null && !clazz.equals(Object.class)) {
-      allMethods.addAll(Arrays.asList(clazz.getDeclaredMethods()));
+      examineMethods(clazz.getDeclaredMethods());
       clazz = clazz.getSuperclass();
     }
+  }
 
-    for (int i = 0; i < allMethods.size(); i++) {
-      Method method = (Method) allMethods.get(i);
+  private void examineMethods(Method[] aDeclaredMethods) {
+    for (int i = 0; i < aDeclaredMethods.length; i++) {
+      Method method = aDeclaredMethods[i];
 
       Class[] parameterTypes = method.getParameterTypes();
-      if (method.getName().startsWith("process") &&
+      if (
+        (Modifier.isProtected(method.getModifiers()) || Modifier.isPublic(method.getModifiers())) &&
+        method.getName().startsWith(METHOD_PREFIX) &&
         parameterTypes.length == 2 &&
         parameterTypes[0].equals(HttpServletRequest.class) &&
         parameterTypes[1].equals(HttpServletResponse.class)) {
-        String key = method.getName().substring(7).toLowerCase();
 
+        String key = method.getName().substring(METHOD_PREFIX.length()).toLowerCase();
+
+        // ensure we don't overwrite existing method with superclass method
         if (!operationCache.containsKey(key)) {
           operationCache.put(key, method);
         }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AdminAgent.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AdminAgent.java?rev=395835&r1=395834&r2=395835&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AdminAgent.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AdminAgent.java Fri Apr 21 03:25:10 2006
@@ -1,3 +1,21 @@
+/*
+* Copyright 2004,2006 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*
+*/
+
 package org.apache.axis2.transport.http;
 
 import org.apache.axis2.AxisFault;
@@ -25,7 +43,9 @@
 import java.util.List;
 
 /**
- * @author Jens Schumann - OpenKnowledge GmbH
+ * Provides methods to process axis2 admin requests.
+ *
+ * @author Jens Schumann - OpenKnowledge GmbH (moved sources from ListingAgent)
  * @version $Id$
  */
 public class AdminAgent extends AbstractAgent {
@@ -53,38 +73,43 @@
   private static final String VIEW_SERVICE_HANDLERS_JSP_NAME = "ViewServiceHandlers.jsp";
   private static final String SERVICE_PARA_EDIT_JSP_NAME = "ServiceParaEdit.jsp";
   private static final String ENGAGE_TO_OPERATION_JSP_NAME = "engagingtoanoperation.jsp";
+  private static final String LOGIN_JSP_NAME = "Login.jsp";
 
+  private File serviceDir;
 
   public AdminAgent(ConfigurationContext aConfigContext) {
     super(aConfigContext);
-  }
-
+    File repoDir = new File(configContext.getAxisConfiguration().getRepository().getFile());
+    serviceDir = new File(repoDir, "services");
 
-  protected void processIndex(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
-    renderView(ADMIN_JSP_NAME, req, res);
+    if (!serviceDir.exists()) {
+      serviceDir.mkdirs();
+    }
   }
 
+  public void handle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)
+    throws IOException, ServletException {
 
-  public void handle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException, Exception {
+    // We forward to login page if axis2 security is enabled
+    // and the user is not authorized
     // TODO Fix workaround for login test
     if (axisSecurityEnabled() && authorizationRequired(httpServletRequest)) {
-      renderView("Login.jsp", httpServletRequest, httpServletResponse);
+      renderView(LOGIN_JSP_NAME, httpServletRequest, httpServletResponse);
     } else {
       super.handle(httpServletRequest, httpServletResponse);
     }
+  }
 
+  protected void processIndex(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+    renderView(ADMIN_JSP_NAME, req, res);
   }
 
+  // supported web operations
+
   protected void processUpload(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
 
     boolean isMultipart = FileUpload.isMultipartContent(req);
     if (isMultipart) {
-      File repoDir = new File(configContext.getAxisConfiguration().getRepository().getFile());
-      File serviceDir = new File(repoDir, "services");
-
-      if (!serviceDir.exists()) {
-        serviceDir.mkdirs();
-      }
 
       try {
         // Create a new file upload handler
@@ -140,8 +165,9 @@
 
     if ((username == null) || (password == null) || username.trim().equals("")
       || password.trim().equals("")) {
-      // todo SET ERROR MESSAGE
-      renderView("Login.jsp", req, res);
+      req.setAttribute("errorMessage", "Invalid auth credentials!");
+      renderView(LOGIN_JSP_NAME, req, res);
+      return;
     }
 
     String adminUserName = (String) configContext.getAxisConfiguration().getParameter(
@@ -153,9 +179,8 @@
       req.getSession().setAttribute(Constants.LOGGED, "Yes");
       renderView(ADMIN_JSP_NAME, req, res);
     } else {
-      // todo SET ERROR MESSAGE
-      renderView("Login.jsp", req, res);
-      //throw new AdminAppException(Messages.getMessage("invaliduser"));
+      req.setAttribute("errorMessage", "Invalid auth credentials!");
+      renderView(LOGIN_JSP_NAME, req, res);
     }
   }
 
@@ -495,7 +520,6 @@
     renderView(LIST_AVAILABLE_MODULES_JSP_NAME, req, res);
   }
 
-
   protected void processSelectService(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
     HashMap services = configContext.getAxisConfiguration().getServices();
 
@@ -508,7 +532,7 @@
 
   private boolean authorizationRequired(HttpServletRequest httpServletRequest) {
     return httpServletRequest.getSession().getAttribute(Constants.LOGGED) == null &&
-    !httpServletRequest.getRequestURI().endsWith("login");
+      !httpServletRequest.getRequestURI().endsWith("login");
   }
 
   private boolean axisSecurityEnabled() {
@@ -517,5 +541,3 @@
   }
 
 }
-
-

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java?rev=395835&r1=395834&r2=395835&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java Fri Apr 21 03:25:10 2006
@@ -1,5 +1,5 @@
 /*
-* Copyright 2004,2005 The Apache Software Foundation.
+* Copyright 2004,2006 The Apache Software Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@@ -30,15 +30,7 @@
 
 public class ListingAgent extends AbstractAgent {
 
-  /**
-   * Field LIST_MULTIPLE_SERVICE_JSP_NAME
-   */
   private static final String LIST_MULTIPLE_SERVICE_JSP_NAME = "listServices.jsp";
-  private static final String SELECT_SERVICE_JSP_NAME = "SelectService.jsp";
-
-  /**
-   * Field LIST_SINGLE_SERVICE_JSP_NAME
-   */
   private static final String LIST_SINGLE_SERVICE_JSP_NAME = "listSingleService.jsp";
 
   public static final String RUNNING_PORT = "RUNNING_PORT";
@@ -48,7 +40,7 @@
   }
 
   public void handle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)
-    throws IOException, Exception {
+    throws IOException, ServletException {
      if (httpServletRequest.getParameter("wsdl") != null || httpServletRequest.getParameter("xsd") != null) {
        processListService(httpServletRequest, httpServletResponse);
      } else {
@@ -64,7 +56,7 @@
   protected void processListService(HttpServletRequest req, HttpServletResponse res)
     throws IOException, ServletException {
 
-    String filePart = req.getRequestURI();
+    String filePart = req.getRequestURL().toString();
     String serviceName = filePart.substring(filePart.lastIndexOf("/") + 1, filePart.length());
     HashMap services = configContext.getAxisConfiguration().getServices();
     String wsdl = req.getParameter("wsdl");

Modified: webservices/axis2/trunk/java/modules/webapp/ActivateService.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/ActivateService.jsp?rev=395835&r1=395834&r2=395835&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/ActivateService.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/ActivateService.jsp Fri Apr 21 03:25:10 2006
@@ -6,7 +6,7 @@
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
 <jsp:include page="include/adminheader.jsp"></jsp:include>
 <h1>Turn on Axis Service</h1>
-<form method="get" name="serviceActivate" action="admin/activateService">
+<form method="get" name="serviceActivate" action="axis2-admin/activateService">
   <table width="100%"  border="0">
 <tr>
   <td colspan="2" >

Modified: webservices/axis2/trunk/java/modules/webapp/EngageToServiceGroup.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/EngageToServiceGroup.jsp?rev=395835&r1=395834&r2=395835&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/EngageToServiceGroup.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/EngageToServiceGroup.jsp Fri Apr 21 03:25:10 2006
@@ -21,7 +21,7 @@
 		<p>No axisService groups are present to be engaged.</p>
 		<%} else {
 %>
-<form method="get" name="selectModuleForm" action="admin/engageToServiceGroup">
+<form method="get" name="selectModuleForm" action="axis2-admin/engageToServiceGroup">
     <table border="0" width="100%" cellspacing="1" cellpadding="1">
         <tr>
             <td>Select a Module :</td>

Added: webservices/axis2/trunk/java/modules/webapp/Error/error404.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/Error/error404.jsp?rev=395835&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/Error/error404.jsp (added)
+++ webservices/axis2/trunk/java/modules/webapp/Error/error404.jsp Fri Apr 21 03:25:10 2006
@@ -0,0 +1,44 @@
+<%@ page contentType="text/html;charset=iso-8859-1" language="java" %>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+  <head>
+    <jsp:include page="../include/httpbase.jsp"/>
+    <title>Axis2 :: Resource not found!</title>
+    <link href="axis2-web/css/axis-style.css" rel="stylesheet" type="text/css"/>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
+  </head>
+
+  <body>
+    <table width="100%">
+      <tr>
+        <td align="left"><img src="axis2-web/images/asf-logo.gif" alt=""/></td>
+        <td align="right"><img src="axis2-web/images/axis_l.jpg" alt=""/></td>
+      </tr>
+    </table>
+    <table width="100%">
+      <tr>
+        <td>
+          <h1>Requested resource not found!</h1>
+          <br/>
+          <br/>
+          <br/>
+          <br/>
+        </td>
+      </tr>
+      <tr><td align="center"><a href="axis2-web/index.jsp">home</a></td></tr>
+    </table>
+    <table width="100%">
+      <tr><td>
+        <table width="950px">
+          <tr><td><hr size="1" noshade=""/></td></tr>
+          <tr>
+            <td align="center">Copyright &#169; 1999-2006, The Apache Software Foundation<br/>Licensed under the <a
+              href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</td>
+          </tr>
+        </table>
+      </td>
+        <td>&nbsp;</td>
+      </tr>
+    </table>
+  </body>
+</html>
\ No newline at end of file

Added: webservices/axis2/trunk/java/modules/webapp/Error/error500.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/Error/error500.jsp?rev=395835&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/Error/error500.jsp (added)
+++ webservices/axis2/trunk/java/modules/webapp/Error/error500.jsp Fri Apr 21 03:25:10 2006
@@ -0,0 +1,45 @@
+<%@ page contentType="text/html;charset=iso-8859-1" language="java" %>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+  <head>
+    <jsp:include page="../include/httpbase.jsp"/>
+    <title>Axis2 :: Internal server error</title>
+    <link href="axis2-web/css/axis-style.css" rel="stylesheet" type="text/css"/>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
+  </head>
+
+  <body>
+    <table width="100%">
+      <tr>
+        <td align="left"><img src="axis2-web/images/asf-logo.gif" alt=""/></td>
+        <td align="right"><img src="axis2-web/images/axis_l.jpg" alt=""/></td>
+      </tr>
+    </table>
+    <table width="100%">
+      <tr>
+        <td>
+          <h1>Internal server error</h1>
+          <br/>
+          <br/>
+          <br/>
+          <br/>
+        </td>
+      </tr>
+      <tr><td align="center"><a href="axis2-web/index.jsp">home</a></td></tr>
+    </table>
+    <hr/>
+    <table width="100%">
+      <tr><td>
+        <table width="950px">
+          <tr><td><hr size="1" noshade=""/></td></tr>
+          <tr>
+            <td align="center">Copyright &#169; 1999-2006, The Apache Software Foundation<br/>Licensed under the <a
+              href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</td>
+          </tr>
+        </table>
+      </td>
+        <td>&nbsp;</td>
+      </tr>
+    </table>
+  </body>
+</html>
\ No newline at end of file

Modified: webservices/axis2/trunk/java/modules/webapp/HappyAxis.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/HappyAxis.jsp?rev=395835&r1=395834&r2=395835&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/HappyAxis.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/HappyAxis.jsp Fri Apr 21 03:25:10 2006
@@ -39,7 +39,7 @@
     */
 %>
 <head>
-    <base href="<%= request.getScheme() %>://<%= request.getServerName() %>:<%= request.getServerPort()%><%= request.getContextPath() %>/" />
+    <jsp:include page="include/httpbase.jsp"/>
     <title>Axis2 Happiness Page</title>
     <link href="axis2-web/css/axis-style.css" rel="stylesheet" type="text/css">
 </head>
@@ -48,7 +48,10 @@
 <jsp:include page="include/header.inc"/>
 <jsp:include page="include/link-footer.jsp"/>
 <%port = request.getServerPort();%>
-<%IP = request.getRequestURL().toString();
+<%
+    // since this one is an internal request we do not use public frontendHostUrl
+    // for it
+    IP = request.getRequestURL().toString();
     int lastindex = IP.lastIndexOf('/');
     IP = IP.substring(0, lastindex);
     ///axis2/axis2-web/services/version

Modified: webservices/axis2/trunk/java/modules/webapp/InActivateService.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/InActivateService.jsp?rev=395835&r1=395834&r2=395835&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/InActivateService.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/InActivateService.jsp Fri Apr 21 03:25:10 2006
@@ -6,7 +6,7 @@
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
 <jsp:include page="include/adminheader.jsp"></jsp:include>
 <h1>Turn off Axis Service</h1>
-<form method="get" name="serviceInActivate" action="admin/deactivateService">
+<form method="get" name="serviceInActivate" action="axis2-admin/deactivateService">
   <table width="100%"  border="0">
 <tr>
   <td colspan="2" >

Modified: webservices/axis2/trunk/java/modules/webapp/LeftFrame.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/LeftFrame.jsp?rev=395835&r1=395834&r2=395835&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/LeftFrame.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/LeftFrame.jsp Fri Apr 21 03:25:10 2006
@@ -35,7 +35,7 @@
        &nbsp;&nbsp;&nbsp;&nbsp;
        </td>
        <td>
-         <a href="admin/upload">Upload Service</a>
+         <a href="axis2-admin/upload">Upload Service</a>
        </td>
     </tr>
 <tr>
@@ -56,7 +56,7 @@
        &nbsp;&nbsp;&nbsp;&nbsp;
     </td>
     <td >
-      <a href="admin/listServiceGroups">Available Service Groups</a>
+      <a href="axis2-admin/listServiceGroups">Available Service Groups</a>
     </td>
  </tr>
  <tr>
@@ -64,7 +64,7 @@
        &nbsp;&nbsp;&nbsp;&nbsp;
     </td>
     <td >
-      <a href="admin/listModules">Available Modules</a>
+      <a href="axis2-admin/listModules">Available Modules</a>
     </td>
  </tr>
  <tr>
@@ -72,7 +72,7 @@
        &nbsp;&nbsp;&nbsp;&nbsp;
     </td>
     <td>
-      <a href="admin/globalModules">Globally Engaged Modules</a>
+      <a href="axis2-admin/globalModules">Globally Engaged Modules</a>
     </td>
  </tr>
  <tr>
@@ -80,7 +80,7 @@
        &nbsp;&nbsp;&nbsp;&nbsp;
     </td>
     <td >
-      <a href="admin/listPhases">Available Phases</a>
+      <a href="axis2-admin/listPhases">Available Phases</a>
     </td>
  </tr>
   <tr>
@@ -93,7 +93,7 @@
        &nbsp;&nbsp;&nbsp;&nbsp;
        </td>
        <td>
-         <a href="admin/viewGlobalHandlers">Global Chains</a>
+         <a href="axis2-admin/viewGlobalHandlers">Global Chains</a>
        </td>
     </tr>
     <tr>
@@ -101,7 +101,7 @@
        &nbsp;&nbsp;&nbsp;&nbsp;
        </td>
        <td>
-         <a href="admin/selectService">Operation Specific Chains</a>
+         <a href="axis2-admin/selectService">Operation Specific Chains</a>
        </td>
     </tr>
     <tr>
@@ -114,7 +114,7 @@
         &nbsp;&nbsp;&nbsp;&nbsp;
        </td>
        <td>
-         <a href="admin/engagingglobally">For all Services</a>
+         <a href="axis2-admin/engagingglobally">For all Services</a>
        </td>
     </tr>
      <tr>
@@ -122,7 +122,7 @@
          &nbsp;&nbsp;&nbsp;&nbsp;
         </td>
         <td>
-          <a href="admin/engageToServiceGroup">For a Service Group</a>
+          <a href="axis2-admin/engageToServiceGroup">For a Service Group</a>
         </td>
      </tr>
 
@@ -132,7 +132,7 @@
        &nbsp;&nbsp;&nbsp;&nbsp;
        </td>
        <td>
-         <a href="admin/engageToService">For a Service</a>
+         <a href="axis2-admin/engageToService">For a Service</a>
        </td>
     </tr>
 
@@ -141,7 +141,7 @@
        &nbsp;&nbsp;&nbsp;&nbsp;
        </td>
        <td>
-         <a href="admin/listOperation">For an Operation</a>
+         <a href="axis2-admin/listOperation">For an Operation</a>
        </td>
     </tr>
 
@@ -155,7 +155,7 @@
        &nbsp;&nbsp;&nbsp;&nbsp;
        </td>
        <td>
-         <a href="admin/deactivateService">Inactivate Service</a>
+         <a href="axis2-admin/deactivateService">Inactivate Service</a>
        </td>
     </tr>
     <tr>
@@ -163,7 +163,7 @@
        &nbsp;&nbsp;&nbsp;&nbsp;
        </td>
        <td>
-         <a href="admin/activateService">Activate Service</a>
+         <a href="axis2-admin/activateService">Activate Service</a>
        </td>
     </tr>
     <tr>
@@ -171,7 +171,7 @@
        &nbsp;&nbsp;&nbsp;&nbsp;
        </td>
        <td>
-         <a href="admin/selectServiceParaEdit">Edit Parameters</a>
+         <a href="axis2-admin/selectServiceParaEdit">Edit Parameters</a>
        </td>
     </tr>
     <tr>
@@ -184,7 +184,7 @@
        &nbsp;&nbsp;&nbsp;&nbsp;
        </td>
        <td>
-         <a href="admin/listContexts">View Hierarchy</a>
+         <a href="axis2-admin/listContexts">View Hierarchy</a>
        </td>
     </tr>
 </table>

Modified: webservices/axis2/trunk/java/modules/webapp/ListServiceGroup.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/ListServiceGroup.jsp?rev=395835&r1=395834&r2=395835&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/ListServiceGroup.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/ListServiceGroup.jsp Fri Apr 21 03:25:10 2006
@@ -22,7 +22,7 @@
             AxisService axisService = (AxisService) axisServiceIter.next();
             String serviceName = axisService.getName();
     %>
-    <li><font color="blue"><a href="admin/listService?serviceName=<%=serviceName%>">
+    <li><font color="blue"><a href="axis2-admin/listService?serviceName=<%=serviceName%>">
         <%=serviceName%></a></font></li>
     <%
         }

Modified: webservices/axis2/trunk/java/modules/webapp/Login.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/Login.jsp?rev=395835&r1=395834&r2=395835&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/Login.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/Login.jsp Fri Apr 21 03:25:10 2006
@@ -25,59 +25,61 @@
 */
 --%>
 <html>
-<head>
-  <base href="<%= request.getScheme() %>://<%= request.getServerName() %>:<%= request.getServerPort()%><%= request.getContextPath() %>/" />
-  <title>Login to Axis2:: Administration page</title>
-  <link href="axis2-web/css/axis-style.css" rel="stylesheet" type="text/css">
-</head>
-<body>
-<jsp:include page="include/header.inc" />
-<jsp:include page="include/link-footer.jsp" />
-<table class="FULL_BLANK">
-  <tr><td valign="top">
-  </td>
-    <td valign="middle" align="left">
-      <form method="post" name="LoginForm" action="admin/login">
-        <table class="LOG_IN_FORM">
-          <tr>
-            <td align="center" colspan="2" bgcolor="#b0b0b0" color="#FFFFFF"><font color="#FFFFFF">Login</font></td>
-          </tr>
-          <tr>
-            <td align="right">User :</td>
-            <td><INPUT align="left" TYPE=TEXT NAME="userName" tabindex="1">
-            </td>
-          </tr>
-          <tr>
-            <td align="right">Password : </td>
-            <td><INPUT align="left" TYPE=PASSWORD NAME="password" tabindex="2">
-            </td>
-          </tr>
-          <tr>
-            <td colspan="2">
-              <br>
-            </td>
-          </tr>
-          <tr>
-            <td align="right">
-              <input name="submit" type="submit" value=" Login  ">
-            </td>
-            <td align="left">
-              <input name="cancel" type="reset" value=" Clear ">
-            </td>
-          </tr>
-        </table>
-      </form>
-      <br/><br/><br/><br/><br/><br/>
-    </td>
-  </tr>
-</table>
-<jsp:include page="include/footer.inc"/>
-<script language="JavaScript">
-  <!--
-  document.LoginForm.userName.focus();
-  //-->
-</script>
-</body>
+  <head>
+    <jsp:include page="include/httpbase.jsp"/>
+    <title>Login to Axis2:: Administration page</title>
+    <link href="axis2-web/css/axis-style.css" rel="stylesheet" type="text/css">
+  </head>
+
+  <body onload="javascript:document.LoginForm.userName.focus();">
+    <jsp:include page="include/header.inc"/>
+    <jsp:include page="include/link-footer.jsp"/>
+    <table class="FULL_BLANK">
+      <tr>
+        <td valign="top"></td>
+        <td valign="middle" align="left">
+          <form method="post" name="LoginForm" action="axis2-admin/login">
+            <table class="LOG_IN_FORM">
+              <tr>
+                <td align="center" colspan="2" bgcolor="#b0b0b0" color="#FFFFFF"><font color="#FFFFFF">Login</font></td>
+              </tr>
+              <tr>
+                 <td align="center" colspan="2">&nbsp;</td>
+               </tr>
+              <tr>
+                <td align="right">User :</td>
+                <td><input align="left" type="text" name="userName" tabindex="1">
+                </td>
+              </tr>
+              <tr>
+                <td align="right">Password : </td>
+                <td><input align="left" type="password" name="password" tabindex="2">
+                </td>
+              </tr>
+              <tr>
+                <td colspan="2">
+                  <br>
+                </td>
+              </tr>
+              <tr>
+                <td align="center" colspan="2">
+                  <input name="cancel" type="reset" value=" Clear "> &nbsp; &nbsp;
+                  <input name="submit" type="submit" value=" Login ">
+                </td>
+              </tr>
+              <tr>
+                <td align="center" colspan="2">
+                  <font color="red">&nbsp;<% if (request.getAttribute("errorMessage") != null) {%><%= request.getAttribute("errorMessage")%><% } %>&nbsp;</font>
+                </td>
+              </tr>
+            </table>
+          </form>
+          <br/><br/><br/><br/><br/><br/>
+        </td>
+      </tr>
+    </table>
+    <jsp:include page="include/footer.inc"/>
+  </body>
 </html>
 
 

Modified: webservices/axis2/trunk/java/modules/webapp/MainFrame.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/MainFrame.jsp?rev=395835&r1=395834&r2=395835&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/MainFrame.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/MainFrame.jsp Fri Apr 21 03:25:10 2006
@@ -1,35 +1,35 @@
- <%
-           /*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-*
-*/
+<%
+  /*
+  * Copyright 2004,2005 The Apache Software Foundation.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *      http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  *
+  */
 
 /**
  * Author : Deepal Jayasinghe
  * Date: May 26, 2005
  * Time: 7:14:26 PM
  */
-        %>
+%>
 <html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>Axis2 Administration </title>
-<style type="text/css">
-</style></head>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>Axis2 Administration </title>
+    <style type="text/css">
+    </style></head>
 
-<body>
-</body>
+  <body>
+  </body>
 </html>

Modified: webservices/axis2/trunk/java/modules/webapp/SelectService.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/SelectService.jsp?rev=395835&r1=395834&r2=395835&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/SelectService.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/SelectService.jsp Fri Apr 21 03:25:10 2006
@@ -56,7 +56,7 @@
   %>
 <h1><%=heading%></h1>
 <p><%=disc%></p>
-<form method="get" name="selectServiceForm" action="admin/<%=action%>">
+<form method="get" name="selectServiceForm" action="axis2-admin/<%=action%>">
 <table border="0" width="50%" cellspacing="1" cellpadding="1">
          <tr>
         <td width="35%">Select a Service :</td><td width="65%">

Modified: webservices/axis2/trunk/java/modules/webapp/ServiceParaEdit.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/ServiceParaEdit.jsp?rev=395835&r1=395834&r2=395835&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/ServiceParaEdit.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/ServiceParaEdit.jsp Fri Apr 21 03:25:10 2006
@@ -7,7 +7,7 @@
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
 <jsp:include page="include/adminheader.jsp"></jsp:include>
 <h1>Edit Service Parameters</h1>
-  <form method="get" name="editServicepara" action="admin/editServicepara">
+  <form method="get" name="editServicepara" action="axis2-admin/editServicepara">
    <%
             AxisService axisService = (AxisService)request.getSession().
                     getAttribute(Constants.SERVICE);

Modified: webservices/axis2/trunk/java/modules/webapp/TopFrame.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/TopFrame.jsp?rev=395835&r1=395834&r2=395835&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/TopFrame.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/TopFrame.jsp Fri Apr 21 03:25:10 2006
@@ -1,36 +1,37 @@
- <%
-           /*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-*
-*/
+<%
+  /*
+  * Copyright 2004,2005 The Apache Software Foundation.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *      http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  *
+  *
+  */
 
 /**
  * Author : Deepal Jayasinghe
  * Date: May 26, 2005
  * Time: 7:14:26 PM
  */
-        %>
+%>
 <html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>Untitled Document</title>
-<style type="text/css">
-</style></head>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+    <title>Untitled Document</title>
+    <style type="text/css">
+    </style></head>
 
-<body>
-<jsp:include page="include/adminheader.inc"></jsp:include>
-</body>
+  <body>
+    <jsp:include page="include/adminheader.inc">
+    </jsp:include>
+  </body>
 </html>

Modified: webservices/axis2/trunk/java/modules/webapp/conf/web.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/conf/web.xml?rev=395835&r1=395834&r2=395835&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/conf/web.xml (original)
+++ webservices/axis2/trunk/java/modules/webapp/conf/web.xml Fri Apr 21 03:25:10 2006
@@ -56,22 +56,22 @@
 
     <servlet-mapping>
         <servlet-name>AxisAdminServlet</servlet-name>
-        <url-pattern>/admin/*</url-pattern>
+        <url-pattern>/axis2-admin/*</url-pattern>
     </servlet-mapping>
 
-
    <welcome-file-list>
       <welcome-file>/axis2-web/index.jsp</welcome-file>
     </welcome-file-list>
 
     <error-page>
-        <exception-type>
-            org.apache.axis2.transport.http.server.AdminAppException</exception-type>
-        <location>/axis2-web/Error/AuthError.html</location>
+      <error-code>404</error-code>
+      <location>/axis2-web/Error/error404.jsp</location>
     </error-page>
 
-    <!--error-page>
-        <exception-type>java.lang.Exception</exception-type>
-        <location>/Error/GenError.html</location>
-    </error-page-->
+    <error-page>
+        <error-code>500</error-code>
+        <location>/axis2-web/Error/error500.jsp</location>
+    </error-page>
+
+
 </web-app>

Modified: webservices/axis2/trunk/java/modules/webapp/engagingglobally.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/engagingglobally.jsp?rev=395835&r1=395834&r2=395835&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/engagingglobally.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/engagingglobally.jsp Fri Apr 21 03:25:10 2006
@@ -34,7 +34,7 @@
     and click on the "Engage" button. Any module that needs to place handlers into the pre-dispatch
     phase needs to be engaged globally.</p>
 
-<form method="get" name="selectModuleForm" action="admin/engagingglobally">
+<form method="get" name="selectModuleForm" action="axis2-admin/engagingglobally">
     <table border="0" width="100%" cellspacing="1" cellpadding="1">
         <tr>
             <td width="15%">Select a Module :</td>

Modified: webservices/axis2/trunk/java/modules/webapp/engagingtoanoperation.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/engagingtoanoperation.jsp?rev=395835&r1=395834&r2=395835&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/engagingtoanoperation.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/engagingtoanoperation.jsp Fri Apr 21 03:25:10 2006
@@ -10,7 +10,7 @@
 %>
 <h1>Engage Module for an Operation</h1>
 <p>To engage a module for a axisOperation, first select the module you want to engage and then select the axisOperation you like the module to be engaged on and click "Engage".</p>
-<form method="get" name="selectModuleForm" action="admin/listOperations">
+<form method="get" name="selectModuleForm" action="axis2-admin/listOperations">
 <table border="0" width="100%" cellspacing="1" cellpadding="1">
     <tr>
         <td>

Modified: webservices/axis2/trunk/java/modules/webapp/engagingtoaservice.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/engagingtoaservice.jsp?rev=395835&r1=395834&r2=395835&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/engagingtoaservice.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/engagingtoaservice.jsp Fri Apr 21 03:25:10 2006
@@ -10,7 +10,7 @@
 %>
 <h1>Engage Module for a Service</h1>
 <p>To engage a module for a axisService, first select the module you want to engage and then select the axisService you like the module to be engaged on and click "Engage".</p>
-<form method="get" name="selectModuleForm" action="admin/engageToService">
+<form method="get" name="selectModuleForm" action="axis2-admin/engageToService">
 <table border="0" width="100%" cellspacing="1" cellpadding="1">
     <tr>
         <td>

Modified: webservices/axis2/trunk/java/modules/webapp/include/adminheader.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/include/adminheader.jsp?rev=395835&r1=395834&r2=395835&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/include/adminheader.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/include/adminheader.jsp Fri Apr 21 03:25:10 2006
@@ -1,20 +1,24 @@
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%@ page contentType="text/html;charset=iso-8859-1" language="java" %>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
-<head>
-  <base href="<%= request.getScheme() %>://<%= request.getServerName() %>:<%= request.getServerPort()%><%= request.getContextPath() %>/" />
-	<title>Axis2 :: Administration Page</title>
-	<link href="axis2-web/css/axis-style.css" rel="stylesheet" type="text/css"/>
-  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
-</head>
-<body>
-<jsp:include page="header.inc"></jsp:include>
-<table class="FULL_BLANK"><tr><td valign="top" width="20%">
-   <jsp:include page="../LeftFrame.jsp"></jsp:include>
-</td>
-<td valign="top" align="left" width="80%">
-<table width="100%">
-    <tr>
-   <td align="right" colspan="2"><a href="#" onclick="javaacript:history.back();">Back</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="admin/logout">Log out</a></td>
-   </tr>
-</table>
+  <head>
+    <jsp:include page="../include/httpbase.jsp"/>
+    <title>Axis2 :: Administration Page</title>
+    <link href="axis2-web/css/axis-style.css" rel="stylesheet" type="text/css"/>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
+  </head>
+
+  <body>
+    <jsp:include page="header.inc"/>
+    <table class="FULL_BLANK">
+      <tr>
+        <td valign="top" width="20%">
+          <jsp:include page="../LeftFrame.jsp"/>
+        </td>
+        <td valign="top" align="left" width="80%">
+        <table width="100%">
+          <tr>
+            <td align="right" colspan="2"><a href="#" onclick="javaacript:history.back();">Back</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a
+              href="axis2-admin/logout">Log out</a></td>
+          </tr>
+        </table>

Added: webservices/axis2/trunk/java/modules/webapp/include/httpbase.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/include/httpbase.jsp?rev=395835&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/include/httpbase.jsp (added)
+++ webservices/axis2/trunk/java/modules/webapp/include/httpbase.jsp Fri Apr 21 03:25:10 2006
@@ -0,0 +1,46 @@
+<%@ page import="org.apache.axis2.Constants" %>
+<%@ page import="org.apache.axis2.context.ConfigurationContext" %>
+<%@ page import="org.apache.axis2.description.Parameter" %>
+<%@ page import="org.apache.axis2.transport.http.AxisServlet" %>
+<%@ page import="javax.servlet.ServletContext" %>
+<%@ page import="javax.servlet.http.HttpServletRequest" %>
+<%!
+  private String frontendHostUrl;
+
+  public void jspInit() {
+    ServletContext context = this.getServletConfig().getServletContext();
+    ConfigurationContext configctx = (ConfigurationContext) context.getAttribute(AxisServlet.CONFIGURATION_CONTEXT);
+    Parameter parameter = configctx.getAxisConfiguration().getParameter(Constants.HTTP_FRONTEND_HOST_URL);
+    if (parameter != null) {
+      frontendHostUrl = (String) parameter.getValue();
+    }
+  }
+
+  public String calculateHttpBase(HttpServletRequest aRequest) {
+    StringBuffer stringBuffer = new StringBuffer();
+    if (frontendHostUrl != null) {
+      stringBuffer.append(frontendHostUrl);
+    } else {
+      String scheme = aRequest.getScheme();
+      stringBuffer.append(scheme);
+      stringBuffer.append("://");
+      stringBuffer.append(aRequest.getServerName());
+      if (("http".equalsIgnoreCase(scheme) && aRequest.getServerPort() != 80) || "https".equalsIgnoreCase(scheme) && aRequest.getServerPort() != 443)
+      {
+        stringBuffer.append(":");
+        stringBuffer.append(aRequest.getServerPort());
+      }
+      // I think i saw web containers return null for root web context
+      if (aRequest.getContextPath() != null) {
+        stringBuffer.append(aRequest.getContextPath());
+      }
+    }
+    // append / char if needed
+    if (stringBuffer.charAt(stringBuffer.length() - 1) != '/') {
+      stringBuffer.append("/");
+    }
+    String curentUrl = stringBuffer.toString();
+    aRequest.setAttribute("frontendHostUrl", curentUrl);
+    return curentUrl;
+  }
+%><base href="<%= calculateHttpBase(request)%>"/>
\ No newline at end of file

Modified: webservices/axis2/trunk/java/modules/webapp/index.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/index.jsp?rev=395835&r1=395834&r2=395835&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/index.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/index.jsp Fri Apr 21 03:25:10 2006
@@ -1,62 +1,64 @@
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
 <html>
-<%
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-*
-*/
+  <%
+    /*
+    * Copyright 2004,2005 The Apache Software Foundation.
+    *
+    * Licensed under the Apache License, Version 2.0 (the "License");
+    * you may not use this file except in compliance with the License.
+    * You may obtain a copy of the License at
+    *
+    *      http://www.apache.org/licenses/LICENSE-2.0
+    *
+    * Unless required by applicable law or agreed to in writing, software
+    * distributed under the License is distributed on an "AS IS" BASIS,
+    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    * See the License for the specific language governing permissions and
+    * limitations under the License.
+    *
+    *
+    */
 
 /**
  * Author : Deepal Jayasinghe
  * Date: May 26, 2005
  * Time: 7:14:26 PM
  */
-%>
-<head>
-  <base href="<%= request.getScheme() %>://<%= request.getServerName() %>:<%= request.getServerPort()%><%= request.getContextPath() %>/" />
-  <title>Axis 2 - Home</title>
-  <link href="axis2-web/css/axis-style.css" rel="stylesheet" type="text/css" />
-</head>
-<body>
-        <jsp:include page="include/header.inc"></jsp:include>
-        <br/>
-	<h1>Welcome!</h1>
-        Welcome to the new generation of Axis. If you can see this page you have
-        successfully deployed the Axis2 web application. However to ensure that Axis2
-        is properly working, we encourage you to click on the validate link.
-        <br/>
-        <ul>
-        <li><a href="services/listServices">Services</a>
+  %>
+  <head>
+    <jsp:include page="include/httpbase.jsp"/>
+    <title>Axis 2 - Home</title>
+    <link href="axis2-web/css/axis-style.css" rel="stylesheet" type="text/css"/>
+  </head>
+
+  <body>
+    <jsp:include page="include/header.inc" />
+    <br/>
+
+    <h1>Welcome!</h1>
+    Welcome to the new generation of Axis. If you can see this page you have
+    successfully deployed the Axis2 web application. However to ensure that Axis2
+    is properly working, we encourage you to click on the validate link.
+    <br/>
+    <ul>
+      <li><a href="services/listServices">Services</a>
         <br/>
         View lists of all the available services deployed in this server.
-        </li>
-        <li><a href="axis2-web/HappyAxis.jsp">Validate</a>
-        <br/>
-        Check the system to see whether all the required libraries are in place 
-		and view view the system information.
-        </li>
-        <%--<li><a href="interop.jsp">Do an interop test</a>
-        <br/>
-        You can run Interoperability tests here
-        </li>--%>
-        <li><a href="admin/">Administration</a>
+      </li>
+      <li><a href="axis2-web/HappyAxis.jsp">Validate</a>
         <br/>
-		Console for administering this Axis2 installation.
-        </li>
-        </ul>
-        <jsp:include page="include/footer.inc"></jsp:include>
-        </body>
+        Check the system to see whether all the required libraries are in place
+        and view view the system information.
+      </li>
+      <%--<li><a href="interop.jsp">Do an interop test</a>
+      <br/>
+      You can run Interoperability tests here
+      </li>--%>
+      <li><a href="axis2-admin/">Administration</a>
+        <br/>
+        Console for administering this Axis2 installation.
+      </li>
+    </ul>
+    <jsp:include page="include/footer.inc"/>
+  </body>
 </html>

Modified: webservices/axis2/trunk/java/modules/webapp/listGroupService.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/listGroupService.jsp?rev=395835&r1=395834&r2=395835&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/listGroupService.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/listGroupService.jsp Fri Apr 21 03:25:10 2006
@@ -8,7 +8,7 @@
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
 <html>
 <head>
-  <base href="<%= request.getScheme() %>://<%= request.getServerName() %>:<%= request.getServerPort()%><%= request.getContextPath() %>/"/>
+  <jsp:include page="include/httpbase.jsp"/>
   <title>List Services</title>
   <link href="axis2-web/css/axis-style.css" rel="stylesheet" type="text/css" />
 </head>
@@ -18,10 +18,7 @@
 </jsp:include>
 <h1>Available services</h1>
 <%
-  String IP = request.getRequestURL().toString();
-  int lastindex = IP.lastIndexOf('/');
-  IP = IP.substring(0, lastindex);
-  String prifix = IP + "/services/";
+  String prifix = request.getAttribute("frontendHostUrl") + "services/";
 %>
 <%
   HashMap serviceMap = (HashMap) request.getSession().getAttribute(Constants.SERVICE_MAP);

Modified: webservices/axis2/trunk/java/modules/webapp/listService.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/listService.jsp?rev=395835&r1=395834&r2=395835&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/listService.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/listService.jsp Fri Apr 21 03:25:10 2006
@@ -33,14 +33,11 @@
  */
 %>
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<jsp:include page="include/adminheader.jsp"></jsp:include>
+<jsp:include page="include/adminheader.jsp" />
 
   <h1>Available services</h1>
-    <%String IP=request.getRequestURL().toString();
-        int lastindex = IP.lastIndexOf('/');
-        IP = IP.substring(0,lastindex);
-        String prifix = IP + "/services/";
-        String restprefix = IP + "/rest/";
+    <%  String prifix = request.getAttribute("frontendHostUrl") + "services/";
+        String restprefix = request.getAttribute("frontendHostUrl") + "rest/";
     %>
      <%
          HashMap serviceMap = (HashMap)request.getSession().getAttribute(Constants.SERVICE_MAP);
@@ -133,4 +130,4 @@
                     %> There seems to be no services listed! Try hitting refresh <%
                }
                     %>
-<jsp:include page="include/adminfooter.jsp"></jsp:include>
\ No newline at end of file
+<jsp:include page="include/adminfooter.jsp"></jsp:include>

Modified: webservices/axis2/trunk/java/modules/webapp/listServices.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/listServices.jsp?rev=395835&r1=395834&r2=395835&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/listServices.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/listServices.jsp Fri Apr 21 03:25:10 2006
@@ -25,7 +25,7 @@
 --%>
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
 <html>
-  <base href="<%= request.getScheme() %>://<%= request.getServerName() %>:<%= request.getServerPort()%><%= request.getContextPath() %>/" />
+  <jsp:include page="include/httpbase.jsp"/>
   <head><title>List Services</title>
   <link href="axis2-web/css/axis-style.css" rel="stylesheet" type="text/css" />
   </head>
@@ -33,9 +33,8 @@
   <jsp:include page="include/header.inc"></jsp:include>
     <jsp:include page="include/link-footer.jsp"></jsp:include>
   <h1>Available services</h1>
-  <%    String host = request.getScheme() + "://" + request.getServerName() + ":" +  request.getServerPort() +  request.getContextPath();
-        String prifix = host + "/services/";
-        String restprefix = host + "/rest/";
+  <%    String prifix = request.getAttribute("frontendHostUrl") + "services/";
+        String restprefix = request.getAttribute("frontendHostUrl") + "rest/";
     %>
      <%
         HashMap serviceMap = (HashMap)request.getSession().getAttribute(Constants.SERVICE_MAP);

Modified: webservices/axis2/trunk/java/modules/webapp/listSingleService.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/listSingleService.jsp?rev=395835&r1=395834&r2=395835&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/listSingleService.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/listSingleService.jsp Fri Apr 21 03:25:10 2006
@@ -6,18 +6,16 @@
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
 <html>
   <head>
-    <base href="<%= request.getScheme() %>://<%= request.getServerName() %>:<%= request.getServerPort()%><%= request.getContextPath() %>/" />
+    <jsp:include page="include/httpbase.jsp"/>
     <title>List Single service</title>
     <link href="axis2-web/css/axis-style.css" rel="stylesheet" type="text/css">
   </head>
   <body>
   <jsp:include page="include/header.inc"></jsp:include>
     <jsp:include page="include/link-footer.jsp"></jsp:include>
-  <%String IP=request.getRequestURL().toString();
-        int lastindex = IP.lastIndexOf('/');
-        IP = IP.substring(0,lastindex);
-        String prifix = IP + "/services/";
-        String restprefix = IP + "/rest/";
+  <%
+        String prifix = request.getAttribute("frontendHostUrl") + "services/";
+        String restprefix = request.getAttribute("frontendHostUrl") + "rest/";
     %>
         <%
             String isFault = (String)request.getSession().getAttribute(Constants.IS_FAULTY);

Modified: webservices/axis2/trunk/java/modules/webapp/project.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/project.xml?rev=395835&r1=395834&r2=395835&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/project.xml (original)
+++ webservices/axis2/trunk/java/modules/webapp/project.xml Fri Apr 21 03:25:10 2006
@@ -60,6 +60,14 @@
             </properties>
         </dependency>
         <dependency>
+            <groupId>commons-fileupload</groupId>
+            <artifactId>commons-fileupload</artifactId>
+            <version>${commons.fileupload.version}</version>
+            <properties>
+                <module>true</module>
+            </properties>
+        </dependency>
+        <dependency>
             <groupId>ws-commons</groupId>
             <artifactId>XmlSchema</artifactId>
             <version>${XmlSchema.version}</version>

Modified: webservices/axis2/trunk/java/modules/webapp/upload.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/upload.jsp?rev=395835&r1=395834&r2=395835&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/upload.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/upload.jsp Fri Apr 21 03:25:10 2006
@@ -1,59 +1,51 @@
-<%@ page import="org.apache.axis2.context.ConfigurationContext,
-                 org.apache.axis2.transport.http.AxisServlet,
-                 org.apache.commons.fileupload.DiskFileUpload,
-                 org.apache.commons.fileupload.FileItem,
-                 org.apache.commons.fileupload.FileUpload" %>
-<%@ page import="javax.servlet.ServletContext" %>
-<%@ page import="javax.servlet.jsp.JspWriter" %>
-<%@ page import="java.io.File" %>
-<%@ page import="java.io.IOException"%>
-<%@ page import="java.util.Iterator"%>
-<%@ page import="java.util.List"%>
-<%@ page contentType="text/html;charset=UTF-8" language="java"
-        %>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
 <%
-    /*
-    * Copyright 2002,2004 The Apache Software Foundation.
-    *
-    * Licensed under the Apache License, Version 2.0 (the "License");
-    * you may not use this file except in compliance with the License.
-    * You may obtain a copy of the License at
-    *
-    *      http://www.apache.org/licenses/LICENSE-2.0
-    *
-    * Unless required by applicable law or agreed to in writing, software
-    * distributed under the License is distributed on an "AS IS" BASIS,
-    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    * See the License for the specific language governing permissions and
-    * limitations under the License.
-    */
+  /*
+  * Copyright 2002,2004 The Apache Software Foundation.
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *      http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
 %>
 
-<jsp:include page="include/adminheader.jsp"></jsp:include>
-<h2>Upload a axisService jar file</h2>
-
-<p>You can upload a packaged Axis 2 axisService using this page with two small
-    steps.</p>
-<ul><li>Browse to the location and select the axisService archive file you wish
-    to upload</li>
-    <li>Click Upload</li></ul>
+<jsp:include page="include/adminheader.jsp"/>
+<h2>Upload a AxisService Archive file</h2>
 
+<p>You can upload a packaged Axis 2 AxisService using this page with two small steps.</p>
+<ul>
+  <li>Browse to the location and select the axisService archive file you wish to upload</li>
+  <li>Click Upload</li>
+</ul>
 <p>Simple as that!</p>
 
-<% if ("success".equals(request.getAttribute("status")) ) { %>
- <font color="green">File <%= request.getAttribute("filename") %> successfully uploaded </font><br/><br/>
+<% if ("success".equals(request.getAttribute("status"))) { %>
+<font color="green">File <%= request.getAttribute("filename") %> successfully uploaded </font><br/><br/>
 <%
-  } else if ("failure".equals(request.getAttribute("status")) ){
- %>
- <font color="red">The following error occurred <br/> <%= request.getAttribute("cause") %> </font><br/>
-
+} else if ("failure".equals(request.getAttribute("status"))) {
+%>
+<font color="red">The following error occurred <br/> <%= request.getAttribute("cause") %></font><br/>
 <% } %>
-<form method="post" name="Axis2upload" action="admin/upload"
+
+<form method="post" name="Axis2upload" action="axis2-admin/upload"
       enctype="multipart/form-data">
-    <table><tr><td>Service archive : </td><td>
-        <input type="file" name="filename" size="50"/></td></tr>
-        <tr><td>&nbsp;</td><td><input name="upload" type="submit"
-                                      value=" Upload "/></td></tr>
-    </table>
+  <table>
+    <tr>
+      <td>Service archive : </td>
+      <td><input type="file" name="filename" size="50"/></td>
+    </tr>
+    <tr>
+      <td>&nbsp;</td>
+      <td><input name="upload" type="submit" value=" Upload "/></td>
+    </tr>
+  </table>
 </form>
-<jsp:include page="include/adminfooter.jsp"></jsp:include>
+<jsp:include page="include/adminfooter.jsp"/>