Questions tagged [session]

A session refers to the communication between a single client and a server. A session is specific to the user and for each user a new session is created to track all the requests from that user.

From Wikipedia:

A session is a semi-permanent interactive information interchange, also known as a dialogue, a conversation or a meeting, between two or more communicating devices, or between a computer and user (see Login session). A session is set up or established at a certain point in time, and torn down at a later point in time. An established communication session may involve more than one message in each direction. A session is typically, but not always, stateful, meaning that at least one of the communicating parts needs to save information about the session history in order to be able to communicate, as opposed to stateless communication, where the communication consists of independent requests with responses.

An established session is the basic requirement to perform a connection-oriented communication. A session also is the basic step to transmit in connectionless communication modes. However any unidirectional transmission does not define a session.

References:

44567 questions
9
votes
2 answers

Spring session handling: HttpSessionDestroyedEvent not received

I have a web app where in the web.xml I have added the HttpSessionEventPublisher as listener. The web app runs on Jetty 7.x and we are using Spring 3.1.1. This is supposed to fire HttpSessionCreatedEvent and HttpSessionDestroyedEvent to Spring…
Kai
  • 2,145
  • 1
  • 20
  • 35
9
votes
7 answers

php sessions to authenticate user on login form

I have the following code designed to begin a session and store username/password data, and if nothing is submitted, or no session data stored, redirect to a fail page. session_start(); if(isset($_POST['username']) || isset($_POST['password'])) { …
mrpatg
  • 10,001
  • 42
  • 110
  • 169
9
votes
1 answer

codeigniter like flashdata in core php

is there any way to create flash session data like in codeigniter, i want to create it in core php. I don't want to use GET method, passing variable with url makes problem in my application. so, how can i do this?
Kartik it
  • 393
  • 1
  • 5
  • 19
9
votes
4 answers

If session exist or not

I am trying to write my first app on Google App Engine, I was trying to maintain a session, I created a login page on submit, it call to a servlet, servlet validates the user and create a new session using the following code. void…
Muaz Usmani
  • 1,298
  • 6
  • 26
  • 48
9
votes
1 answer

Is it expensive to keep database connections open?

I was in a meeting with a few software developers, and was recommended to close database connections as soon as possible in my application code? Can somebody please tell me what is the harm of keeping a connection open in an application. I was…
TimeToCodeTheRoad
  • 7,032
  • 16
  • 57
  • 70
9
votes
4 answers

NHibernate session management?

Firstly, let me give a brief description of the scenario. I'm writing a simple game where pretty much all of the work is done on the server side with a thin client for players to access it. A player logs in or creates an account and can then…
IRBMe
  • 4,335
  • 1
  • 21
  • 22
9
votes
2 answers

Is there a downside to session.auto_start in PHP?

I usually end up adding session_start() to the top of every page on my PHP sites (or in a header file which is in turn included on every page). I recently discovered that you can have sessions start automatically by using the following setting in…
David Jones
  • 10,117
  • 28
  • 91
  • 139
9
votes
2 answers

session available in some rspec files and not others. how come?

In trying to test some sign-in/out functionality I want to delete some information from the session. I found out I couldn't access the sessions at all. I kept getting the error: undefined method `session' for nil:NilClass. But then to my surprise…
snowguy
  • 899
  • 2
  • 13
  • 23
9
votes
2 answers

What is the string format of the Asp.net SessionID?

I want to use the Session.SessionID as file name and query string in URL. I want to know if its format is suitable for these applications. For example you can not use '?' or '<' characters in a file name. Is SessionID format string safe for file…
Bob
  • 22,810
  • 38
  • 143
  • 225
9
votes
2 answers

JMS Connection Pooling or Session Pooling

I am confused between JMS Connection Pooling and JMS Session Pooling. I have a Java application which has approximately 20 threads processing messages being received from a vendor product. Each thread peforms some processing of the message before…
user1496620
  • 91
  • 1
  • 1
  • 2
9
votes
3 answers

How to access Magento user's session from outside Magento?

Im trying to access the Magento customer session in another part of my website. domain.com/shop/ <- Magento domain.com/test.php The shop itself works like a charm, however im trying to determine within test.php if a customer is logged in, so I can…
Martijn Heemels
  • 3,529
  • 5
  • 37
  • 38
9
votes
9 answers

PHP Session variable not getting set

In one page of our site, I have this code: $_SESSION['returnURL'] = "/store/checkout/onepage"; and further down, this button control:
9
votes
1 answer

How to retrieve session value from one servlet to another servlet?

In one servlet I have four variables. I want all those four variables to be retrieved to another servlet. I used the code in servlet 1 as follows. import javax.servlet.http.HttpSession; session.setAttribute("id",id); In the other servlet I tried…
Pratap M
  • 1,059
  • 3
  • 21
  • 31
9
votes
3 answers

How to properly kill sessions in zend framework?

This is how I set sessions $this -> sess = new Zend_Session_Namespace('user'); $this -> sess -> username = "Bob"; $this -> sess -> admin = "1"; And this is how I kill it setcookie("mycookiename",md5(rand(10,1200)),time() - (60 *…
Darius
  • 1,613
  • 5
  • 29
  • 58
9
votes
2 answers

Tomcat session-cluster: Is it production level? Does it scale?

I would like to know any experience with the Tomcat Session Cluster solution. Is it production level? Does it scale? Can I use it in a server farm? Do you recommend any other solution for a session cluster? (Ex: database, terracota, jgroups, etc.)
TraderJoeChicago
  • 6,205
  • 8
  • 50
  • 54
1 2 3
99
100