Results 1 to 14 of 14

Thread: How to auto deploy .war on cpanel server?

  1. #1
    Registered Member
    Join Date
    Aug 2003
    Posts
    28

    Default How to auto deploy .war on cpanel server?

    Hi there,

    I just install CPanel's tomcat addon, but I have questions about deploy war files.

    How can we deploy war file without giving everyone access to Tomact manager?
    As I try to deploy a war file using Tomcat manager, it was uncompress at tomcat's default "webapps" dir, but not /home/username/public_html , how does everyone else dealing with this?
    Can we set CP serve to auto deploy war files?

  2. #2
    Registered Member
    Join Date
    Aug 2003
    Posts
    28

    Default

    Any one could help?

  3. #3
    Registered User
    Join Date
    Aug 2002
    Posts
    35

    Default

    Hi,

    Did you get any solution?

    Thanks
    UKA

  4. #4
    Registered Member
    Join Date
    Aug 2003
    Posts
    28

    Default

    Well, cpanel's developer replied:

    Can we have CP's addon module Tomcat to auto deploy a end user's war
    file after they upload their war file to the server?

    You can have it do anythign you wish in the install function.

    As far as watching for it to upload and doing somethgin you'd have to setup a
    mechanism to watch for it and act on it.
    However, could someone explan me what he was talking about?

  5. #5
    Registered Member
    Join Date
    Aug 2006
    Posts
    6

    Default

    any solution?

    my jsptest file is working fine. But howto deploy WAR file? How is it working?

    thanks,
    Muugii

  6. #6
    Registered User
    Join Date
    Mar 2010
    Posts
    3

    Default

    Have you had a response to your question ? I m suffering for the same problem.

    Thanks.

  7. #7
    Registered Member
    Join Date
    Jun 2003
    Location
    Bharat
    Posts
    263
    cPanel Access Level

    Root Administrator

    Default

    You will have to fix the entries at /usr/local/jakarta/tomcat/conf/server.xml

    Some time back after lot of tweaking I used this and it worked:

    <Host name="domain.com" appBase="/home/username/public_html" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false" reloadable="true">
    <Alias>www.domain.com</Alias>
    <Context path="" reloadable="true" docBase="/home/username/public_html" debug="1" privileged="true" autoDeploy="true" liveDeploy="true" />
    <Context path="/manager" debug="0" privileged="true" docBase="/usr/local/jakarta/tomcat/server/webapps/manager">
    </Context>
    </Host>
    There was a problem preserving the entries, for the same follow this thread
    Unable to run jsp pages with www.domain.com - cPanel Forums
    Vinayak Sharma
    Vinsar.Net - Quality WebHosting Services at Economical Price USA, & European Servers
    Book Your Domain with Confidence Reliable Domain Reseller Account

  8. #8
    Registered Member cPanel Partner NOC Badge
    Join Date
    Aug 2005
    Location
    Chicago, Illinois
    Posts
    15

    Default

    Actually it's very simple, they just need to unzip the .war archive in shell. See:

    How to deploy a .WAR application - Ubiquity Web Hosting Wiki

    We have over 100 users that have used these instructions and it works great. If you deployed Tomcat using EasyApache and have it setup as cPanel has designed, that should be about it. That was derived from:

    http://twiki.cpanel.net/twiki/pub/Al...s08/Tomcat.pdf
    Corey Northcutt
    Northcutt Consulting - Expert SEO, Social Media, Press, and Affiliate Marketing

  9. #9
    Registered Member
    Join Date
    Jun 2003
    Location
    Bharat
    Posts
    263
    cPanel Access Level

    Root Administrator

    Default

    Quote Originally Posted by qwidjib0 View Post
    Actually it's very simple, they just need to unzip the .war archive in shell. See:

    How to deploy a .WAR application - Ubiquity Web Hosting Wiki

    We have over 100 users that have used these instructions and it works great. If you deployed Tomcat using EasyApache and have it setup as cPanel has designed, that should be about it. That was derived from:

    http://twiki.cpanel.net/twiki/pub/Al...s08/Tomcat.pdf
    But for that the user will need shell access, also what if it's a continuous development/updating process.

    The server.xml tweak that I had mentioned, just needs the .WAR file uploaded as any other file to /public_html folder and it's done. Now if the developers have made any changes on the dev platform, they just have to upload the new .WAR file and they are done.
    Vinayak Sharma
    Vinsar.Net - Quality WebHosting Services at Economical Price USA, & European Servers
    Book Your Domain with Confidence Reliable Domain Reseller Account

  10. #10
    Registered Member cPanel Partner NOC Badge
    Join Date
    Aug 2005
    Location
    Chicago, Illinois
    Posts
    15

    Default

    Quote Originally Posted by Vinsar View Post
    But for that the user will need shell access
    True, though jailed shell is a nice feature to enable.

    also what if it's a continuous development/updating process.
    That could present a problem (I believe the servlet would still need to be restarted, which cPanel currently does not provide a feature for short of restarting Tomcat). Although editing in a live server environment is not best practice (the ideal method would obviously be to develop and test in Eclipse with a local machine being used for development).

    The server.xml tweak that I had mentioned, just needs the .WAR file uploaded as any other file to /public_html folder and it's done. Now if the developers have made any changes on the dev platform, they just have to upload the new .WAR file and they are done.
    Actually both methods result in that entry being added to server.xml.
    Corey Northcutt
    Northcutt Consulting - Expert SEO, Social Media, Press, and Affiliate Marketing

  11. #11
    Registered Member
    Join Date
    Feb 2010
    Location
    India
    Posts
    27

    Default

    Haiii,

    uploaded .war to public_html >> restarted tomcat
    Extracted folder was created in
    /usr/local/jakarta/apache-tomcat-5.5.28/work/Catalina/DOMAIN.COM/FOLDER (war file name)

    that makes the domain accessible through browser as :
    DOMAIN.COM:8080/FOLDER
    hope its clear for my friends...

    Now I just want to know how I can make this accessible as DOMAIN.com/FOLDER
    Or
    how I can make the extracted folder automatically come under my public_html folder instead of /usr/local/jakarta/apache-tomcat-5.5.28/work/Catalina/DOMAIN.COM/FOLDER

    thanks...

  12. #12
    Registered Member
    Join Date
    Jun 2003
    Location
    Bharat
    Posts
    263
    cPanel Access Level

    Root Administrator

    Default

    Create the .war without the folder path, your deployment will then be in the /public_html
    Vinayak Sharma
    Vinsar.Net - Quality WebHosting Services at Economical Price USA, & European Servers
    Book Your Domain with Confidence Reliable Domain Reseller Account

  13. #13
    Registered User
    Join Date
    Jul 2010
    Posts
    1

    Default

    Quote Originally Posted by Vinsar View Post
    Create the .war without the folder path, your deployment will then be in the /public_html
    can u explain how to make this? im having the same problem

    my war is deploying on jakart folders and with that i can acces by site.com:8080 i want to acess as site.com too

  14. #14
    Registered Member
    Join Date
    Feb 2010
    Location
    India
    Posts
    27

    Default Solve port problem

    read the last post in below link
    to solve port problem mentioned here
    http://forums.cpanel.net/f5/how-fix-...at-161074.html

Similar Threads

  1. How to deploy my war file (website) in cPanel?
    By azizmb in forum General Discussion
    Replies: 5
    Last Post: 01-10-2014, 11:05 AM
  2. cPanel and Tomcat: Cannot Deploy a War File
    By sjaguar13 in forum General Discussion
    Replies: 0
    Last Post: 11-01-2011, 01:15 PM
  3. tomcat can not deploy war file
    By amiry2 in forum General Discussion
    Replies: 1
    Last Post: 09-06-2011, 12:50 PM
  4. (Mystery) Auto-deploy .war on Resin
    By iCARus in forum General Discussion
    Replies: 3
    Last Post: 12-07-2006, 02:09 PM
  5. Tomcat: deploy .war
    By JiNkYs in forum General Discussion
    Replies: 0
    Last Post: 03-24-2006, 09:45 AM
bargain