Have you checked out org.springframework.web.util.WebUtils?
I've always had luck with it, pretty simple to use and has a nice feature:
WebUtils.setSessionAttribute(request, "recentOrders", recentOrders);
Which throws an IllegalStateException exception if it's not found, otherwise, it gets populated with the session parameter.
String userid = (String) WebUtils.getRequiredSessionAttribute(request, "userid");
Hope that helps,
"The Guide says that there is an art to flying," said Ford, "or rather a knack. The knack lies in learning how to throw yourself at the ground and miss."