This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes Servlet + Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Reply Bookmark "Servlet + Eclipse" Watch "Servlet + Eclipse" New topic
Author

Servlet + Eclipse

Allen Bandela
Ranch Hand

Joined: Feb 16, 2006
Posts: 127

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


Life is like a day. If the day is of no use, neither a month or a year.
M Anderson
Greenhorn

Joined: Mar 17, 2006
Posts: 25
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!


Mike -- SCJP, SCWCD
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56216
    
  13

Moved to the IDEs forum.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6913
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.


A Convergent Visionary ~ Frank's Punchbarrel Blog ~ LinkedIn profile
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Servlet + Eclipse
 
Similar Threads
pivot table and chart
how to integrate eclipse and tomcat
To see compilation error..what I need to do ?
Corba - Eclipse
project build