HTTPSERVLET

Discussion in 'Java' started by brijesh, Jul 31, 2003.

  1. brijesh

    brijesh Guest

    i have a problem with servlets on jakarta tomcat 3.2.3
    on one server my program runs fine but when i copied the same program
    onto a new server with same applications i observed the following
    problems.
    Could any one please guide me on the solution to the the problem. the
    compilation gave me the errors as below. please tell me where am i
    missing out the javax.servlet pakage...if any path settings have to be
    done please let me know
    thank you
    Brijesh

    -----------------

    INF/classes/
    /usr/local/j2sdk1.4.0_03/bin/javac -classpath
    ..:/usr/local:/usr/local/j2sdk1.4.0_03/lib login.java
    login.java:24: package javax.servlet does not exist
    import javax.servlet.*;
    ^
    login.java:25: package javax.servlet.http does not exist
    import javax.servlet.http.*;
    ^
    login.java:30: cannot resolve symbol
    symbol : class HttpServlet
    location: class login
    public class login extends HttpServlet
    ^
    login.java:33: cannot resolve symbol
    symbol : class ServletConfig
    location: class login
    public void init(ServletConfig servletConfig)
    ^
    login.java:38: cannot resolve symbol
    symbol : class HttpServletRequest
    location: class login
    public void doGet(HttpServletRequest req, HttpServletResponse res)
    ^
    login.java:38: cannot resolve symbol
    symbol : class HttpServletResponse
    location: class login
    public void doGet(HttpServletRequest req, HttpServletResponse res)
    ^
    login.java:39: cannot resolve symbol
    symbol : class ServletException
    location: class login
    throws IOException,ServletException
    ^
    login.java:74: cannot resolve symbol
    symbol : class HttpServletRequest
    location: class login
    public void doPost(HttpServletRequest req, HttpServletResponse
    res)
    ^
    login.java:74: cannot resolve symbol
    symbol : class HttpServletResponse
    location: class login
    public void doPost(HttpServletRequest req, HttpServletResponse
    res)
    ^
    login.java:75: cannot resolve symbol
    symbol : class ServletException
    location: class login
    throws IOException,ServletException
    ^
    login.java:58: cannot resolve symbol
    symbol : class HttpSession
    location: class login
    HttpSession session = req.getSession(true);
    ^
    11 errors
    *** Error code 1
    make: Fatal error: Command failed for target `login.class'
    [test servlet]#
     
    brijesh, Jul 31, 2003
    #1
    1. Advertising

  2. You should check that there actually is a .jar file in the common/lib
    directory in Tomcat called servlet.jar That seems to be your problem.

    Pardon for any faulty english

    Regards

    Kim Andreassen

    "brijesh" <> skrev i melding
    news:...
    > i have a problem with servlets on jakarta tomcat 3.2.3
    > on one server my program runs fine but when i copied the same program
    > onto a new server with same applications i observed the following
    > problems.
    > Could any one please guide me on the solution to the the problem. the
    > compilation gave me the errors as below. please tell me where am i
    > missing out the javax.servlet pakage...if any path settings have to be
    > done please let me know
    > thank you
    > Brijesh
    >
    > -----------------
    >
    > INF/classes/
    > /usr/local/j2sdk1.4.0_03/bin/javac -classpath
    > .:/usr/local:/usr/local/j2sdk1.4.0_03/lib login.java
    > login.java:24: package javax.servlet does not exist
    > import javax.servlet.*;
    > ^
    > login.java:25: package javax.servlet.http does not exist
    > import javax.servlet.http.*;
    > ^
    > login.java:30: cannot resolve symbol
    > symbol : class HttpServlet
    > location: class login
    > public class login extends HttpServlet
    > ^
    > login.java:33: cannot resolve symbol
    > symbol : class ServletConfig
    > location: class login
    > public void init(ServletConfig servletConfig)
    > ^
    > login.java:38: cannot resolve symbol
    > symbol : class HttpServletRequest
    > location: class login
    > public void doGet(HttpServletRequest req, HttpServletResponse res)
    > ^
    > login.java:38: cannot resolve symbol
    > symbol : class HttpServletResponse
    > location: class login
    > public void doGet(HttpServletRequest req, HttpServletResponse res)
    > ^
    > login.java:39: cannot resolve symbol
    > symbol : class ServletException
    > location: class login
    > throws IOException,ServletException
    > ^
    > login.java:74: cannot resolve symbol
    > symbol : class HttpServletRequest
    > location: class login
    > public void doPost(HttpServletRequest req, HttpServletResponse
    > res)
    > ^
    > login.java:74: cannot resolve symbol
    > symbol : class HttpServletResponse
    > location: class login
    > public void doPost(HttpServletRequest req, HttpServletResponse
    > res)
    > ^
    > login.java:75: cannot resolve symbol
    > symbol : class ServletException
    > location: class login
    > throws IOException,ServletException
    > ^
    > login.java:58: cannot resolve symbol
    > symbol : class HttpSession
    > location: class login
    > HttpSession session = req.getSession(true);
    > ^
    > 11 errors
    > *** Error code 1
    > make: Fatal error: Command failed for target `login.class'
    > [test servlet]#
     
    Kim Andreassen, Jul 31, 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. Laurent Beaubier \(free.fr\)

    HttpServlet implementation in Tomcat 4.1

    Laurent Beaubier \(free.fr\), Jul 3, 2003, in forum: Java
    Replies:
    1
    Views:
    777
    Sudsy
    Jul 3, 2003
  2. Raoul Markus

    parameter in HttpServlet.doGet

    Raoul Markus, Aug 21, 2003, in forum: Java
    Replies:
    0
    Views:
    690
    Raoul Markus
    Aug 21, 2003
  3. Eric
    Replies:
    1
    Views:
    795
    Anton Spaans
    Feb 12, 2004
  4. news.amnet.net.au
    Replies:
    1
    Views:
    938
    Sudsy
    Sep 15, 2004
  5. Jason
    Replies:
    3
    Views:
    14,394
    Ryan Stewart
    Feb 20, 2005
Loading...

Share This Page