Announcement Announcement Module
Collapse
No announcement yet.
Spring + Velocity + HttpSession Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?
Working...
X