Web services 如何从axis2 web服务禁用HappyAxis.jsp页面?

Web services 如何从axis2 web服务禁用HappyAxis.jsp页面?,web-services,axis2,axis,axis2c,Web Services,Axis2,Axis,Axis2c,出于安全原因。我不想向任何人显示我的服务器详细信息 http://:/MyServices/axis2web/HappyAxis.jsp 当我点击上面的链接时,它显示了我与服务器相关的详细信息 如何从axis2 web服务禁用HappyAxis.jsp页面 您需要进行两项更改 1) 从WAR文件/Web应用程序的index.jsp文件中删除以下代码 <li><a href="axis2-web/HappyAxis.jsp">Validate</a>

出于安全原因。我不想向任何人显示我的服务器详细信息

http://:/MyServices/axis2web/HappyAxis.jsp

当我点击上面的链接时,它显示了我与服务器相关的详细信息


如何从axis2 web服务禁用HappyAxis.jsp页面

您需要进行两项更改

1) 从WAR文件/Web应用程序的index.jsp文件中删除以下代码

   <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 the system information.   </li>

  • 检查系统以查看是否所有必需的库都已就位 并查看系统信息
  • 文件夹-->WebContent\axis2 web\index.jsp/Warfile\axis2 web\index.jsp

    修改的index.jsp代码

        <%@ page contentType="text/html;charset=UTF-8" language="java" %>
        <html>
          <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 the list of all the available services deployed in this server.
              </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>
    
    
    轴2-主
    
    欢迎 欢迎来到新一代的Axis。如果你能看到这一页,你有 已成功部署Axis2 Web应用程序。但是,为了确保Axis2 正在正常工作,我们鼓励您单击验证链接。

    • 查看此服务器中部署的所有可用服务的列表。

    • 用于管理此Axis2安装的控制台。
    2) 将HappyAxis.jsp重命名为新名称(比如ServerDetails.jsp),并修改LeftFrame.jsp以显示新创建的ServerDetails.jsp。通过这种方式,只有在登录时才能看到HappyAxis.jsp/ServerDetails.jsp链接

    <tr>
                             <td colspan="2" >
                               <b>Happy Axis</b>
                             </td>
                            </tr>
                             <tr>
                               <td>
                               &nbsp;&nbsp;&nbsp;&nbsp;
                               </td>
                               <td>
                                 <a href="axis2-web/ServerDetails.jsp">Validate</a>
                               </td>
                            </tr>
    
    
    快乐轴心
    
    完成修改的LeftFrame.jsp

                                    <%--
                  ~ Licensed to the Apache Software Foundation (ASF) under one
                  ~ or more contributor license agreements. See the NOTICE file
                  ~ distributed with this work for additional information
                  ~ regarding copyright ownership. The ASF licenses this file
                  ~ to you 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.
                  --%>
    
                <%@ page import="org.apache.axis2.Constants" %>
                <%@ page import="org.apache.axis2.context.ConfigurationContext" %>
                <%@ page import="org.apache.axis2.context.ServiceContext" %>
                <%@ page import="org.apache.axis2.context.ServiceGroupContext" %>
                <%@ page import="org.apache.axis2.deployment.util.PhasesInfo" %>
                <%@ page import="org.apache.axis2.description.AxisModule" %>
                <%@ page import="org.apache.axis2.description.AxisOperation" %>
                <%@ page import="org.apache.axis2.description.AxisService" %>
                <%@ page import="org.apache.axis2.description.AxisServiceGroup" %>
                <%@ page import="org.apache.axis2.description.Parameter" %>
                <%@ page import="org.apache.axis2.engine.AxisConfiguration" %>
                <%@ page import="org.apache.axis2.engine.Handler" %>
                <%@ page import="org.apache.axis2.engine.Phase" %>
                <%@ page import="org.apache.axis2.util.JavaUtils" %>
                <%@ page import="java.util.ArrayList" %>
                <%@ page import="java.util.Collection" %>
                <%@ page import="java.util.Enumeration" %>
                <%@ page import="java.util.HashMap" %>
                <%@ page import="java.util.Hashtable" %>
                <%@ page import="java.util.Iterator" %>
                <%@ page contentType="text/html;charset=UTF-8" language="java" %>
                <table width="100%" style="border-right:1px solid #CCCCCC;">
                    <tr>
                     <td colspan="2" >
                       <b>Tools </b>
                     </td>
                    </tr>
                    <tr>
                       <td>
                       &nbsp;&nbsp;&nbsp;&nbsp;
                       </td>
                       <td>
                         <a href="axis2-admin/upload">Upload Service</a>
                       </td>
                    </tr>
                <tr>
                     <td colspan="2" >
                      <b><nobr>System Components&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</nobr></b>
                     </td>
                  </tr>
                  <tr>
                    <td>
                       &nbsp;&nbsp;&nbsp;&nbsp;
                    </td>
                    <td >
                      <a href="axis2-admin/listService">Available Services</a>
                    </td>
                 </tr>
                 <tr>
                    <td>
                       &nbsp;&nbsp;&nbsp;&nbsp;
                    </td>
                    <td >
                      <a href="axis2-admin/listServiceGroups">Available Service Groups</a>
                    </td>
                 </tr>
                 <tr>
                    <td>
                       &nbsp;&nbsp;&nbsp;&nbsp;
                    </td>
                    <td >
                      <a href="axis2-admin/listModules">Available Modules</a>
                    </td>
                 </tr>
                 <tr>
                    <td>
                       &nbsp;&nbsp;&nbsp;&nbsp;
                    </td>
                    <td>
                      <a href="axis2-admin/globalModules">Globally Engaged Modules</a>
                    </td>
                 </tr>
                 <tr>
                    <td>
                       &nbsp;&nbsp;&nbsp;&nbsp;
                    </td>
                    <td >
                      <a href="axis2-admin/listPhases">Available Phases</a>
                    </td>
                 </tr>
                  <tr>
                     <td colspan="2" >
                       <b>Execution Chains</b>
                     </td>
                  </tr>
                   <tr>
                       <td>
                       &nbsp;&nbsp;&nbsp;&nbsp;
                       </td>
                       <td>
                         <a href="axis2-admin/viewGlobalHandlers">Global Chains</a>
                       </td>
                    </tr>
                    <tr>
                       <td>
                       &nbsp;&nbsp;&nbsp;&nbsp;
                       </td>
                       <td>
                         <a href="axis2-admin/selectService">Operation Specific Chains</a>
                       </td>
                    </tr>
                    <tr>
                     <td colspan="2" >
                       <b>Engage Module</b>
                     </td>
                  </tr>
                   <tr>
                       <td>
                        &nbsp;&nbsp;&nbsp;&nbsp;
                       </td>
                       <td>
                         <a href="axis2-admin/engagingglobally">For all Services</a>
                       </td>
                    </tr>
                     <tr>
                        <td>
                         &nbsp;&nbsp;&nbsp;&nbsp;
                        </td>
                        <td>
                          <a href="axis2-admin/engageToServiceGroup">For a Service Group</a>
                        </td>
                     </tr>
    
    
                    <tr>
                       <td>
                       &nbsp;&nbsp;&nbsp;&nbsp;
                       </td>
                       <td>
                         <a href="axis2-admin/engageToService">For a Service</a>
                       </td>
                    </tr>
    
                     <tr>
                       <td>
                       &nbsp;&nbsp;&nbsp;&nbsp;
                       </td>
                       <td>
                         <a href="axis2-admin/listOperation">For an Operation</a>
                       </td>
                    </tr>
    
                    <tr>
                     <td colspan="2" >
                       <b>Services</b>
                     </td>
                  </tr>
                    <tr>
                       <td>
                       &nbsp;&nbsp;&nbsp;&nbsp;
                       </td>
                       <td>
                         <a href="axis2-admin/deactivateService">Deactivate Service</a>
                       </td>
                    </tr>
                    <tr>
                       <td>
                       &nbsp;&nbsp;&nbsp;&nbsp;
                       </td>
                       <td>
                         <a href="axis2-admin/activateService">Activate Service</a>
                       </td>
                    </tr>
                    <tr>
                       <td>
                       &nbsp;&nbsp;&nbsp;&nbsp;
                       </td>
                       <td>
                         <a href="axis2-admin/selectServiceParaEdit">Edit Parameters</a>
                       </td>
                    </tr>
                    <tr>
                     <td colspan="2" >
                       <b>Contexts</b>
                     </td>
                    </tr>
                    <tr>
                       <td>
                       &nbsp;&nbsp;&nbsp;&nbsp;
                       </td>
                       <td>
                         <a href="axis2-admin/listContexts">View Hierarchy</a>
                       </td>
                    </tr>
                    <tr>
                     <td colspan="2" >
                       <b>Happy Axis</b>
                     </td>
                    </tr>
                     <tr>
                       <td>
                       &nbsp;&nbsp;&nbsp;&nbsp;
                       </td>
                       <td>
                         <a href="axis2-web/ServerDetails.jsp">Validate</a>
                       </td>
                    </tr>
                </table>
    
    
    工具
    系统组件
    执行链
    啮合模块
    服务
    上下文
    快乐轴心
    
    如果用户知道路径,也可以访问新的jsp ServerDetails.jsp。如果希望进一步安全,可以删除Happy axis jsp并从index.jsp中删除引用,或者修改AdminServlet以添加此jsp org.apache.axis2.transport.ht的安全验证