Discussions

Web tier: servlets, JSP, Web frameworks: Error with servlet.jar

  1. Error with servlet.jar (5 messages)

    Hi,
    I'm receiving the following error while trying out the tomcat examples.

    Internal Servlet Error:

    java.lang.Error: Unresolved compilation problems:
    The import javax.servlet cannot be resolved
    The import javax.servlet cannot be resolved
    HttpServlet cannot be resolved or is not a valid superclass
    HttpServletRequest cannot be resolved (or is not a valid type) for the argument request of the method doGet
    HttpServletResponse cannot be resolved (or is not a valid type) for the argument response of the method doGet
    ServletException cannot be resolved (or is not an exception type) for the method doGet

    Please let me know what needs to be done.

    Threaded Messages (5)

  2. Looks like servlet.jar is not in your container's classpath.
  3. Error with servlet.jar[ Go to top ]

    Hi Senthil,
    I have servlet.jat in the classpath.
    Rajah
  4. j2ee.jar is not in the classpath.
  5. Ok...[ Go to top ]

    How do you get the j2ee.jar in the containers path? I guess it will be dependent on the server you are using?

    See, I think the problem is more involved than that. I am using Tomcat and having this problem. The servletapi.jar sits inside the common/lib directory and Tomcat still can't find it. It should find it there.

    If you get this error, something is pretty messed up.
  6. j2ee.jar is not in the classpath.[ Go to top ]

    I have the j2ee.jar in the classpath.