• Post Reply Bookmark Topic Watch Topic
  • New Topic

Removing from session in JSP

 
Shailesh Narkhede
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to remove one string from session in jsp without using scriptlets.
string set in session with name as "error"
Is there any way to remove in JSP without any script.

Thanks in advance.
 
Nishan Patel
Ranch Hand
Posts: 689
Eclipse IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi,

I think using expression language sessionScope will help you.

 
Shailesh Narkhede
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By using sessionScope, we can get value from session but how to remove from session?
 
Nishan Patel
Ranch Hand
Posts: 689
Eclipse IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi,

Once you get value from session just give that session to null value will automatic remove from session.

 
Shailesh Narkhede
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Once you get value from session just give that session to null value will automatic remove from session.


how to give null value using EL?
 
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
<c:remove>
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!