This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori 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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 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: 63351


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]
It is sorta covered in the JavaRanch Style Guide.
subject: Front Man and commandContext.getSession
It's not a secret anymore!