Setting Java Web Application contexts properly on cPanel

EagleEye007

Registered
Feb 16, 2015
4
0
1
cPanel Access Level
Root Administrator
Hi cPanel Guru's,

I am new to this world of cPanel and Web Hosting.

I have a web application developed in Java. I uploaded it to /home/<myAccount>/public_html/ and the path looks like /home/myAccount/public_html/MyJavaWebApp

The application is deployed on Apache Tomcat 7.0

I am able to access this deployed application using url /http://myaccount.com/MyJavaWebApp

However, I want to access it using url /http://myaccount.com

For this, I made below changes to /usr/local/easy/share/easy-tomcat7/conf/server.xml

<Host name="myaccount.com" appBase="/home/myaccount/public_html/MyJavaWebApp" unpackWARs="false" deployXML="false">
<Alias>www.myaccount.com</Alias>
<Context path="" reloadable="true" docBase="/home/myaccount/public_html/MyJavaWebApp" debug="1"/>
<Context path="/manager" debug="0" privileged="true"
docBase="/usr/local/easy/share/easy-tomcat7/webapps/manager">
</Context>
</Host>

Now, I am able to hit my site using url /http://myaccount.com with a major problem that I don't see any images there and some images sliders not working (I used jQuery skitter API for this) etc..

Very important thing to note is that I am able to access the site using url /http://myacccount.com/MyJavaWebApp without any issues (All images appear and all sliders and jQuery APIs work fine)

Can someone please let me know if I am missing something in my configuration?

Any suggestions are appreciated.

Thanks in advance!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,213
363
Hello :)

Do you notice any error messages in /usr/local/apache/logs/error_log when the images fail to load?

Thank you.
 

EagleEye007

Registered
Feb 16, 2015
4
0
1
cPanel Access Level
Root Administrator
Hi Michael,

Thanks for your response! I was able to resolve the issue. I was not aware of looking at /urs/local/apache/logs/error_log for tracing the issue.

Rather, I used Fiddler (A web debugging proxy) to look at what is the image URL under question and the context. I did set those things properly on my Java Web Application so that it can be deployed on any hosting env.

Thanks again for your response Michael. I appreciate the help :)
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,213
363
I am happy to see you were able to resolve the issue. Thank you for updating us with the outcome.