-
Oct 7th, 2008, 03:57 PM
#1
Spring + Velocity + HttpSession
I'm trying to figure something out that has me very confused. I have an object called "client" in the session, and in my simpleFormController i add a different client to the model with the same name, however it still uses the object that was in the session what I access it in the template using $client.
CODE:
//in a different controller
String sessionClient = "sessionClient";
session.addAttribute("client" sessionClient);
//in my simple form controller
String thisClient = "thisClient"
model.put("client" thisClient);
// now in my velocity the following will display sessionClient
$client
I have tried to manually set exposeSessionAttributes to false, with no change in functionality. To actually see the object i added to the model, I first have to do session.remove("client") then it uses the object in the model.
why is my session data available in the view, and why is that taking precedence over the model data?
can anyone help me out?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules