We will perform the following steps to configure Tomcat in Eclipse:
- In the Java EE perspective of Eclipse, you will find the
Servers
tab at the bottom. Since no server is added yet, you will see a link in the tab as shown in the following screenshot—No servers are available. Click this link to create a new server...
.
Figure 2.1: The Servers tab in Eclipse JEE
- Click the link in the
Servers
tab to add a new server. - Expand the
Apache
group and select the Tomcat version that you have already installed. If Eclipse and the Tomcat server are on the same machine, then leaveServer's host name
aslocalhost
. Otherwise, enter hostname or IP address of the Tomcat server. ClickNext
:
Figure 2.2: Selecting a server in the New Server wizard
- Click the
Browse...
button and select the folder where Tomcat is installed.
- Click
Next
until you complete the wizard. At the end of it, you will see the Tomcat server added to theServers
view. If Tomcat is not already started, you will see the...