session

How do you programatically end a session in asp.net?

Session.Abandon() doesn't seem to do anything. You would expect the Session_end event to fire when Session.Abandon() is called. ...

Multiple PHP Sessions

I am to build a PHP application for a website that already has another PHP application running on the same domain/server. My app will of course be using sessions, and I don't want my sessions to interfere with the existing app. For example if I want to use $_SESSION['username'], maybe the other app also uses $_SESSION['username'], which ...

JSP Redirect: Session Loss Issues

Having replaced a <jsp:forward page="URL"> with a response.sendRedirect("URL");, I find I know lose the session once the redirect occurs. Is there a way to preserve the session with a redirect, or to reconstitute the session cookie and send it along with the redirect? I know I could use JavaScript via window.location = "URL";, but that ...

Restore session after restart in JBoss

Can I somehow restore the session on JBoss after restart? I want to use it on my development machine. ...

adding items to an arraylist when a button in gridview is clicked.

I need to add the itemid from the list of rows when i click 'add to cart' button in the gridview, i was able to pass this itemid to a arraylist. but the problem is that everytime i click the button the previous itemid is overwritten with the new item instead i want the arraylist to expand. public partial class Drama_k : System.Web.UI.Pa...

How to keep user requests on the same server when using IIS NLB?

I have two IIS servers running using NLB. Unfortunatelly I cannot use shared session server, so every server is using its own session. How can I ensure, that all requests from the same user are forwarded to the same IIS server? ...

when the gridview is set to display values from session arraylist "array" the following error is shown "Object must implement IConvertible." in c#

when the user selects "add to cart" the itemID of that row item is added to arraylist which is then stored in a session. in the shopping cart page ive got a gridview which reads name, price from item db where session["array"]=itemID the error is displayed when the shopping cart page loads. all i want to do is to get the list of items ...

What is default session timeout in ASP.NET?

What is the default session timeout value in ASP.NET? ...

PHP Pass variable to next page

Hello, it seems pretty simple but I can't find a good way to do it. Say in the first page I create a variable $myVariable = "Some text"; And the form's action for that page is "Page2.php". So in Page2.php, how can I have access to that variable? I know I can do it with sessions but I think it's too much for a simple string, and I do ...

Using session data to find out who's online

I want to be able to find out who is logged into my web app and be able to print out a list of logged on users. I also want to be able to print out who is viewing a certain section of a the app (for example the chatroom, so I can print out the chat users). At the moment, I just have: session[:role_id] = @role_id when someone logs in...

Logout code in JSP

I am using basic level authentication and I need best logout code in JSP/Servlet. I am using JSP & servlet and MS-Access as backend. Is it required to create session in JSP? ...

PHP Session not working in PHP5

I have 2 pages: login.php and index.php. Both pages start with session_start(); When I set $_SESSION['user'] = "name"; in login.php and than open index.php, my session object is empty. How come? EDIT: I found the problem: IE 7. I had to grand access to my domain. However, I thought a session is stored on the server, instead of ...

How can I pull objects out of hibernate and into memory. I'm hitting session problems.

Hi, I have a rather enormous project in which I'm trying to retrofit in-memory data. Essentially, I have a big collection of objects which contain primitives and other objects which exist in hibernate. Large sections of non-dao code rely on lazy-loading through hibernate to hydrate objects on the fly. However, since everything exists in ...

asp.net session state

Hi, During Session Start, one has access to the Request object. How about Session End, does it still have access to the Request object ? For example I want to count how many browsers are currently connected to my application. Edit 1 : If Session End doesn't have access to Request Object, what info does it have access to ? Session ID...

What happens if I forget to mark the Spring SessionStatus as "Complete"?

In Spring MVC, suppose I define a SessionAttribute, using the @SessionAttribute tag like so: @SessionAttributes(value = "myModel") public class MyController{ ... } Suppose that I forget to call status.setComplete() on the SessionStatus like so: @RequestMapping(method = RequestMethod.POST) public void doSomething(@ModelAttribute("m...

Is there an easy way to monitor sessions in a tomcat web application?

I'm working on a web application using Spring MVC 2.5. I'm using Eclipse as my IDE and deploying to Tomcat 6. I'm concerned that I don't understand how sessions work in Spring, and was wondering how I might go about monitoring session status. I know that Tomcat has various monitoring capabilities, and I can even turn them on in Eclips...

How to synchronize lifetime of forms authentication cookie and Asp.Net Session?

I am building an Asp.Net web site that uses FormsAuthentication and standard Session mechanism with configuration like that: <authentication mode="Forms"> <forms cookieless="UseCookies" name=".MyAppAuth" loginUrl="~\Login.aspx" timeout="20"/> </authentication> ... <sessionState timeout="20" cookieless="UseCookies" /> It seems that...

ServerSide Sessions safe?

I'm using (server side, not cookie) sessions in an application that I writing, if the users has not obtained access to the server can I trust the $_SESSION variable or should I verify it's content on every page load? Note: I'm trying to limit the number of queries to my database and currently I am verifying the data on every page load,...

How to detect if the user is logout in php?

After the user successfully logged in, I store login = true in database. But how do I check if the user logged out by close the browser without click the logout button? And somemore, how do I redirect user who has been inactive for 10 minutes to login page? I am using php and mysql. Any help would be appreciated. EDIT: Sorry if my ques...

Is my method of auto-redirect-login page correct in PHP?

I have a community site where a user can have many friends. When displaying all of his friends, I want to include whether his friend is online or offline. My method is, when user logs in, create a session and update the users table, on status column "online". If he click the logout button, then i will set the status to "offline". Wha...