This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes war file not deploying properly Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "war file not deploying properly" Watch "war file not deploying properly" New topic
Author

war file not deploying properly

vjy chin
Ranch Hand

Joined: Feb 17, 2005
Posts: 279
I am using apache-tomcat-6.0.20 server. I deploy .war file when the server is running, but sometimes the war file is not deployed properly. The folders are there, but not the jsp files. So I have to manually unzip the war file and copy all the files.

As I said, this happens sometimes, is there anything that I need to check.

The tomcat is a service and I have turned on the autoDeploy attribute in server.xml.

Any suggestions welcome. Thanks.
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
Did you check log files?
vjy chin
Ranch Hand

Joined: Feb 17, 2005
Posts: 279
I did check the log files and I could not see anything that would explain this.

William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
Exactly what steps do you take to
deploy .war file when the server is running,


Bill
vjy chin
Ranch Hand

Joined: Feb 17, 2005
Posts: 279
The way the app works is, a war file is downloaded from another place and copied into the webapps folder and the tomcat service is started. Most of the times the war file is deployed properly, but sometimes it is not, mostly there will just be empty folders and not the jsp or other files.

I have also tried to manually copy the war file to the webapps folder after deleting the existing war and the war folder.

Thanks.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
Pretty mysterious alright!

If this was my problem I think I would be checking that the war file is properly constructed.

Are the JSP files you need actually in the war file and just not getting deployed?

How about the manifest? Anything odd about it?

Bill
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
The way the app works is, a war file is downloaded from another place and copied into the webapps folder and the tomcat service is started.


Does this mean that before the WAR is downloaded Tomcat is not running? If this is true, what is turning Tomcat off?

vjy chin
Ranch Hand

Joined: Feb 17, 2005
Posts: 279
Thanks William and Jimmy.

The JSP files are in the war file. So if the jsps are not deployed properly, I had to manually un-war the app, copy the jsps files. MANIFEST does look good.

The app will be deployed when the tomcat is off. It is the part of application deployment process (bring up a new amazon instance). But even when tomcat is running and deploy the war file, I see this issue.

Thanks.
Sunny Bhandari
Ranch Hand

Joined: Dec 06, 2010
Posts: 448

have you written some sort of ANT script to copy the war file from source to webapps folder?

I don't think this to be Tomcat issue...Check your source folder when you see missing jsp...


Java Experience
vjy chin
Ranch Hand

Joined: Feb 17, 2005
Posts: 279
Thanks for the response. There is a groovy script which gets executed when the instance is brought up and initializes, downloads the war, deploys in tomcat and so on.

But I know the war file is fine, since I manually get the jsps from that war file (from the same machine) and copy it to the application folders.

Thanks.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: war file not deploying properly
 
Similar Threads
getRealPath() returns null using Weblogic
Http status 500 Error instantiating servlet class peigov.businessportal.servlets.LoginServlet
Do I need context name
Trinidad-demo not working with Skin
HOW TO SET PATH IN TOMCAT OF ANT BUILDER