The JSP project is realized after closing the browser, as long as it is not closed, it is maintained online.

xiaoxiao2021-03-06  95

User login is used in a recent project in a project, of course, is to keep it using session. This is implemented with the Implements httpsessionBindingListener interface. This is the brief code I wrote. Public class onlineuser imports httpsessionBindingListener {private newuser = null; public onlineuser () {newuser = new newuser ();

Public Boolean Existuser (String Str) {Return False;}

public void valueBound (HttpSessionBindingEvent e) {String tempName = e.getName (); // Integer m = new Integer (tempName); newUser.setUserName (tempName); try {newUser.updateOnline ();} catch (Exception ex) { } System.out.println ("User" TempName "Up");

转载请注明原文地址:https://www.9cbs.com/read-95692.html

New Post(0)