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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T06:54:39+00:00 2026-06-15T06:54:39+00:00

I have a problem with transferring an object (as a modelAttribute ) and its

  • 0

I have a problem with transferring an object (as a modelAttribute) and its values in a form between controllers. I have a form with modelAttribute, say "myObject", which has some members. I add a modelAttribute "myObject" to model in the first controller.

I am able to read and present values of "myObject" values in the view, for example, I can get values via ${myObject.memberName}, but when it comes to the second controller which takes as a parameter the object (I mean: modelAttribute("myObject") MyObject myObject) the members are set to default values, mainly null!

Some values are being set in the form (they work fine) and rest of them are being set in the first controller. I want to get values set in the first controller in the second one but they are lost.

How should I transfer the values of a modelAttribute object to not lost them between controllers? Should I place them in HttpRequest paratemers?

  • 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-15T06:54:40+00:00Added an answer on June 15, 2026 at 6:54 am

    HTTP is a stateless protocol. So you can expect that parameters are not going to hang around between requests.

    Should I place them in HttpRequest paratemers?

    Yes, if you want the values to be available to the controller which handles the next request you need to pass them as part of the request/post them in some form data.

    If you have data which you wish to make available to many requests you could consider putting the model in the HttpSession.

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

Sidebar

Related Questions

I have problem with show or hide form in Window Form Application. I start
I have problem SIMILAR to preventing form data reposting, but not quite the same
I have problem with TableView its empty. In (.h) file: @interface TableViewController : UITableViewController{
I have a problem transferring ascii files from a Windows 7 machine to a
I have a problem regarding running multiple threads executing a pipeline in Java. Say
I'm having some problems with deserializing an object. I have following classes: Metadatastore: [DataContract]
Say I have a collection of Users. Each user has a User_ID , Username
I'm transferring a project from Java to C++ and I have a problem with
I'm programming a server-client application and I have a problem when transferring to the
I have a problem which requires me to parse several log files from a

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.