Solved

Compilation error on javax.servlet. etc

Posted on 2006-10-23
4
367 Views
Last Modified: 2010-03-31
Using iGRASP I'm trying to compile on my local machine file that uses the following references and getting errors:

ScorecardSelector.java:31: package javax.servlet does not exist
import javax.servlet.RequestDispatcher;
                     ^
ScorecardSelector.java:32: package javax.servlet does not exist
import javax.servlet.ServletContext;
ScorecardSelector.java:36: package javax.servlet.http does not exist
import javax.servlet.http.HttpServletResponse;
                          ^
ScorecardSelector.java:53: cannot resolve symbol
symbol  : class HttpServlet
I have full SDK 2.0 and separate javax package, but don't know where should it be placed for this project to see it at compile time.
Please help. I need it ASAP.
Thnx
PS. I'm new to Java.

0
Comment
Question by:laguna21
  • 2
  • 2
4 Comments
 
LVL 11

Expert Comment

by:Manish
ID: 17793711
Do you have j2ee.jar ?
Is it in classpath?
0
 

Author Comment

by:laguna21
ID: 17795265
yes, I have it in my CLASSPATH...
0
 
LVL 11

Accepted Solution

by:
Manish earned 500 total points
ID: 17795873
ru using any IDE?
0
 

Author Comment

by:laguna21
ID: 17796102
I've added servlet.jar to my classpath and it worked. Thank you very much for the idea
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Android studio getdrawable(int) is deprecated 4 43
for i loop in grovy 1 46
eclipse argument 14 53
eclipse apache tomcat admin console 52 66
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now