Easy learning with example program codes

How to set attribute in session object in servlet?

HttpSession interface’s setAttribute() method is used to set attribute in session object.
Syntax: public void setAttribute(String name,Object value);
Example: session.setAttribute(“attName”, “attValue”);
See more at: HttpSession in servlet.

Related topics

Please follow and like us:

Copyright © 2020 CodesJava Protection Status