The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Tomcat class file where to...

Discussion in 'General Discussion' started by juzthost, Dec 7, 2002.

Thread Status:
Not open for further replies.
  1. juzthost

    juzthost Member

    Joined:
    Nov 10, 2002
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    May i know where to store my own class file?
    as well where do i upload my JSP file.
     
  2. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    class files should go under /home/user/www/WEB-INF/classes

    jsp's should work from anywhere under /home/user/www

    Call the class files from http://domain.com/servlets/classname
     
  3. juzthost

    juzthost Member

    Joined:
    Nov 10, 2002
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    but i cant get JSP work from www, you may try and see...
    http://207.44.162.164/~fengshui/
     
  4. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    [quote:5b9eec42e3][i:5b9eec42e3]Originally posted by juzthost[/i:5b9eec42e3]

    but i cant get JSP work from www, you may try and see...
    http://207.44.162.164/~fengshui/[/quote:5b9eec42e3]

    You cannot use jsp's by using ip address. Jsp's will only work from the FQDN that is assigned servlet/jsp support.
    http:207.44.162.164/~domain will not work but http://domain.com should work fine.
     
  5. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    [quote:30944e54c5][i:30944e54c5]Originally posted by dgbaker[/i:30944e54c5]

    [quote:30944e54c5][i:30944e54c5]Originally posted by juzthost[/i:30944e54c5]

    but i cant get JSP work from www, you may try and see...
    http://207.44.162.164/~fengshui/[/quote:30944e54c5]

    You cannot use jsp's by using ip address. Jsp's will only work from the FQDN that is assigned servlet/jsp support.
    http:207.44.162.164/~domain will not work but http://domain.com should work fine.
    [/quote:30944e54c5]

    Well i wouldn't agree to this one. I have jsp's running on my server with ips.

    There is a diff. story to the way my tomcat is setup.

    1. I don't use the tomcat plugin whcih comes with WHM
    2. Tomcat was setup and build from scratch on the server seperately. I got custom scripts written for the server which allows me to setup accounts with java enabled.

    These scripts allow dedicated jvm / shared jvm accounts as and what is needed for the customer. (Btw a dedicated jvm account is the one basically with shell access, having tomcat running with the user as the owner).

    Just try this, edit the server.xml of your tomcat and find the domain name which you setup for this ip address

    &Host name=&domain.com&&
    &Context path=&& docBase=&/home/abcdefg/public_html& crossContext=&false& /&
    &/Host&

    &Host name=&www.domain.com&&
    &Context path=&& docBase=&/home/abcdefg/public_html& crossContext=&false& /&
    &/Host&

    So if above are the domain details, add the below just above these or underneath (whereever you want)

    &Host name=&xx.xx.xx.xx&&
    &Context path=&& docBase=&/home/abcdefg/public_html& crossContext=&false& /&
    &/Host&

    Replace the xx.xx.xx.xx with your domain ip address. Now kill tomat and start it back up. Check with ps -aux to confirm the same.

    Try now. Incase of any troubles just mail me at anand@iwp.biz.

    regards,

    Anand
     
  6. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Anand - Please note juzthost is not talking about just IP based but ip/~user.

    With the tomcat setup with CPanel/WHM this will not work. And as you stated yourself you are using a different setup then 99% of cpanel/whm users would be using.

    My advise to him has based on a cpanel tomcat setup. Since you are not using the standard way through cpanel, I take you have to manually add jsp/servlet support for accounts?
     
  7. juzthost

    juzthost Member

    Joined:
    Nov 10, 2002
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    how bout this...

    http://www.juzthosting.com/index1.html
     
  8. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    no issue it seems to work fine. You enter a word and then try.jsp shows it to screen.
     
  9. juzthost

    juzthost Member

    Joined:
    Nov 10, 2002
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    its working now after some configuration.
     
Loading...
Thread Status:
Not open for further replies.

Share This Page