• Post Reply Bookmark Topic Watch Topic
  • New Topic

Session Variable and JSTL

 
Saurabh Pillai
Ranch Hand
Posts: 526
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am accessing a session variable in JSP page using JSTL in following way.

Here I have hard coded the session variable name, i.e. 'user'. And I don't want to hard code it. Is there any other efficient workaround?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65522
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the scoped variable name is stored in another scoped variable, let's say xyz, then:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!