Hi I am trying to create a class which has a reference to the request object, however in my class i can create a variable of type javax.servlet.http.HttpServletRequest even if i try to import the above class i get the following error: package javax.servlet.http does not exist i checked my class path and i have the following: ;E:\tomcat4118\common\lib\servlet.jar which is a valid path any suggestions? Thanks
Sam Dalton
Author
Ranch Hand
Joined: Jul 26, 2001
Posts: 170
posted
0
That looks like it should work to me. The servlet.jar must be in your CLASSPATH variable as you have it.... perhaps you could try to compile using teh classpath explicitly: javac -classpath E:\tomcat4118\common\lib\servlet.jar MyClass.java Cheers Sam
<a href="http://www.samjdalton.com" target="_blank" rel="nofollow">Sam Dalton</a>,<br />Co-author of [http://www.amazon.com/exec/obidos/tg/detail/-/1590592255/qid=1068633302//ref=sr_8_xs_ap_i0_xgl14/104-4904002-9274339?v=glance&s=books&n=507846]Professional JSP 2.0[/URL] (October 2003)<br />Co-author of <a href="http://www.amazon.com/exec/obidos/ASIN/1861007701/ref=ase_electricporkchop" target="_blank" rel="nofollow">Professional SCWCD Certification</a><br />Co-author of <a href="http://www.amazon.com/exec/obidos/ASIN/186100561X/ref=ase_electricporkchop" target="_blank" rel="nofollow">Professional Java Servlets 2.3</a>
KOla Oyedeji
Greenhorn
Joined: Aug 28, 2001
Posts: 20
posted
0
Hi I tried it again just now before trying your suggestion and it works. It would seem on windows 2000 that changes to the class path do not take effect immediatly perhaps i needed to reboot the pc or log on and then off. Is this normal? Anyway thanks