Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

cant create an HttpServletRequest object

 
KOla Oyedeji
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
KOla Oyedeji
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!