Java – What do I need to create a RESTful API Server in Java

architecturejavarestweb-services

I would like to build my own RESTful API Server and I have no idea what I need for that.

I'll tell you a bit about the project:

On a Webservice (www.mysite.com/) users can register and manage their account and so on. But they also can use the RESTful API (mysite.com/api/…) and can do there pretty much the same via REST.

What is a good way to realize that? Do I need to use jetty or something similar?
Should I split web service and restful api ? what I a good architecture for that?

Thanks 🙂

Best Solution

You can use Spring controller for building a restful server. You can run it on tomcat or jetty doesn't matter.

Check this url : http://static.springsource.org/spring/docs/3.0.0.M3/spring-framework-reference/html/ch18s02.html