proper webapp deployment to www

Hi

I have just made a simple java web app which I am trying painstakingly to deploy on my server.

In order for my war file to deploy properly I put it in the webapps dir of the tomcat server. However I wanted it to be ussable from my website, not just from http://myserverIP:tomcatPort/myapp.

So to correct this I put an index.html file onto the public_html folder on my server with a shortcut to the app. This way when someone goes to www.mywebsite.com they are automatically directed to http://myserverIP:tomcatPort/myapp.

All this sort of works although it has been giving me problems with midlet access and seems to me to be a long way round.

How is one supposed to deploy an app to a website?

Thanks greatly

[756 byte] By [Aharona] at [2007-11-27 10:05:01]
# 1

A website is made available by a webserver. Tomcat, for instance, is a webserver, but with a servlet container. A java webapp needs to be deployed on a webserver with a servlet container. If the webserver where you wish to deploy your webapp has a servlet container, then copy the war-file or webapp directory into this webservers webapp directory.

HenrikStiga at 2007-7-13 0:40:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

my server does have a webapps directory in the 'home' directory however when I put my war files there they don't deploy. They only deploy if I put them in the server ROOT/.../tomcat/webapps/ directory.

So how do I then make them accessible to my website at server ROOT/home/webapps ?

I'm still not understanding

Aharona at 2007-7-13 0:40:01 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

You lost me there. Anyway, you did mention that you had a directory called public_html. That sounds to me like an Apache webserver, as in not a Tomcat. Apache may have a servlet-container, but if the war-file doesn't automatically deploy when you copy it to the folder, then it probably doesn't have that servlet-container-plugin (I'm no apache expert)

I think you'd be better off installing the same version of Tomcat on the "website" server as on the other server (the one where it works) in the default location (like /opt/apache-tomcat-6.0.13). You can always make a symlink to the webapps directory from your home-dir if that's your concern.

HenrikStiga at 2007-7-13 0:40:01 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
Apache is not a servlet container, it's only a webserver. You can get Tomcat to run with Apache, but it needs a little bit of fiddling around.
nogoodatcodinga at 2007-7-13 0:40:01 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...