Bootstrap FreeKB - Java - Add an application server to Eclipse (Server Target Runtime)
Java - Add an application server to Eclipse (Server Target Runtime)

Updated:   |  Java articles

Application servers, such as Tomcat, WebSphere, and JBoss, can be added to Eclipse, so that you can run your Eclipse application in the Eclipse IDE, instead of having to export and deploy your project to an application server. This article assumes you've installed an application server, using one of the following methods.

 

To add an application server to Eclipse, select Window > Preferences > Server > Runtime Environments, and then Add the application server.

 

To add an application server to the Servers tab in Eclipse, select File > New > Other. Expand Server, select Server, and select Next.

 

Select the type of server and select Next, and enter the hostname of your server. 

 

Enter the path to the server. This assumes that the server is installed on the same machine as Eclipse. Select Finish.

 

 

Additional application servers can be added by right-clicking on Servers in the left panel and selecting New > Server.

Each application server that has been added to eclipse will be displayed under the Servers tab.

 

A new directory and files will be created under your eclipse-workspace/Servers directory. For example, if your eclipse-workspace/Servers directory is located at /home/john.doe/eclipse-worspace/Servers, and you add a server named Tomcat v8.0 Server, the follow directory and files will be created on the Eclipse server.

  • /home/john.doe/eclipse-workspace/Servers/Tomcat v8.0 Server/catalina.policy
  • /home/john.doe/eclipse-workspace/Servers/Tomcat v8.0 Server/catalina.properties
  • /home/john.doe/eclipse-workspace/Servers/Tomcat v8.0 Server/context.xml
  • /home/john.doe/eclipse-workspace/Servers/Tomcat v8.0 Server/server.xml
  • /home/john.doe/eclipse-workspace/Servers/Tomcat v8.0 Server/tomcat-users.xml
  • /home/john.doe/eclipse-workspace/Servers/Tomcat v8.0 Server/web.xml

 

Now when creating a Dynamic Web Project in Eclipse, there will an option in the Target runtime drop-down for the server you added.

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 5df700 in the box below so that we can be sure you are a human.