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.
Open Myeclipse -> File -> New -> open Web project.
Enter Name of the project as shown in below figure.
Click Finish button.
Open the project.
Create Html inside WebRoot.
Name the HTML File.
Create XML inside Web-INF.
Give Name for XML File.
Create Servlet inside src.
Give the name of Servlet.
Configure Tomcat as shown below, make sure to download latest version.
Go to Application Server in Tomcat and choose TomcatVersion.
First Enable and give the path to tomcat server. In tomcat temp directory, give the name as work.
Next if clicked on tomcat then below JDK will be available. Click on JDK. A popup is opened. Then click on Add.
Give the name as jvmnew and give the path to installed JDK. Click OK
Below picture shows Tomcat server.
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.