I have copied the war file of my java web application (Inside system A containing the hosting server) in the webapps folder of tomcat 7. What are the steps to access this application from "System B" given that I know ip address of the "A". What are the steps to complete the hosting procedure and make sure my tomcat is properly configured.
2 Answers
Add the name of the webapplication in the url which is usually the name of the war file (without the .war extension).
http://<ip-comes-here>:<port>/<webappname> E.g. if your .war file is named myapp.war, then you can access it at:
http://<ip-comes-here>:<port>/myapp This can be overridden and there is a special ROOT webapp name (might come from ROOT.war) which will be available at the root of your host:
http://<ip>:<port>/ Comments
Installing TOMCAT & Configuring:
Install the tomcat from here :select the required version from download.
Setting the environment variable:
System Properties->Advanced->Environment Variables
Variable Name : CATALINA_HOME
Variable Value: C:\TOMCAT 7.0.10 (your tomcat directory)
Check your port number in Tomcat--->conf--->server.xml
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> Please note that your oracle is having a default port number 8080. Make sure no conflicts are there
Start the server(Go to the bin folder of tomcat and use startup.bat in windows and startup.sh for linux)
Then try the url in any web browser :
http://localhost:portNumber/ If you get the tomcat homepage your tomcat is properly configured.
Deploying application war File :
Step 1:stop tomcat(Go to the bin folder of tomcat and use shutdown.bat in windows and shutdown.sh for linux) Step 2:move your war into "[tomcat install dir]/webapps" Step 3:start tomcat Then try to access your web application as explained in the first answer in any web browser
AIPADDRES:port/yourwebappcontext