INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Import of javax.servlet.*; and javax.servlet.http.*; is not working. Tomcat 7 is working. Help

Import of javax.servlet.*; and javax.servlet.http.*; is not working. Tomcat 7 is working. Help

Import of javax.servlet.*; and javax.servlet.http.*; is not working. Tomcat 7 is working. Help

(OP)
I am trying to import the following, but for some reason it is not working.

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

I jsut set up Tomcat 7 and it is working. Is there anything else I have to do so that it can see the things I am trying to import?

Howard

Error's I am receiving

C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\webdev\WEB-INF\cl
asses\exercises\intro>javac FirstServlet.java
FirstServlet.java:4: error: package javax.servlet does not exist
import javax.servlet.*;
^
FirstServlet.java:5: error: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
FirstServlet.java:8: error: cannot find symbol
public class FirstServlet extends HttpServlet {
^
symbol: class HttpServlet
FirstServlet.java:10: error: cannot find symbol
public void doGet(HttpServletRequest req, HttpServletResponse res)
^
symbol: class HttpServletRequest
location: class FirstServlet
FirstServlet.java:10: error: cannot find symbol
public void doGet(HttpServletRequest req, HttpServletResponse res)
^
symbol: class HttpServletResponse
location: class FirstServlet
FirstServlet.java:11: error: cannot find symbol
throws ServletException, IOException {
^
symbol: class ServletException
location: class FirstServlet
6 errors

C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\webdev\WEB-INF\cl
asses\exercises\intro>

RE: Import of javax.servlet.*; and javax.servlet.http.*; is not working. Tomcat 7 is working. Help

Any help here?

Cheers,
Dian

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close