vendredi 29 mai 2015

Set session variable using JSTL and accessing it in servlet/controller class

If I set session variable using JSTL like this:

<c:set var="para" value="${CLIENT_LOGO}" scope="session"  />

Then how can I access the variable "para" in a servlet/controller class?

I tried the below code variations, but none worked.

request.getAtrribute("para") 


request.getSession().getAtrribute("para") 

Note: I'm not looking for a solution to print the value in a jsp something like:

<c:out value="${sessionScope.para}" />

But instead, I would like to know whether any solution possible to get it in Java class.

Aucun commentaire:

Enregistrer un commentaire