• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Eclipse Newbie Help!!!!

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I have installed Eclipse and Tomcat in my laptop. Everything is working fine. I'm trying to write my first Servlet. I have a project named "Tom1". As per the tutorial
html and jsp files go under Tom1
Java Sourcee files go below WEB-INF/src
Java class files go under WEB-INF/classes
Jar files go below WEB-INF/lib.
I created a Helloworld.jsp under Tom1 and it is good
Now I created a HelloWorld.java under WEB-INF/src and try to compile it but getting 6 errors for the HttpServlet not found.So it is not able to resolve the HttpServlet header.
I have given the Javabuildpath as Tom1/WEB-INF/src. But every time I creatre a new file in goes below Tom1/WEB-INF/src/defaultpackage !!!
Is this the reason Eclipse is not finding the HttpServlet Class ? Or any other problem ? Please explain. Thanks.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Palani,
Is j2ee.jar in the build path for your eclipse project? You can check this by right clicking the project, selecting properties and then selecting build path.
 
And then the entire population worshiped me like unto a god. Well, me and this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic