• 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

preserving session formbeans

 
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello
I am using a html:link to transfer directly to a global forward that is actually an action. The problem is I need a formbean member value that I know positively, and visually, is in the bean before I html:link forward="", but it is not there in the action. This action works correctly when I use it in the "preload" stage with the desired form bean member populated. After one iteration I again see that the desired form bean member is populated, but when come in from the html:link it is null. What struts tag can I use to preserve the full state of my session attributes and formbean and forward to an action? tia.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If the actions are configured with the same form bean the form should still be in the session. If your form has a reset() I'm not sure what the behavior would be.
 
Chris Pat
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi David
Thank you.
That is what I find so peculair. The formbean is the same throughout. On my "reenter" page, the one that has the html:link, I am using jstl to prove that the member of the formbean is there and has the values expected. Problem is when I click on the link and take it into the action it is null. This is struts1. The forward is a global forward that just points to the default context action *.do. I know how totally odd this is. Is there a way of getting the class of a formbean in a session to print out?
 
Chris Pat
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Sorry, move along, grin
I had set the scope to request and guess what that works. Reset it to session and all is well. Sorry for the intrusion of an unnecessary inscrutable.
 
Make yourself as serene as a flower, as a tree. And on wednesdays, as serene as this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic