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");