• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to get Session Value In different Requests

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Friends

At one time when I add my CompanyInformationBean by using modal.addAttribute() there I am able to get my values as I print those values . Again when I am trying to get those values of my CompanyInformationBean in another request mapping I got only null values.How I am able to get those values as I have to print those values in my Jsp page.

Here is my stack trace



Here is my controller class


Here is my spring-business-context.xml


Regards
Brajesh
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's a lot of code posted there, so I couldn't go through it all.

And not quite sure what you are looking for

But first I saw this

modal.addAttribute("companyInformationBean",companyInformationBean);
….
model.put("licenseInsuranceForm",new LicenseInsuranceBean());

In the first line you use addAttribute(), in the last line you just use put() Wouldn't you want to use the same one both times, maybe addAttribute()???

Also, do you want this in the model? Meaning the Response so it is available for rendering the jsp page? or do you want it in the HttpSession object? You can always pass in the HttpSession object to your controller method and then call a method to add an attribute in it. There is also @SessionAttribute which can be used to get stuff out of the HttpSession passed into your controller method.

But since I am not sure what you are trying to do, I just posted all possibilities I could think of.

Mark
 
reply
    Bookmark Topic Watch Topic
  • New Topic