JSP Example on Eclipse



JSP Environment Setup :

In the first step we need to create the dynamic web project, Right click in the project explorer window and select the Dynamic Web Project

1_Create Dynamic Web Project

Now you need to select the runtime by clicking on the “New Runtime“.

2_Name Dynamic Web Project

Click on the Next Button

3_Step 3

Click on the Finish Button

4_Step 4
5_Step 5

Now create new jsp file - Right click on the webcontent and select jsp file.

6_Create new JSP File

Give appropriate name to the jsp file.

7_Naming new JSP File

Eclipse will add default jsp code in the JSP file.

8_Writing JSP File

Now in the server view of eclipse, Right click on the Tomcat Server and Run it on the server.

9_Starting Server

Now click on finish

10_Running JSP on Server

11_Select Tomcat

12_Select WorkSpace

13_Output of JSP