axis 和axis2共存在一个项目

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

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

web.xml 部分代码

 

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

如此即可。

 

你可能感兴趣的:(webservice,axis2,axis,共存,休闲)