Results 1 to 2 of 2
  1. #1
    nikhil2jan is offline Member
    Join Date
    Jan 2009
    Posts
    1
    Rep Power
    0

    Default package javax.servlet does not exist

    i am unable to import package servlet
    i have set envt variable to .jr file
    thanking you

  2. #2
    neilcoffey is offline Senior Member
    Join Date
    Nov 2008
    Posts
    286
    Rep Power
    7

    Default

    The servlet classes aren't (for some reason) included in the standard JDK. You need to get hold of either the Java Enterprise Edition, or "something else" such as Tomcat that can run Servlets (and whose Servlet classes you can also compile against).

    If you get the Java Enterprise Edition (remember, this is purely so you can pinch the Servlet classes -- you don't actually have to use this version of Java for anything as such), then the Servlet classes live inside a jar called "j2ee.jar". You need to make sure that this Jar is included in your project (e.g. in Eclipse, using the "Add External Jar" option in the project preferences).

Similar Threads

  1. package java.text does not exist
    By sknn in forum NetBeans
    Replies: 12
    Last Post: 02-03-2010, 04:14 PM
  2. package mj does not exist
    By PzK in forum New To Java
    Replies: 8
    Last Post: 12-03-2008, 11:30 PM
  3. javax.cypto package
    By remya_srinivasan in forum Advanced Java
    Replies: 1
    Last Post: 01-15-2008, 08:06 PM
  4. Replies: 1
    Last Post: 08-07-2007, 04:47 PM
  5. javax.comm package for COM ports
    By valery in forum Advanced Java
    Replies: 1
    Last Post: 08-07-2007, 04:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •