How to create a session in Java

octubre 4th, 2010 Posted by java 0 thoughts on “How to create a session in Java”

To create a session attribute:

HttpSession sesion = req.getSession(true);
sesion.setAttribute(“allowed”, “YES”);

To get a session parameter:

HttpSession sesion = req.getSession(true);
String allowed = (String) sesion.getAttribute(“allowed”);

I’m trying to learn english, if you find some mistakes in my redaction, please make a comment with my error

Copyright © 2018 programadorfreelanceargentina.com

Programador Freelance Argentina