Is there only one way to get session in java calling request.getSession()?

Hi I like to know is there only one way to call session using request.getSession() or is there any other way?

Answers


The api shows two methods. Basically one creates the session for you if needed, and the other doesn't.

http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html#getSession%28%29

and

http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html#getSession%28boolean%29


Need Your Help

How to scale a CCLayer and keep its position?

cocos2d-iphone zoom scale cclayer

At the end of the game, I want to zoom out my CCLayer to show all the sprites. When I reduce the scale, the CCLayer become smaller and centered, what I want to know is how to scale the CCLayer and ...

Loading external javascript library with RequireJS

javascript backbone.js requirejs

I built a small javascript library I need to use inside a BackboneJS project.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.