Question: I am trying to clear a session. Below is a little sample code I wrote to check with `SessionStatus`.

```
@Controller
@SessionAttributes(value={"sessAttr1","sessAttr2","sessAttr3"})
public class SessionController {    
@RequestMapping(value="index")
public ModelAndView populateSession(){      
    ModelAndView modelView = new ModelAndView("home");
    modelView.addObject("sessAttr1","This value is added in a session 1");
    modelView.addObject("sessAttr2","This value is added in a session 2");
    modelView.addObject("sessAttr3","This value is added in a session 3");
    return modelView;
}

@RequestMapping(value="home1")
public String populateHomeSession(SessionStatus status){
    status.setComplete();
    return "home1";
}
}

```

When `home1` screen is displayed, I can still see the session objects not getting cleared. If I try this: `${sessAttr1 }` then I can read the session values in `home1` screen.

Please clarify why is it not working.

**EDIT**

I an using `<a href="home1">Next</a>` to navigate from one screen to another. Does it have something to do with this isse I am facing?

Answer: 
you can use [invalidate()](http://docs.oracle.com/javaee/5/api/javax/servlet/http/HttpSession.html#invalidate%28%29)

```
@RequestMapping(value="home1")
public String populateHomeSession(HttpservletRequest request){

HttpSession session=request.getSession();
session.invalidate();

    return "home1";
}

```
status.setComplete(); remove sessionatribute after render.