This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one 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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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: 15299

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: 61082


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

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
subject: Front Man and commandContext.getSession