This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Other Application Frameworks and the fly likes Front Man and commandContext.getSession Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Front Man and commandContext.getSession" Watch "Front Man and commandContext.getSession" New topic

Front Man and commandContext.getSession

Mike Heffelfinger

Joined: Jan 11, 2010
Posts: 13

The getSession method of Java's request object returns the associated HttpSession object, or creates a new one if one doesn't exist. Does Front Man's commandContext.getSession method create a new HttpSession object if one doesn't already exist?
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

I'm pretty sure that under the hood a call is being made to request.getSession(). So more than likely, yes.

GenRocket - Experts at Building Test Data
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63544


CommandContext.getSession() is a convenience method to prevent having to get the session as:

[Asking smart questions] [About Bear] [Books by Bear]
It is sorta covered in the JavaRanch Style Guide.
subject: Front Man and commandContext.getSession
jQuery in Action, 3rd edition