rest - How to start with writing a RESTful service? -



rest - How to start with writing a RESTful service? -

i trying create restful web service accepts json arguments , gives out json response.

what want take http requests made url endpoint. like,

post /the/endpoint http/1.1 host: mywebsite.com

{"name":"yourname", "department":"your_department"}

do db read @ backend , give relevant parameters like, manager name, salary etc json object, response.

what's best way go it? thinking of using java servlets this? there improve way?

ps - getting started detailed answers or links tutorials how implement much appreciated.

thanks.

yes can servlets , json libs marshalling /unmarshalling json object java object.

you can create utilize of json libs jackson , gson etc

but must know rest application doesnt end handling request , response , needs take care of other non-functional requirements

authentication authorization security etc

building scratch servlet overkill , waste of time when there ready made frameworks these things favorite spring mvc 3.0

check project site more details

just show how easy set 1 in spring mvc , check below tutorial spring 3 rest tutorial

pls rate post if helps , cheers.

rest servlets

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -