Article:
  Deploying Web Applications to Tomcat
Subject:   package javax.servlet doesn't exist problem
Date:   2002-02-06 07:35:47
From:  
Hi,

I'm pretty new to tomcat. I met a problem when I followed the article to add servlets. I copied the login.java code of Listing 4 and put it in /onjava/WEB-INF/classes/com/onjava. Then I compiled by javac com/onjava/login.java but the error messages say: package javax.servlet doesn't exist. What should I do? Your quick reply help is greatly appreciated.


Thanks,
Daqing

Full Threads Oldest First

Showing messages 1 through 11 of 11.

  • package javax.servlet doesn't exist problem
    2002-05-30 16:05:12  ed.smith@nau.edu [View]

    Daqing,

    Saw your post regarding the Tomcat Apache tuturial by James Goodwill. Did you ever get "login.java" to compile? I'm having the same trouble.

    TIA,

    Ed
    • package javax.servlet doesn't exist problem
      2003-09-22 01:07:09  anonymous2 [View]

      compile it with the servlet.jar, which is in that common/lib folder of tomcat.

      regards
      Guru
      • package javax.servlet doesn't exist problem
        2003-11-12 20:26:15  anonymous2 [View]

        How??\
        {thank you)
    • package javax.servlet doesn't exist problem
      2002-07-03 07:04:27  bd000435 [View]

      Daqing,
      Saw your post regarding the Tomcat Apache tuturial by James Goodwill. Did you ever get "login.java" to compile? I'm having the same trouble.

      TIA,

      BD

      • package javax.servlet doesn't exist problem
        2003-11-12 12:52:08  anonymous2 [View]

        Hi,
        Same problem here and with other packages compiling. Please let me know if your problem's solved,and I don't exactly know how we could compile the file with the servlet.jar and what the exact command for it is.

        Sincerely and thanks
        • package javax.servlet doesn't exist problem
          2003-12-09 01:45:50  anonymous2 [View]

          copy javax.servlet.jar to the directory where ant.jar exists and try.
          Rgds
          Tapan
          • package javax.servlet doesn't exist problem
            2005-03-21 02:30:03  poojaSharma [View]

            I have copied servlet.jar in same paath as ant.jar put it in the classpath still package servlet.http does not exist is shown
            • package javax.servlet doesn't exist problem
              2005-03-30 08:11:33  sheefs [View]

              I know this error has probably been solved long ago by the person who made this post. However, for anyone having this problem now it might be helpful know that you have to copy the j2ee.jar file, (download the j2ee sdk from Sun site) from the lib directory of Sun AppServer, into the ant\lib directory. This should solve the problem.Good luck!
              • package javax.servlet doesn't exist problem
                2005-12-30 07:39:41  ranjithsb [View]

                NO. I still have this problem after trying all the solutions given in number of forums. I have tried with both JBuilder Foundation and Sun Java Studio EE. I am completely stuck with this problem for 3 days now.
                • package javax.servlet doesn't exist problem
                  2007-12-05 21:31:00  timmythehand [View]

                  Once I got tomcat working i.e. by running bin/startup.sh for linux, I copied the lib/servlet-api.jar to my ant/lib and that fixed things for me.
                  • package javax.servlet doesn't exist problem
                    2009-09-09 04:57:26  j2ee dev [View]

                    please help for error