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 5842769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:03:42+00:00 2026-05-22T12:03:42+00:00

I have been reading a lot of tutorials about this, I have been able

  • 0

I have been reading a lot of tutorials about this, I have been able to use HttpClient to make a POST to spring and get the response back but it was just using a string being passed in. I would like to, for example, serialize an object such as Map <String, String> testMap = new HashMap <String, String> () and then pass this into a Spring controller, from a client. Then I would just like to, for simplicity’s sake, return this same object to the client from Spring. I don’t care if it uses HttpClient or something else, I just want to figure a way to make this work.

I have tried looking at different approaches but I can’t seem to piece it together. Could anyone point me towards a resource that outlines a simple way to do this. I would greatly appreciate any advice, 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-05-22T12:03:43+00:00Added an answer on May 22, 2026 at 12:03 pm

    I don’t think SpringMVC is really written with passing objects back and forth in mind. It is designed for serving up dynamic web content, not so much for communication with an intelligent client (a.k.a, not a web browser). There are other approaches such as JAX-RS and JAX-WS which are better at that.

    That being said, there could still be a way to do what you’re trying to do. If you’re trying to pass multiple fields from the client to the server you could use a form and an AbstractFormController.

    If you want to populate your view with multiple data objects from your model then you can look at the ModelAndView and the ModelMap.

    Also, your view could use JAXB or Jackson directly to serialize your data objects as XML/JSON and return it that way but then you’d be manually doing steps that are automated in other frameworks.

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

Sidebar

Related Questions

I have been reading a lot about how and why to use an MVC
I have been reading a lot about openFrameworks and Processing, But still can't make
I have been reading a lot about this - I feel like I'm very
i've been reading a lot and have been trying to get this done for
I have been reading a lot about C++ casting and I am starting to
Lately I have been reading a lot of blog topics about big sites(facebook, twitter,
I have been reading a lot about how flash development/design had died, and as
I have been reading a lot about Double Buffering as I am working on
I have been reading a lot about Ruby the past few days. Every SO
I have been reading a lot about MVC these days and I think I

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.