Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9264161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T13:45:25+00:00 2026-06-18T13:45:25+00:00

I am trying to create a RESTful web service that accepts JSON arguments and

  • 0

I am trying to create a RESTful web service that accepts JSON arguments and gives out a JSON response.

What I want is to accept HTTP requests made to my URL endpoint.
Something like,

POST /the/endpoint HTTP/1.1
Host: mywebsite.com

{“name”:”yourname”, “department”:”your_department”}

Do a DB read at the backend and give relevant parameters like, say Manager name, salary etc as a JSON object, as the response.

What’s the best way to go about it? I was thinking of using Java servlets for this? Is there a better way?

PS – I am just getting started so detailed answers or links to tutorials as to how to implement it would be much appreciated.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T13:45:27+00:00Added an answer on June 18, 2026 at 1:45 pm

    Yes you can easily do this with Servlets and some Json Libs for Marshalling /unmarshalling the Json Object to Java Object.

    You can make use of Json libs like
    Jackson ,
    Gson etc

    But you must know that REST application doesnt end with just handling the request and response , but it needs to take care of other non-functional requirements like

    • Authentication
    • Authorization
    • Security etc

    Building this from a scratch from a Servlet is overkill and waste of time when there are ready made frameworks that these things for you
    My favorite is Spring MVC 3.0

    Check their project site for more details

    Just to show you how easy to set up one in Spring MVC , check this below tutorial
    Spring 3 REST Tutorial

    Pls rate the post if it helps , Cheers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create RESTful Web Service which will return json or xml according
I'm trying to create a RESTful web service client on Google App Engine (Java)
I am trying to create a RESTful web service based on WCF Web API
I'm designing a RESTful web service utilizing ROA(Resource oriented architecture). I'm trying to work
We are trying to create a RESTful API that will be hosted on server
I'm trying to create a self documenting python web service. My Situation: I've got
Have a RESTful web-serice with Facade layer, Service layer and Dao layer. Trying to
I'm trying to use WCF 4 to set up a RESTful web service. I'd
I'm trying to understand RESTful Web Services page 274 section HTTP PUT . Issuing
Im trying to create my first WCF restful service. In VS2010 I open weddingservice.svc

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.