newbie servlet help

Discussion in 'Java' started by sparrow, Sep 2, 2004.

  1. sparrow

    sparrow Guest

    Hi

    I cant compile my servlets, I think I have somthing missing ( :) ),
    I'm geting this error when I try to compile a servlet (command line
    javac HelloWorld.java is this right ?)

    C:\Program Files\lws-3.0.3\webapps\hall\HelloWorld.java:4: package
    javax.servlet does not exist
    import javax.servlet.*;

    however compiling a test class (none servelet) gives me this error

    C:\j2sdk1.4.2_04\java\net\URI.java:2572: warning: as of release 1.4,
    assert is a keyword, and may not be used as an identifier
    assert false;

    can anyone help ?
    Thanks
    Simon
     
    sparrow, Sep 2, 2004
    #1
    1. Advertising

  2. sparrow

    Nigel Wade Guest

    On Wed, 01 Sep 2004 21:05:13 -0700, sparrow wrote:

    > Hi
    >
    > I cant compile my servlets, I think I have somthing missing ( :) ),
    > I'm geting this error when I try to compile a servlet (command line
    > javac HelloWorld.java is this right ?)
    >
    > C:\Program Files\lws-3.0.3\webapps\hall\HelloWorld.java:4: package
    > javax.servlet does not exist
    > import javax.servlet.*;


    javax.servlet is not part of the standard SDK. It is normally supplied in
    a separate jar file (servlet.jar) with the servlet container. You need to
    locate where this has been installed on your system and specify
    that location as part of the classpath for javac and java.

    >
    > however compiling a test class (none servelet) gives me this error
    >
    > C:\j2sdk1.4.2_04\java\net\URI.java:2572: warning: as of release 1.4,
    > assert is a keyword, and may not be used as an identifier
    > assert false;


    Try adding '-source 1.4' to the javac command.


    --
    Nigel Wade, System Administrator, Space Plasma Physics Group,
    University of Leicester, Leicester, LE1 7RH, UK
    E-mail :
    Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
     
    Nigel Wade, Sep 2, 2004
    #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. Andy Fish
    Replies:
    4
    Views:
    2,452
    Andy Fish
    Dec 17, 2003
  2. Sean Clarke
    Replies:
    1
    Views:
    1,952
    Sudsy
    Jan 7, 2004
  3. circuit_breaker
    Replies:
    2
    Views:
    2,095
    Jack Jia
    Apr 4, 2004
  4. chamikara
    Replies:
    1
    Views:
    49,975
  5. ppcguy
    Replies:
    1
    Views:
    631
    Andrea Desole
    Aug 8, 2005
Loading...

Share This Page