tags:

views:

61

answers:

1

I have an application which resides in ROOT. This application has a java class(in ROOT\WEB-INF\classes) which does some specific operation. I have an axis webservice with a java class which is basically duplication of the one in ROOT, and it resides in axis\WEB-INF\classes.

Is there any way that I can migrate these two(axis and ROOT) and provide axis webservice from ROOT (jws inside ROOT) so that both ROOT application as well as webservice(.jws) can use the same class file?

~Umesh

A: 

Sure. You just merge 2 WARs and you should be able to serve both services from ROOT. Of course, you need to resolve mapping conflicts in web.xml. For example, if you have something like this in the axis\WEB-INF\web.xml,

  <servlet-mapping>
    <servlet-name>AxisServlet</servlet-name>
    <url-pattern>*.jws</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>AxisServlet</servlet-name>
    <url-pattern>/*</url-pattern>
  </servlet-mapping>

You might want change it into this in ROOT\WEB-INF\web.xml to simulate the old URL you use with axis application,

  <servlet-mapping>
    <servlet-name>AxisServlet</servlet-name>
    <url-pattern>/axis/*.jws</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>AxisServlet</servlet-name>
    <url-pattern>/axis/*</url-pattern>
  </servlet-mapping>
ZZ Coder

related questions