To run JSP in Eclipse, you need a Server. In this tutorial we will see how to download and configure Apache tomcat server in Eclipse IDE.
Step 1: Download
Go to this link: http://tomcat.apache.org/download-80.cgi. If you are on Mac then click the zip file (first option under core). If you are on Windows then you have two options, 32 bit and 64 bit, depending on your operating system type click on the zip file, for example if you are on 64 bit windows then click on the 64-bit Windows zip.
In this tutorial, I’m downloading Apache tomcat version 8.0.44
Step 2: Extract the downloaded zip folder
Extract the zipped folder to any desired location.
Step 3: Select the Server in Eclipse IDE
Open Eclipse IDE ❯ Click on the Servers tab located at the bottom ❯ right click ❯ New ❯ click on Server
Select Apache and then select the appropriate version of tomcat server, for example, I’ve downloaded the tomcat version 8.0.44 so I’m selecting Tomcat v8.0 Server. After selecting, click next.
If you don’t see the apache option in the add server list that means you are missing few adapters in Eclipse, refer this tutorial to fix the issue: How to fix “no apache tomcat adapter in Eclipse” issue
You will be presented with a window as shown in the image below. Click browse and select the the folder that you have extracted from the zip file in Step 2.
That’s it you have successfully configured the tomcat server in Eclipse, you can now run the JSP in Eclipse.