I have a SOAP web service running on Tomcat 6 (using Spring Web Services, Java)
Now I want to merge this webservice into another big web application (uses Spring, Java and not a web service) and use the web service as kinda plugin for the main web app. I mean when I run my main app my web service will also start to run. And they will use the same resources.
The main web app already has several plugins which are JAR files in its WEB-INF/LIB folder. But my web service is a WAR file so can I use a web application (WAR file) inside another web applications WEB-INF/LIB folder?
If I can not do that is that possible to remove the WEB-INF folder of my web service and make my web service a JAR file and put it under my main apps WEB-INf/LIB folder? I am not sure that I can serve a web service as a JAR file.
Which approach do you think is better or do you have other suggestions?
Thanks
I would recommend that you make a JAR out of your webservice and put that in the lib folder. The good thing about java is that it doesn't matter where your code is located as long as you load it right.
I don't think you can have WAR inside WAR. You can however merge two WAR projects into one (which can be performed e.g., by the maven build system). Still, merging WARs is a copy-paste-overwrite operation which leaves alot to desire.
I'd copied the relevant servlet & some configuration into the main web-app. also dedicated few packages to webservices classes and added required dependencies.