• 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

Servlet + Eclipse

 
Ranch Hand
Posts: 128
MS IE Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I am not sure if I should post this question , but I'm sure many people would have used Eclipse. How am I supposed to configure Eclipse to compile servlets. I tried to set the classpath environment variable to servlet.jar, but it does'nt work. I've been using Eclipse for core java programs so far. Please help. Thank you.
Allen
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Be sure to start a 'web' project. If you do, Eclispe will bring all the needed jars into your project and should have no problem compiling. You may need to download the Web Tools Project (WTP) first, if Eclipse isn't offering a 'web' project to you now.

Of course, you could just add the needed jars to the project's properties (Java Build Path). But the WTP is pretty cool in that it sets up your project folders for you like a J2EE Web App, and creates a web.xml for you, etc.

Hope this helps!
 
Sheriff
Posts: 67746
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
Moved to the IDEs forum.
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I compile servlets and web stuff all the time and I've never needed to create a "web" project or download any Eclipse extensions. What I have done, though, is to add the servlet.jar to the project classpath settings:

project / properties / java build path / libraries / add external JARs

Remember that Eclipse (like lots of other software these days) ignores the external classpath variable, and manages its own classpath sesttings for each project.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic