Q:

How to reload Tomcat Java Server application from command line?

I'm using Tomcat Web Application Manager to reload a Tomcat application after I recompile the java servlet file, is there a way to reload the app using command line?

A:

I can think of a variety of ways to do this from the command line:

Copy the new WAR file to the webapps folder, or just touch it.
Use wget or curl to send the appropriate HTTP requests to the server's web management interface.
Use the "catalina.sh" script ... if you haven't installed tomcat as a service.
Run "/etc/init.d/tomcat restart"  ... or however you restart a service on your system.

Note: I (too) have had difficulties in the past getting WAR file redeployment to work.  When I'm doing Tomcat development, I tend to go for a full restart rather than redeploying individual servlets / WAR files.

What is WAR file? 

Read this: http://en.wikipedia.org/wiki/WAR_file_format_%28Sun%29

I have a project symlink in /var/lib/tomcat7/webapps/app to my app directory and that's it and it work.

Bad idea, for a variety of reasons.  But if you insist, then I suggest trying approaches 2, 3 or 4 as described above.

