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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Servlet Package Error

Status
Not open for further replies.

Bygbobbo

Programmer
Apr 23, 2002
145
US
I just upgraded to XP and loaded 1.4 on my system. I can compile applets and stand alone apps just fine, but when I try to compile Servlets I get a javax package missing error. My class path is correct and src file is correct. I have added the servlet jar file to the class path also..

anyone have any suggestions

 
I have the same problem and finding help is like next to impossible. It's like a big guessing game
 
did you look through the jar to see if your imported classes are actually there?
 
I looked through a bunch of them starting with servlets.jar and rt.jar and tools.jar.. Everything was there physically..
 
and the jar is in the classpath, not just the directory where the jar is found?
 
ok, this sounds weird... so please post the src, classpath and error message
 
On my old OS (4.0 NT) this servlet compiled fine...

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\j2sdk1.4.0\bin;%path%; C:\j2sdkee1.3.1\bin\j2ee.jar;C:\j2sdkee1.3.1\lib\j2eetools.jar;C:\j2sdk1.4.0\jre\lib\rt.jar

error:
bmpServlet.java:5 package javax.servlet does not exist
import javax.servlet.*;

bmpServlet.java:6 package javax.servlet.http does not exist
import javax.servlet.http*;

top of code:
import java.io.*;
import javax.servlet.*; //line 5
import javax.servlet.http.*;//line 6
import java.sql.*;
import java.text.*;
import java.util.*;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top