I have a .war
file of a Java Web Application. Now I want to upload it to my ftp server so that I can execute it.
What steps I should perform to run it?
The context path of the webapp is /mywebapp
Actually, my ftp server name is ftp://bilgin.ath.cx/ and I have uploaded my TestWebApp.war file to this dir: ftp://bilgin.ath.cx/web
Then what should be the URL to access the index.html page of the webapplication
Tomcat
is listening on 8082
Apache access Tomcat with jk connector.
Perhaps the simplest way to deploy a WAR file to Tomcat is to copy the file to Tomcat's webapps directory. Copy and paste WAR files into Tomcat's webapps directory to deploy them. Tomcat monitors this webapps directory for changes, and if it finds a new file there, it will attempt to deploy it.
As others pointed out, the most straightforward way to deploy a WAR is to copy it to the webapps
of the Tomcat install. Another option would be to use the manager application if it is installed (this is not always the case), if it's properly configured (i.e. if you have the credentials of a user assigned to the appropriate group) and if it you can access it over an insecure network like Internet (but this is very unlikely and you didn't mention any VPN access). So this leaves you with the webapp
directory.
Now, if Tomcat is installed and running on bilgin.ath.cx
(as this is the machine where you uploaded the files), I noticed that Apache is listening to port 80
on that machien so I would bet that Tomcat is not directly exposed and that requests have to go through Apache. In that case, I think that deploying a new webapp and making it visible to the Internet will involve the edit of Apache configuration files (mod_jk
?, mod_proxy
?). You should either give us more details or discuss this with your hosting provider.
Update: As expected, the bilgin.ath.cx
is using Apache Tomcat + Apache HTTPD + mod_jk. The configuration usually involves two files: the worker.properties
file to configure the workers and the httpd.conf
for Apache. Now, without seeing the current configuration, it's not easy to give a definitive answer but, basically, you may have to add a JkMount
directive in Apache httpd.conf
for your new webapp1. Refer to the mod_jk documentation, it has a simple configuration example. Note that modifying httpd.conf
will require access to (obviously) and proper rights and that you'll have to restart Apache after the modifications.
1 I don't think you'll need to define a new worker if you are deploying to an already used Tomcat instance, especially if this sounds like Chinese for you :)
webapps
folderhttp://host:port/manager
. You will have to setup some users beforehand.webapps/webappname
Sometimes administrators configure tomcat so that war files are deployed outside the tomcat folder. Even in that case:
After you have it deployed (check the /logs
dir for any problems), it should be accessible via: http://host:port/yourwebappname/
. So in your case, one of those:
http://bilgin.ath.cx/TestWebApp/ http://bilgin.ath.cx:8080/TestWebApp/
If you don't manage by doing the above and googling - turn to your support. There might be an alternative port, or there might be something wrong with the application (and therefore in the logs)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With