I am a java beginner. This time, I will output about setAttribute / getAttribute. setAttribute() Store the value with a specific name as a marker with setAttribute getAttribute() Extract the value based on the name given by setAttribute
For example
①session.setAttribute("str","Qiita");
In the above case, the character string "Qiita" named str is stored in ** session **.
②request.setAttribute("language","Java");
In the above case, the string "Java" named language is stored in ** request **.
In case of ①
session.getAttribute("str");
Now you can get the string "Qiita".
Basically in java ** set ** is stored ** get ** is taken out I would like to think of it like this.
Recommended Posts