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.

Servlet Problem

Discussion in 'General Discussion' started by v2webltd, Nov 6, 2002.

  1. v2webltd

    v2webltd Member

    Joined:
    May 8, 2002
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I had installed Tomcat on my linux machine after then I got a link & Install servlet& in mY WHM.When I install servlet to a particular domain then it add some lines in httpd.conf file under that particula domain's virtualhost like

    &IfModule mod_jk.c&
    JkMount /*.jsp ajp13
    JkMount /servlet/* ajp13
    JkMount /servlets/* ajp13
    &/IfModule&


    But when i tried to run the class file it is not running perfectly , B'coz i couldn't understand where should I put the Clas files and what line should add in the server.xml file.
    I need help if you can help me then please help me.

    Thank You.
     
  2. jsteel

    jsteel Well-Known Member

    Joined:
    Jul 4, 2002
    Messages:
    646
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Atlanta, GA
    The server.xml fuile should be updated automatically. You need to create a directory called WEB-INF under your public_html directory. Then under that one create two directories

    1) classes
    2) lib

    You put your class files (servlets) into the classes directory and JARs into the lib directory.

    You'll need to restart Tomcat after you create those directories so that they are activated.

    Jaz
     
  3. v2webltd

    v2webltd Member

    Joined:
    May 8, 2002
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I had made changes according to your instruction.But still I m facing problem or u can say im not able to run my clas files.

    When I try to run my website's link it gives me this path on browser

    http://www.moneyyantra.com/WEB-INF/classes/my_login


    Error message &The page cannot be found&.


    Please help me to find the solution.

    Thank you
    Mithilesh
     
  4. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    The syntax would be as follows;

    http://www.moneyyantra.com/servlet/my_login

    This should call /WEB-INF/classes/my_login

    servlet is the directive for /WEB-INF/classes.

    Curious to which version of Tomcat you are using.
     
  5. xp2u

    xp2u Active Member

    Joined:
    Jan 27, 2003
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
  6. hostit1

    hostit1 Well-Known Member

    Joined:
    Jul 24, 2003
    Messages:
    88
    Likes Received:
    0
    Trophy Points:
    0
    Your package works better than Cpanels

    Awesome. Thanks for the software and the use of your bandwidth.

    Everything is working like a champ now!

    Can't wait until Cpanel supports JSP

    cPanel.net Support Ticket Number:
     
  7. strauberry

    strauberry Well-Known Member

    Joined:
    Mar 25, 2003
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    I get the same 404 error but I did everything like you wrote. I use 4.0.3 Please help, thank you!!

    Best regards
    strauberry
     
  8. GOT

    GOT Get Proactive!

    Joined:
    Apr 8, 2003
    Messages:
    900
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Norfolk, VA
    cPanel Access Level:
    DataCenter Provider
    Re: Hi

    At first glance, I would say that it is because you are not using an extension. would that be helloworld.jsp?
     
  9. strauberry

    strauberry Well-Known Member

    Joined:
    Mar 25, 2003
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    Hi,
    I have the same problem! In the class-directory there's only one file: HelloWorldServlet.class. With an without .class I get the 404...

    Thank you!


    strauberry
     
  10. Solokron

    Solokron Well-Known Member

    Joined:
    Aug 8, 2003
    Messages:
    849
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle
    cPanel Access Level:
    DataCenter Provider
    Same issue.
     
  11. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    In one of the case here, the file is called " HelloWorldServlet.class" this would translate to http://domain.com/servlet/HelloWorldServlet

    I take you have all checked httpd.conf and server.xml to ensure that 1. the domain does have everything enabled for it. and 2. that servlet as well as the servlets are allowed in the server.xml file. ?

    If still getting a 404, look at the logs in

    /usr/local/apache/domlogs/domain.com
    /usr/local/apache/logs
    /usr/local/jakarta/jakarta-tomcat-4.1/build/logs or
    /usr/local/jakarta/jakarta-tomcat-4.0/build/logs depending which version

    tailing the most recent logs when do the servlet call and see what info comes with the error.
     
Loading...

Share This Page