I have created session variables since I want to transfer data from one JSP to another.
Each of my JSPs is a tab.
I transfer data given from the user from one JSP to another using the request body. I have <form>..><button type = "submit"/> </form> in the last JSP from where I submit the data and use it in a Java class.
When I try to access the session data from all the JSP pages, it returns a null value for all the data.
How should I transfer all the session data from all the JSPs to a Java class? Please note that each JSP is a tab, and I submit data from the last JSP.
Code:
<%
String joindate = request.getParameter( "joindate" );
session.setAttribute("joindate",joindate);
String birthdate = request.getParameter( "birthdate" );
session.setAttribute("birthdate",birthdate);
%>