Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

javac problem

Status
Not open for further replies.

keegank

Programmer
Aug 12, 2003
10
GB
Hi everyone, I am still trying to re-configure the application that got screwed by this virus.

Now I know this will probably seem like a stupid question - whenerever I try to javac any of my servlets I get the following error

doLogin.java:5: package javax.servlet does not exist
import javax.servlet.*;
^
doLogin.java:6: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
doLogin.java:13: cannot resolve symbol
symbol : class HttpServlet
location: class doLogin
public class doLogin extends HttpServlet




Can anyone recognise I have done wrong?

Thank you.

Andy
 
Not an stupid at all...
add this to your classpath variable..

<install-dir>/Tomcat 4.1/common/lib/servlet.jar
where <instal-dir> is the parrent drive/directory of tomcat..

hope that helps...
libaax
 
Thank you very much libaax. You don't know how much this means to me.

Andy

 
Yea...I forgot to mension that servlet.jar is the Java API for servlets... more info see text below straight from the manifest file within. :)


Manifest-Version: 1.0
Created-By: Apache Ant 1.5

Name: javax/servlet/
Specification-Title: Java API for Servlets
Specification-Version: 2.3
Specification-Vendor: Sun Microsystems, Inc.
Implementation-Title: javax.servlet
Implementation-Version: 2.3.1
Implementation-Vendor: Apache Software Foundation

Name: javax/servlet/jsp/
Specification-Title: Java API for JavaServer Pages
Specification-Version: 1.2
Specification-Vendor: Sun Microsystems, Inc.
Implementation-Title: javax.servlet.jsp
Implementation-Version: 1.2.1
Implementation-Vendor: Apache Software Foundation


Libaax
Hakuna Matata....;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top