在做一个java的项目,第一版中开发给用户的webservice的二次开发接口用axis部署。第二版中打算使用axis2,后来为了兼容第一版的用户,就采用axis,axis2两种插件来部署项目。

  由于axis和axis2不能共存,需要修改一下,我采取屏蔽axis1的admin管理。

web.xml 部分代码

 

   
   
   
   
  1. <welcome-file-list> 
  2.   <welcome-file>index.jspwelcome-file> 
  3.   <welcome-file>index.htmlwelcome-file> 
  4.   <welcome-file>/axis2-web/index.jspwelcome-file> 
  5. welcome-file-list> 
  6. <error-page> 
  7.   <error-code>404error-code> 
  8.   <location>/axis2-web/Error/error404.jsplocation> 
  9. error-page> 
  10. <error-page> 
  11.   <error-code>500error-code> 
  12.   <location>/axis2-web/Error/error500.jsplocation> 
  13. error-page> 
  14.  
  15. <servlet> 
  16.   <display-name>Apache-Axis Servletdisplay-name> 
  17.   <servlet-name>Axis1Servletservlet-name> 
  18.   <servlet-class>org.apache.axis.transport.http.AxisServletservlet-class> 
  19. servlet> 
  20.  
  21. <servlet-mapping> 
  22.   <servlet-name>Axis1Servletservlet-name> 
  23.   <url-pattern>/axis/*url-pattern> 
  24. servlet-mapping> 
  25.  
  26. <servlet> 
  27.   <display-name>Apache-Axis Servletdisplay-name> 
  28.   <servlet-name>AxisServletservlet-name> 
  29.   <servlet-class>org.apache.axis2.transport.http.AxisServletservlet-class> 
  30.   <load-on-startup>1load-on-startup> 
  31. servlet> 
  32. <servlet> 
  33.   <display-name>Apache-Axis AxisAdmin Servlet (Web Admin)display-name> 
  34.   <servlet-name>AxisAdminServletservlet-name> 
  35.   <servlet-class>org.apache.axis2.webapp.AxisAdminServletservlet-class> 
  36. servlet> 
  37. <servlet-mapping> 
  38.   <servlet-name>AxisServletservlet-name> 
  39.   <url-pattern>/servlet/AxisServleturl-pattern> 
  40. servlet-mapping> 
  41. <servlet-mapping> 
  42.   <servlet-name>AxisServletservlet-name> 
  43.   <url-pattern>*.jwsurl-pattern> 
  44. servlet-mapping> 
  45. <servlet-mapping> 
  46.   <servlet-name>AxisServletservlet-name> 
  47.   <url-pattern>/services/*url-pattern> 
  48. servlet-mapping> 
  49. <servlet-mapping> 
  50.   <servlet-name>AxisAdminServletservlet-name> 
  51.   <url-pattern>/axis2-admin/*url-pattern> 
  52. servlet-mapping> 
  53.  

如此即可。