Samanthi perera wrote:
when i run this jsp and submit it always prints old session ?
isNew() misleads many developers. isNew() will only return true if the server creates a session, but the client has not yet joined.
For example, turn off your cookies in your browser. Then run your application; it'll print "New Session" - Don't employ isNew to reliably check user authentication. Rely on user objects bound to sessions.
Samanthi perera wrote:I need to identify when first time loging user is a new one
and from second time onwords user is a old one
and i need to print new user or old user
can anyone change this example
Is this a homework assignment? We're here to help, not do your hw. Try this:
In your servlet: