• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

cannot access javax.servlet.http.HttpServletRequest HttpServletRequest.class not found

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am trying to write simple struts app. it has one jsp and one action class. when i am trying to compile the app with ant i am getting the fallowing error.
cannot access javax.servlet.http.HttpServletRequest file javax\servlet\http\HttpServletRequest.class not found

The project build path has servelt-api.jar from lib folder of tomcat . still getting the same error. any help would be greatly appreciated.

Thanks
 
Sheriff
Posts: 67645
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Revanth reddy wrote:The project build path has servelt-api.jar from lib folder of tomcat


If it did, you wouldn't be getting the error. Check again.
 
Revanth reddy
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply. i checked it again, but still getting the error. even i downloaded a servlet.jar and placed it to the class path and build path also. still having the same error...
 
Bear Bibeault
Sheriff
Posts: 67645
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's either the wrong jar or it's not in the classpath as you think. At this point you'll need to show the ant markup, so I'll move this to the Ant forum.

When posting code or markup, please be sure to use code tags.
 
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just ran into this when setting up a new project. I had the servlet-api-2.4.jar in my application's classpath, however I did not have it in my ant compile task's classpath so ant was not able to see it on a compile. Doh!
reply
    Bookmark Topic Watch Topic
  • New Topic