Difference between revisions of "Hello Web with Tomcat"

From Progzoo
Jump to: navigation, search
(New Runtime)
Line 28: Line 28:
 
[[Image:Eclipse_Specify_Tomcat_Folder.png|Where did you put tomcat?|thumb]]
 
[[Image:Eclipse_Specify_Tomcat_Folder.png|Where did you put tomcat?|thumb]]
 
*Specify the directory where you unzipped tomcat
 
*Specify the directory where you unzipped tomcat
 +
*Accept the defaults regarding perspective
 +
<br clear=all>
 +
==New Servlet==
 +
[[Image:Eclipse_New_Servlet.png|File New Servlet|thumb]]
 +
*You have a new project - now create a servlet
 +
*The servlet should have a capital letter
 +
*'''HelloWeb''' is fine

Revision as of 02:57, 16 November 2013

Complete Hello World in Eclipse before starting this.

Download Tomcat

Eclipse Tomcat Download.png
  • Unzip it to somewhere convenient
    • for example C:\
  • No need to install anything - Eclipse will take care of it
    • You just need to point Eclipse to the file location and it will take care of the installation
    • If you need to run tomcat outside Eclipse you will need to read some documentation


From Eclipse, start a new project

Eclipse New Project Dynamic Web.png
  • File / Project / Web / Dynamic Web Project


Run time environment

Eclipse New Dynamic.png
  • You need to specify the Project name and the Target runtime
  • Name your project HelloWeb
  • Click New Runtime


New Runtime

Make this match the downloaded version
  • Choose the runtime that matches the version you downloaded (7.0)
  • In the next step you specify the folder


Specify the folder

Where did you put tomcat?
  • Specify the directory where you unzipped tomcat
  • Accept the defaults regarding perspective


New Servlet

File New Servlet
  • You have a new project - now create a servlet
  • The servlet should have a capital letter
  • HelloWeb is fine