session-variables

How to clean session attribute from all active session in java ?

Currently I am working on web project which uses JSP/Servlet and struts framework. We are using cache mechanism. I want to clean some of the session attribute from all the active sessions on particular event (For e.g. in case of refreshing cache). So what is best way to implement same ? ...

Loading the initial state on a silverlight application based on asp.net session

I'm writing a silverlight application that resembles a shopping cart system. This app can only be launched from the asp.net website after the user is logged in to the site. Upon first load, the app will send a request to the backend through WCF service to retreive all the existing items in the shopping cart. Therefore the silverlight a...

How can I determine the memory footprint of a session variable?

Also, web.config - please explain. <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="120"/> We are using inproc mode and we used the 20 session variable in our web application. We need to know each variables Occupyin...

Intercept the user credentials before they are sent off for verification

Our site requires the password be passed onto another page to auto log into vendor sites which are brought in via iframe. Since passwords are stored as a hash value in our site, the only way I can see being able to get the password from the page that needs it is to store it as a session variable, or pass it along on the querystring, whe...

How to have a form data-bound to an object with losing its values on postback

Hi I use ADO.NET Entity-Framework, I have a page that is data-bound to an entity variable in the code file. The hierarchy of the item is Person.Orders I want the user to add/remove orders to this Person entity (Person.Orders.Add(order)), The problem is that while the entity is not saved yet, once the user makes a post back, the variabl...

Rails: How can you access session variables using multiple controllers?

Hi, I am having a problem with using session variables. I have two controllers named 'graduate_students_controller' and 'current_students_controller'. Each of these controllers control different view files. I am using session variables with both these controllers to store session information. Here's the problem. Let's say I have two vie...

PHP HTTP_REFERRER - how to detect last page?

Hiya, I need to detect where the user has just clicked from - as my AJAX content needs to be displayed differently depending on the source page it is to be inserted into. If it's to go into about.php it needs to be data only, but if it's to go into about-main.php it needs to be the whole middle column so needs a header/footer wrapper...

If we are not allowed to use static variables in session beans, how to define a logger ?

Time and again, I read that we are not supposed to use static variables in a session bean. Then, how am I supposed to get a logger for this bean and use it all over the bean methods ? ...

IE7 Classic ASP Cache

I have a classic asp website that uses Session variables to store login state ie. userid, isloggedin, etc. On logout, the session variables are reset and Session.Abandon() is called followed by a redirect to the login page. In IE7 I have noticed that after logout I can type in a previously visited url and see what appears to be a cached ...

How can I check to see if the user is anonymous or logged in from javascript?

I would like to determine whether or not the user is logged in or if they're just anonymous from javascript... I found this question, but it's php code and I wasn't sure if there is a session variable called logged_in that gets stored on login or if that was just something that person had implemented himself. Anyone know how I can che...

Keep the Session[] variable after a new build

I wanted to know if it was possible to keep the Session variable thought builds in a ASP.NET + C#? I ask this because every time I make a minor change to my application and need to rebuild it, I need to login again and do a nunch of operation after that... it's taking a lot of my time. If there is no way around I can set up a testing m...

How to enable session variables in sharepoint?

Whenever I use session variables in webparts in sharepoint the page doesn't load and i get an error. I was adviced to enable them because they may be disabled. Any clue? ...

Saving data to session in JSF

Hi there, I am new to the world of J(2)EE and web app development but am quickly navigating my way around it and learning a lot. Every day is a fantastic voyage of new discovery for me. I am currently working on a project in which I am using Visual JSF Woodstock on Glassfish v2. I am pretty new to JSF also. There are times when I ne...

asp.net - C# Session variable being modified by reference?

It looks like the value in my session object changes when I modify a local variable set from session. Setup: .net 2.0 BasePage retrieves a complex object from session , casts it, and stores it in a class level variable. Child Page uses class level variable to do play out some optional scenarios. User decides to not keep changes, sess...

providing login check, page redirect in all pages in php

I am making a simple Dynamic Website using PHP, where i allow the user to login and then access specific pages. So here's what i have done so far. The logged in values are taken though $_POST variables in a php script where it fetches values from database for registered users. If the user is found i do the following session_register('...

ASP.NET MVC Unit Testing - Sessions

Having searched StackOverflow, and Google I think what I'm doing is suppose to be right, however results don't seem to be going well [TestMethod] public void LoginAction_Should_Return_View_and_User_Authenticated() { // Arrange var mock = new Mock<ControllerContext>(); var mockSession = new Mock<HttpSe...

Cache data in PHP SESSION, or query from db each time?

Is it "better" (more efficient, faster, more secure, etc) to (A) cache data that is used on every page load in the $_SESSION array (but still querying a table for a flag to reload the data fresh), or (B) to load it from the database each time? I'm using the cache method (A), but I'm worried that with hundreds of users, memory could beco...

Dynamic MySQL with local variables

How can I use dynamic SQL statements in MySQL database and without using session variables? Right now I have such a code (in MySQL stored procedure): (...) DECLARE TableName VARCHAR(32); SET @SelectedId = NULL; SET @s := CONCAT("SELECT Id INTO @SelectedId FROM ", TableName, " WHERE param=val LIMIT 1"); PREPARE stmt FROM @s; EXECUTE stm...

paypal returnurl is loggedin page

Hello, I have a question about using paypal on a page where the user is logged into It is with php How can you have the user still authorised for that page if paypal is redirecting back to that page. I read something about giving the session_id to the custom variable with PDT What about, if you have multiple session variables. Can y...

Are all session variables sent over HTTP?

I like the idea of a so called session-ID, which is sent to the browser and returned back for auth. But can I store more data in serverside session variables, for subsequent sessions to access? I'm using PHP. ...