This week's book giveaways are in the Refactoring and Agile forums. We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line! See this thread and this one for details.
I had a problem with the session form. I wrote a controller which inherits SimpleFormController and set the sessionForm to true. When i sent the first request to the server, a session is created see the log message below: Setting form session attribute ..... and when i resend the request with some change in parameters i got to see the message Removing form session attribute ...... <command class> I think because of this i am getting NullPointerExceptions.
I dont know why its giving the message like this. can any body say why its being removed from the session. and how to overcome it.
posted 8 years ago
When you read the API for the getCommand method in AbstractFormController you can see the comment
Calls formBackingObject if not in session form mode. Else, retrieves the form object from the session. Note that the form object gets removed from the session, but it will be re-added when showing the form for resubmission.
Basically spring will remove it from the session and re-bind it to the session if needed