Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Servlets?

Options
  • 11-02-2003 7:20pm
    #1
    Closed Accounts Posts: 375 ✭✭


    hey lads,

    I've been having a lot of problems compiling a servlet with j2ee, jdk1.4 and Tomcat 4.1.18 I know the code is grand it's just that I've forgotten how to set classpaths and for the compiler. Any Idea what I have to set to get the servlet to complied or if there is any *.jar that I need to include in the compile command.

    Cheers in Advance
    Mike


Comments

  • Registered Users Posts: 1,931 ✭✭✭Zab


    Not too sure about tomcat 4.x, but 3.x versions had a mode of the tomcat batch file that set the classpath variable. It's called env.

    So it's "tomcat env". Or you could just browse through the lib directory and add the ones you need.

    Zab.


  • Registered Users Posts: 1,994 ✭✭✭lynchie


    If your using J2EE, just include the j2ee.jar on the classpath, or you can also include servlet.jar which is in tomcat4/common/lib


  • Registered Users Posts: 20,975 ✭✭✭✭Stark


    make sure you include the actual filename of j2ee.jar or servlet.jar in your classpath, not just the directory

    eg:

    /usr/local/tomcat/common/lib/servlet.jar

    as opposed to

    /usr/local/tomcat/common/lib/

    There is a CLASSPATH environment variable

    set it to

    .:/usr/local/tomcat/common/lib/servlet.jar for a unix based system(note the period at the start this is the current directory)

    or just

    c:\tomcat\common\lib\servlet.jar for windows


  • Closed Accounts Posts: 375 ✭✭Baldy


    Cheers lads, Worked a charm!


Advertisement