File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes IDEs, Version Control and other tools and the fly likes trying to set up eclipse with tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "trying to set up eclipse with tomcat" Watch "trying to set up eclipse with tomcat" New topic

trying to set up eclipse with tomcat

Rick Harding

Joined: Mar 02, 2004
Posts: 18
I am trying to set up eclipse with tomcat on windows XP. I am following the tutorial here:

This is the page I get stuck on. I can get the hello world sample working, but I am really confused as to where I put what files and how this all works. There are several folders and I understand that general jsp files just go in the project directory. Since the tutorial is creating a class, should the file end in .class and be created in the web-inf/classes directory? If I create a class file in the project root will it compile the class into a .class file in the web-inf folder? I guess I am really confused how it works and what I should be doing in creating a project here.

Any tips and links to places that go into great depth of this is really appreciated. Sorry to sound so noobish, I have been working in PHP for the last three years and want to give JSP a try. I know a little java just from a beginner class in college.

Richard Bradford
Ranch Hand

Joined: Apr 20, 2004
Posts: 48
If you are using the Sysdeo plugin (I assume you are as its in the tutorial) then when viewing your project in java perspective in eclipse (Windows -> open perspective -> java) you will see a WEB-INF/src folder.
Create your classes (.java) files in here (right click folder -> new -> Class) The files will be automatically compiled and placed in the WEB-INF/classes folder.
Gerome Kawa
Ranch Hand

Joined: Dec 05, 2002
Posts: 61
Hi Rick
My suggestion is if you want to learn JSP/servlets don't use Eclipse now. Try to use notepad/textpad , create your own folder structure in explorer and run it. Once it is running try creating a project in eclipse and add the source folders in eclipse.
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

Moving this thread to the IDE forum.


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
Mark Wilcox

Joined: Sep 01, 2004
Posts: 6
All classes for servlets need to go into WEB-INF/classes

In Eclipse, if your go Properties for your project (right click on project name), go to Java Build properties, source tab.

Then change Default Output folder.
I agree. Here's the link:
subject: trying to set up eclipse with tomcat
It's not a secret anymore!