Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Nov 2002
    Posts
    14

    Default Tomcat 4 JSP OK Having Servlet WEB-INF issues

    I installed jsp-install-4.x.tar.gz from layer1.cpanel.net, installed it, configured stuff a bit, activated an account in WHM, and .JSP files work great inside the www directory, however I created a WEB-INF dir and lib / classes dir under the www dir but my JAR files are not being found. I also put a standard unpackaged class in the classes directory with no luck. Tomcat is getting invoked by the /servlet call but /servlet/classname is not working. I am familiar with java programming and resin by caucho... but his is my first experience with Tomcat outside of a dev environment and I am having trouble.

    Any ideas on how to troubleshoot this / where to look would be great. Thanks.

    -A.J.
    ajo@dpzone.com

  2. #2
    Moderator cPanel Partner NOC Badge dgbaker's Avatar
    Join Date
    Sep 2002
    Location
    Toronto, Ontario Canada
    Posts
    2,773

    Default

    A.J. - Jar files are a funny thing, they need to be set in the classpath. Unfortunatly this also requires a Tomcat restart. You need to put the jar files in a directory like $JAVA_HOME/lib/ext

    Hope that helps a little.
    Regards,
    David
    Forum Moderator

  3. #3
    Member
    Join Date
    Jul 2002
    Location
    Atlanta, GA
    Posts
    646

    Default

    [quote:fc9720eb74][i:fc9720eb74]Originally posted by dgbaker[/i:fc9720eb74]

    A.J. - Jar files are a funny thing, they need to be set in the classpath. Unfortunatly this also requires a Tomcat restart. You need to put the jar files in a directory like $JAVA_HOME/lib/ext

    Hope that helps a little.[/quote:fc9720eb74]

    Incorrect. You simply need to add your jars to your /WEB-INF/lib directory. Tomcat will automatically add them to the classpath. In addition, you can put any jar into the $JDK_HOME/jre/lib/ext and it will get loaded without needing to put it into the classpath. This was added into JDK/JRE 1.4.

    Bob, PM me the &IfModule mod_jk.c& section for the domain in your httpd.conf, as well as the &Host& entry for the domain in your server.xml file.

    Jaz

  4. #4
    Member
    Join Date
    Nov 2002
    Posts
    14

    Default

    My java version is:
    java version &1.4.0&
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
    Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)



    Here it the extract from the httpd.conf file: I understand that &ajp13& is saying.. use tomcat. But where is ajp13 defined? Are there other options for tomcat?



    ServerAlias www.myspu.net myspu.net
    ServerAdmin webmaster@myspu.net
    DocumentRoot /home/myspune/public_html
    BytesLog domlogs/myspu.net-bytes_log
    User myspune
    Group myspune
    ServerName www.myspu.net
    CustomLog domlogs/myspu.net combined
    ScriptAlias /cgi-bin/ /home/myspune/public_html/cgi-bin/


    JkMount /*.jsp ajp13
    JkMount /servlet/* ajp13
    JkMount /servlets/* ajp13

  5. #5
    Moderator cPanel Partner NOC Badge dgbaker's Avatar
    Join Date
    Sep 2002
    Location
    Toronto, Ontario Canada
    Posts
    2,773

    Default

    In the web.xml for the Tomcat install check that the following are not rem'd out

    &servlet&
    &servlet-name&invoker&/servlet-name&
    &servlet-class&org.apache.catalina.servlets.InvokerServlet&/servlet-class&
    &init-param&
    &param-name&debug&/param-name&
    &param-value&0&/param-value&
    &/init-param&
    &load-on-startup&2&/load-on-startup&
    &/servlet&


    &!-- The mapping for the invoker servlet --&
    &servlet-mapping&
    &servlet-name&invoker&/servlet-name&
    &url-pattern&/servlet/*&/url-pattern&
    &/servlet-mapping&


    Tomcat by default only sets up /servlet/ and it may be rem'd out.
    Regards,
    David
    Forum Moderator

Similar Threads & Tags
Similar threads

  1. Tomcat WEB-INF directory issue
    By atodea in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 09-24-2011, 08:09 AM
  2. Tomcat Jsp Servlet Support
    By Planet_Master in forum cPanel and WHM Discussions
    Replies: 79
    Last Post: 05-14-2006, 05:42 PM
  3. Apache + Tomcat: .htaccess, PHP & WEB-INF file exposure
    By cothrun in forum cPanel Developers
    Replies: 1
    Last Post: 10-25-2004, 03:24 AM
  4. Tomcat /WEB-INF/lib doesn't load JARs?
    By jsteel in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 10-06-2004, 06:49 PM
  5. Security - JSP / Servlet
    By BobFarkle in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 10-07-2003, 07:17 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube