I have a list of names in session. I want to diplay them on jsp using JSTL EL.
in servlet i place the list in session.
and in jsp i did the following
I am getting an error message like this
Any ideas what is wrong with the code.
How to access the session attribute using JSTLEL
and i am accessing this messages variable in forEach. it is working fine now. but i am not sure why i get that illegastateexception message when i try to use sessionScope!
Is there a way to replace the above scriptlet with EL
[ June 08, 2007: Message edited by: Bear Bibeault ]
It might work well if you use like this. But when using sessionScope, it gonna give you session not found error.
Thanks to this link http://stackoverflow.com/questions/4730790/problem-with-session-attributes-in-jsp-el-using-spring-mvc
Bear Bibeault wrote:That error means:
jsp.error.page.noSession=Cannot access session scope in page that does not participate
in any session
For some reason, your page has no session. You need to figure out why. What declarations do you make for the page?