Servlets - SPLessons

Servlets Eclipse

Chapter 6

SPLessons 5 Steps, 3 Clicks
5 Steps - 3 Clicks

Servlets Eclipse

Servlets Eclipse

shape Description

Servlets Eclipse, Before developing a web project in any IDE, programmers should have a knowledge regarding the structure of the project like where the required files needs to be kept, such as JAVA , HTML , XML and how to compile the program and how to debug the program, for every project it is better to create a new work space because in future developer can easily identify the project location for the modifications. Following are the steps needs to be followed in MyEclipse while creating the project.

shape Step 1

Open Myeclipse -> File -> New -> open Web project.

shape Step 2

Enter Name of the project as shown in below figure.

shape Step 3

Click Finish button.

shape Step 4

Open the project.

shape Step 5

Create Html inside WebRoot.

shape Step 6

Name the HTML File.

shape Step 7

Create XML inside Web-INF.

shape Step 8

Give Name for XML File.

shape Step 9

Create Servlet inside src.

shape Step 10

Give the name of Servlet.

shape Step 11

Configure Tomcat as shown below, make sure to download latest version.

shape Step 12

Go to Application Server in Tomcat and choose TomcatVersion.

shape Step 13

First Enable and give the path to tomcat server. In tomcat temp directory, give the name as work.

shape Step 14

Next if clicked on tomcat then below JDK will be available. Click on JDK. A popup is opened. Then click on Add.

shape Step 15

Give the name as jvmnew and give the path to installed JDK. Click OK

shape Step 16

Below picture shows Tomcat server.


shape Key Points

  • Servlets Eclipse – While doing project on servlet take web project in an IDE.
  • Servlets Eclipse – WEB.XML file will be generated automatically while creating the project.
  • Servlets Eclipse – Java related files will be kept under java resources.