Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • 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!

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

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...These forums are an excellent source and example of the way people can help each other..."

Geography

Where in the world do Tek-Tips members come from?

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

csphard (Programmer)
19 Jul 12 15:08
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>
Diancecht (Programmer)
19 Jul 12 18:52
Any help here?

Cheers,
Dian

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!

Back To Forum

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