Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

trying to set up eclipse with tomcat

 
Rick Harding
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to set up eclipse with tomcat on windows XP. I am following the tutorial here:
http://javaboutique.internet.com/tutorials/three/index-6.html

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.

Thanks
 
Richard Bradford
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this thread to the IDE forum.

Mark
 
Mark Wilcox
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic