No comments yet

How to add a web server to eclipse

[Social9_Share type="horizontal"]

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) Q

view1
 

A new window Show View opens. Select Server – Servers and click OK.

view2
 

A new tab Servers opens. Click the link to create a new server .

view3
 

A window New Server opens. Select Apache Tomcat7.0 Server and click Next.

view4
 

Click Browse.

view5
 

Choose the folder where you have extracted Tomcat Server(the directory before bin).

view6
 

Click OK.You can also choose the second option to Download and Install the server from here directly.

view7
 

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.

view9
 

Select Tomcatv7.0 Server at localhost-> right click and select Start.

view10
 

The server gets started. You can see the start up message in the Console.

view11

 

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.

view12 

Currently the server is running in port number 8081.
Now, you can change the port number to any unused port like 8083/8084.

Thats all.
Happy Learning.

Post a comment