0
votes

How to run the following Tutorial code in eclipse?

https://spring.io/guides/gs/rest-service/

The guide talks about a built in server, but what if I want to "Run on Server" so that it uses Tomcat 7 to run? I am running Kepler SR 2 J2EE.

2
Create a new Tomcat instance and run it on there.Sotirios Delimanolis

2 Answers

1
votes

The examples use STS which has a built in server.

For Eclipse, you'll want to create a Tomcat instance. Here are some simple steps to follow.

  1. Right click in your servers window and select New -> Server

    enter image description here

  2. Select Apache -> Tomcat7 -> Next

    enter image description here

  3. Browse to your Tomcat directory and select it -> OK

    enter image description here

  4. The next dialog you can add application. Click finish, and you should see your new Tomcat instance in the Servers window

    enter image description here

1
votes

It's not a web project, so you can't "run on server". There's a main() method though so you can "run as java application".