War file deployment/configuration in tomcat 7 servers

Please find the below article which describes WAR file deployment and configuration details in Java Reseller Hosting.

In cpanel servers apache is the webserver and tomcat is application server. Any request made for a website will first go to apache. If you have made request for a html file or css or js or images it will be served by apache. If any request for .jsp, servlet or .do is made it will go to tomcat and tomcat will serve the request.

In Java reseller webhosting server tomcat 7.x has been installed.

The installation path is /usr/share/tomcat. You will find the following links in that folder

conf -> /usr/share/tomcat/conf/
lib -> /usr/share/tomcat/lib/
logs -> /usr/share/tomcat/logs/
temp -> /usr/share/tomcat/temp/
webapps -> /usr/share/tomcat/webapps/
work -> /usr/share/tomcat/work/

This means the original path of the links as the folders provided in the right.

1.The configuration files are present in /usr/share/tomcat/ folder.
2. If you wish to clear tomcat garbage, you can remove the files inside /usr/share/tomcat/work/Catalina

After adding the domain in your whm, you must install servlets in that domain in order to run jsp or servlets.

Deploying war file is considered insecure and hence it is not allowed by default in your tomcat.

In ftp

In general

All classes must be put inside the WEB-INF/Classes folder
Even put your library files also inside it.
Try placing classes and library files inside the lib folder also.
You can place your jsp files in public_html folder.
We have uploaded sample servlets in WEB-INF/classes folder in your public_html

You can check the test page by domainname/jsptest.jsp

Important : You can access any servlet by using www.yourdomain.com/servlet/YourServletName