The Tomcat Servlet Container
Multiple .War files on Tomcat container
Need help in configureing Tomcat container with multiple .war files. Which means i want to use one tomcat container for multiple websites. Is it possible? if yes how can i do it.Please help and thanks to all in advance.
Of course it is. Each web app is termed a "context". The Tomcat docs and the Servlet Spec explain it all in great detail.--------------------[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Just upload your war files to the webapp directory.The name of the war file will become the context root.So, on my website,www.scja.com,I upload a file named associate.war to the webapps directory of Tomcat, and tomcat deploys the application. I can then access my webapp throughhttp://www.scja.com/associateI also have a war file named thesimpsons.war which I deploy to the same server. It's another web app. But once in the webapps directory, you can access the landing page through:http://www.scja.com/thesimpsons/index.jspSo, this is just a simple, live example, of multiple war files being deployed to a single tomcat server.-Cameron McKenzie--------------------Author of What is WebSphere??? and the SCJA Certification GuideCheck out my Free Java and J2EE Tutorials and Free SCJA Java Exam Questions SimulatorFree, JSR168 Portlet Development Tutorials + Test 399 & Test 829 Mock Exams: Portal TutorialsL e a r n H i b e r n a t e - The Easy Way. Hibernate examples & JPA Tutorials...www.HibernateMadeEasy.com
thanks Cameron for your response. it help me a lot.