wood burning stoves 2.0*
The moose likes Other Open Source Projects and the fly likes Howto Configure Eclipse for both Tomcat w/servlet-api.jar and in-process Jetty w/servlet-api-2.5? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Howto Configure Eclipse for both Tomcat w/servlet-api.jar and in-process Jetty w/servlet-api-2.5?" Watch "Howto Configure Eclipse for both Tomcat w/servlet-api.jar and in-process Jetty w/servlet-api-2.5?" New topic
Author

Howto Configure Eclipse for both Tomcat w/servlet-api.jar and in-process Jetty w/servlet-api-2.5?

Frank Silbermann
Ranch Hand

Joined: Jun 06, 2002
Posts: 1379
I am assigned to a project that uses:

  • Subversion
  • Tomcat
  • servlet-api.jar (i.e., pre-2.5 version)

  • We develop using Eclipse.

    The team has set up a J2EE server project in Eclipse that uses Tomcat.

    This set up does not allow me to step through the server code in the debugger, so I would like to add a class and an Eclipse run configuration that will allow me to run the servlet as an embedded-Jetty application.

    My main issue is that Jetty appears to rely on the servlet-api-2.5.jar. However, my Eclipse project relies on a separate library project that includes a bunch of Jar files -- including the older servlet-api.jar.

    One solution is to upgrade to use of the servlet-api-2.5 for production. Let's assume that management is not willing to make this "risky" change.

    Therefore, I'd _like_ to be able to do is to continue compiling my servlet in Eclipse using the old servlet-api.jar -- and running it that way in Tomcat to ensure it will work in the production environment.

    But I'd also like to be able to run my servlet in Eclipse as an application using embedded Jetty (and thus the servlet-api-2.5.jar) for initial debugging.

    Is there a reasonably clean way to set up a separate Eclipse run configuration for my new start-up class that relies on the other Jars in the library project -- but NOT servlet-api.jar, and which has both servlet-api-2.5.jar and Jetty.jar in its classpath?

    How would I do this?

     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Howto Configure Eclipse for both Tomcat w/servlet-api.jar and in-process Jetty w/servlet-api-2.5?
     
    Similar Threads
    embedding a servlet server in a jar
    Using jetty in an ant project
    What is the difference between including jar files in Lib folder and the Java Build Path of Eclipse
    Trying to run my first servlet through Eclipse + XAMPP
    How to include servlet api in eclipse