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

Sign Up/ Sign In
Ask a Question

Copyright © 2018 CodesJava Protection Status SiteMap Reference: Java Wiki