Running JSP in Tomcat

To run the JSP we created in the previous section in the web browser, you will need to deploy the application in a servlet container. We have already seen how to configure Tomcat in Eclipse. Make sure that Tomcat is running by checking its status in the Servers view of Eclipse:

Figure 2.15: Tomcat started in the Servers view

There are two ways to add a project to a configured server so that the application can be run on the server:

  1. Right-click on the server in the Servers view and select the Add and Remove option. Select your project from the list on the left (Available resources) and click Add to move it to the Configured ...

Get Java EE 8 Development with Eclipse now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.