wood burning stoves 2.0*
The moose likes Tomcat and the fly likes how to run war file on server(not localhost) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "how to run war file on server(not localhost)" Watch "how to run war file on server(not localhost)" New topic
Author

how to run war file on server(not localhost)

merve klug
Greenhorn

Joined: Oct 07, 2009
Posts: 17
hello,
should not it work when i paste my project.war file into the directory named www under my host on a server which is using tomcat?
i connected to my host by using filezilla. there is no problem. i uploaded my project.war into www and also web-inf directories and call it on browser by typing http://mysite.com/project. but it doesnt work.
should i copy and paste all the classes and jsp's one by one into folders named class and lib?
where am i wrong?
thanks in advance.
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
You could check documentation for Tomcat Web Application Deployment

As for
merve klug wrote:it doesnt work
you have to tell the details
merve klug
Greenhorn

Joined: Oct 07, 2009
Posts: 17


error is here

i deleted the url on the pic
it is sth like

http://www.merveklug.com/project

when i was doing the same work on another server it was working. thus my war file is errorless.

there is a point my project is a jsf project. i use tomcat 6 in local but may the problem be about the tomcat version incompatibility with jsf?

thanks for any replies.
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
Going back it is completely not clear what do you mean "i uploaded my project.war into www and also web-inf directories". If you have war file, what are you doing with web-inf directories. Just step back and go over Tomcat deployment instructions.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Is this a hosted server or one where you installed Tomcat yourself?

Most hosting companies re-configure Tomcat to fit their deployment model.
They also all, as far as I know, run Tomcat behind another web server like Apache HTTPD, which means that the connector mappings would have to be adjusted in order for you to deploy war files there.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
merve klug
Greenhorn

Joined: Oct 07, 2009
Posts: 17
Misha Ver wrote:Going back it is completely not clear what do you mean "i uploaded my project.war into www and also web-inf directories". If you have war file, what are you doing with web-inf directories. Just step back and go over Tomcat deployment instructions.


i know i must copy my project.war into www. but when it doesn't work i copy my project.war also into web-inf.

i do not do a manual deployment. i "clean and build" in NetBeans ide, after that a project.war appears in project's dist folder. i copy and paste this into my host's www folder.

i do so because when i do this for my early host, it was working.

Ben Souther wrote: Is this a hosted server or one where you installed Tomcat yourself?

Most hosting companies re-configure Tomcat to fit their deployment model.
They also all, as far as I know, run Tomcat behind another web server like Apache HTTPD, which means that the connector mappings would have to be adjusted in order for you to deploy war files there.


no it is a hosted server, and my service provider send me an automatic e mail that tells my jsp configuration is ok. but it is not and i am waiting for a reply today, the first day of the week.

also, if they have a different deployment model what should i do, should i make a deployment manually in all the cases i need to update my project on the server. it seems fatigue to me.

thanks for replies.

Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
In this case it would be better to check with your service provider.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to run war file on server(not localhost)