How to add a server to eclipse
Whenever you are working with web/enterprise applications, you need a server to run your applications. If this server is added to eclipse , it is very easy to run the application from eclipse itself.
Now, lets try to add
Apache Tomcat Server v7.0 to eclipse. For this download the server from here. This is a zip file. Extract it to the folder of your preferred choice.
Open eclipse. Select your workspace. Then select Windows -> Show View -> Other. Optionally you can use
Alt+shift+Q (release hands and then)
A new window
Show View opens. Select Server – Servers and click OK.
A new tab
Servers opens. Click the link to create a new server .
New Server opens. Select Apache Tomcat7.0 Server and click Next.
Choose the folder where you have extracted Tomcat Server(the directory before bin).
Click OK.You can also choose the second option to Download and Install the server from here directly.
Click Next and click Finish. Now the server is added to eclipse.
Start the Server
The next step is to start the server. Open the Server tab.
Select Tomcatv7.0 Server at localhost-> right click and select Start.
The server gets started. You can see the start up message in the Console.
How to change the port number of Tomcat?
Open the server tab. select Tomcatv7.0 Server at localhost-> and double click it. A new window opens now.
Currently the server is running in port number 8081.
Now, you can change the port number to any unused port like 8083/8084.