Eclipse/Tomcat test environment: Project dependencies/classpath

Discussion in 'Java' started by Thomas, Oct 18, 2003.

  1. Thomas

    Thomas Guest

    Hi,
    I have created a Tomcat project within Eclipse containing several
    servlets. Accessing the servlets via the webapps (projects) URL works
    fine.
    Afterwards I created another Tomcat project extending the first one
    (first project is checked in the second project's project references.
    I have correct web.xml files for both projects. The web.xml for the
    2nd project defines servlets contained in the 1st projest. This causes
    an error. The classloader apparently cannot find the servlets which
    actually belong to the 1st project. No classes that come from the 1st
    project are found in the 2nd project at all at runtime (compilation
    worked fine so there is no error in the build path).
    What do I have to do inorder to connect both projects? I do not want
    to copy all servlets and misc classes from the 1st to the 2nd project
    but use the 1st project as a foundation for extension projects like
    the 2nd one.
    Can anyone help?
    Thomas, Oct 18, 2003
    #1
    1. Advertising

  2. Thomas () wrote:
    : What do I have to do inorder to connect both projects? I do not want
    : to copy all servlets and misc classes from the 1st to the 2nd project
    : but use the 1st project as a foundation for extension projects like
    : the 2nd one.

    I would suggest that you read the class loader howto:
    http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html

    Basically different web apps can not see each others classes.
    Put the classes that need to be shared across several web apps in
    the $CATALINA_HOME/shared/classes directory

    /robo
    Robert Olofsson, Oct 18, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. vnssoftware
    Replies:
    0
    Views:
    1,215
    vnssoftware
    Dec 5, 2003
  2. Flip
    Replies:
    3
    Views:
    7,211
    Tony Morris
    Feb 9, 2004
  3. G&B Net
    Replies:
    1
    Views:
    1,151
    Andrew Thompson
    Jun 28, 2005
  4. Replies:
    2
    Views:
    730
  5. Replies:
    2
    Views:
    1,082
    Mike Schilling
    Mar 2, 2008
Loading...

Share This Page