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

  • Home
  • SEARCH
  • 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 8735839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:09:50+00:00 2026-06-13T10:09:50+00:00

I have two controllers, say controllerA and controllerB. ControllerA has a consultation object that

  • 0

I have two controllers, say controllerA and controllerB. ControllerA has a consultation object that I need to send to a consultation jsp. I’m using return forward: consultation.
However, after I reach the jsp, I need the consultation object both for that jsp and to use in another controller, if the user presses a confirm button.

I tried @SessionAttributes and found it’s only available for the first controllerA. Then I tried using flashAttributes, but I wasn’t able to verify if the redirect worked as the form in the jsp needs to be blank the first time it loads and it threw an error: Expected session attribute ‘consultation’.

redirectAttrs.addFlashAttribute("AttributeName", value);
    return "redirect:consultation";

I ended up with using HttpSession as a workaround. So in this situation, is that the proper way to do this or did I just not set this up right?

  • 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-13T10:09:51+00:00Added an answer on June 13, 2026 at 10:09 am

    Apparently this is the correct way to do this in my case.

    I put the object in the session and when the user is on the jsp page, the controller is fired from a submit button. Then everything I need is in the session and I retrieve it.

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

Sidebar

Related Questions

I have a MainController, it creates an object(say polygon), a controller(say,polygonViewController). PolygonViewController has two
I have two view controllers that allow changes to the Address Book. The first
Currently using Xcode 4.2 and I have two view controllers (1 and 2). I
I have a partial view that is shared between two controllers and I'm trying
I have a list of, let's say, persons. Every person has a field that
I am having a problem with using session variables. I have two controllers named
Assuming I have a project that is: using UINavigationController that has the (a) main
So let's say I have two :has_and_belongs_to_many models that are joined by a simple
Using Rails v2.1, lets say you have an action for a controller that is
Say I have two view controllers: xVC and yVC. I have used the shake

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.