• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

import javax.servlet.* error

 
Seema Ahuja
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am trying to work out the Beer Selection example given in head first book.
I have jdk1.5.0_01 installed and apache-tomcat-5.5.20 version of tomcat installed. I read some where that j2ee.jar file in the lib directory should be placed in the classpath.Having done that i sill get the " import javax.servlet.* package javax.servlet does not exist" error.
Also i noticed that in the my jdk folder i have a package named javax but inside that there was no package named servlet.

Please let me know as to where i am going wrong in this web app?
awaiting your response

Thanks
Seema
 
Kishore Balla
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess you need to add servlet-api.jar to your classpath..

Its path will be something like below

C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\servlet-api.jar
 
Seema Ahuja
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks!! That worked !!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic