How to set session variables from JSP

set session variables using the command given below
session.setAttribute( "theName", "sanjeewa malalgoda" );
//session.setAttribute( "Attribute name", "Value" );

Get session variables using the command given below
<%= session.getAttribute( "theName" ) %>
//this may return null if there no such session variable

No comments:

Post a Comment

Empowering the Future of API Management: Unveiling the Journey of WSO2 API Platform for Kubernetes (APK) Project and the Anticipated Alpha Release

  Introduction In the ever-evolving realm of API management, our journey embarked on the APK project eight months ago, and now, with great a...