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

package javax.servlet not found in import?

Status
Not open for further replies.

TomBarns

Programmer
Feb 14, 2001
10
US
Hi
I do not how to set my classpath to get that package?
please any help.
 
O.K. did you get the servlet tutorial thing from sun? Anyway, you need to extract the file to some place - doesn't really matter where - then set the classpath to point to it.

So you will open the dos window and use:

set CLASSPATH=C:\jdk1.3\Servlet\servlet.jar;



This path is just telling the compiler where to look for the class files - make sure you add the .jar.

If you haven't been there - have a look at this from java.sun.com:

but to run you need a JavaServer - and to add these import statements:
import javax.servlet.http.*;
import javax.servlet.*;
import java.io.PrintWriter;
import java.io.*;
I have not had any success geting my JavaServer to run, so I cannot test it, but atleast it compiles!
b2 - benbiddington@surf4nix.com
 
Sorry, in the the example above I have assumed you have placed servlet.jar and src.jar at the directory specified:

C:\jdk1.3\Servlet
So you can specify any location you like - I just like to keep em all in one place! bJ
b2 - benbiddington@surf4nix.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top