First, create the server
Select File > New > Other>server from the menu to create the Server, as shown in.
Ii. creating dynamic Web Project Projects
1. menu Select File > New >other>web> Dynamic Web project, new project, project name Helloweb, other values default.
2. Set the Java Build Path of the project Helloweb
Mouse Right-click Project Helloweb>build path>configue build Path...>java build Path>libraries>add External JARs
Select the Servlet-api.jar in Apache-tomcat-8.0.9\lib
Iii. creating and running JSP files
1, right-click the project, New >other>web>jsp File, enter index.jsp, other values default.
2. Insert the following code in the <body></body> Center:
<% java.util.Date D =new java.util.Date ();%>
3. index.jsp file Right-click Run As>run on server to view the results of the run.
Iv. Creating and running a servlet file
1. Right-click the project, New >other>web>servlet,java package: Com.demo,class Name: Helloworldservlet
2. Add the following code to the Doget method:
Response.getwriter (). Write ("Hello, world!");
3. Run the servlet and look at the results after restarting the server
Developing a dynamic WEB project application with Eclipse