Session handling across the nodes and web server
Hi experts,
I am working in an AEM app which does following -
- User submits the data through AEM forms
- We collect the data in AEM form action jsp and make a string
- We store string in a session (HTTP session i.e. session.setAttribute )
- AEM redirects user to a thank you page
- We have a “Call to action” on thank you page
- On this call to action, we hit a backend JSP say”createfile.jsp” that reads the string from session variable and create a text file to download (session.getAttribute)
This works in single nodes (like author, publish etc), but when I am dealing with the web server it doesn’t. I am not able to collect the session data. I have 2 author, 2 pub nodes and 1 web server.
Here is the form action script
submiForm.jsp
<%
String str=request.getParameter("bnfname4");
request.getSession().setAttribute("data", str);
%>
Here is the createfile.jsp
<%
String txt=(String)request.getSession().getAttribute("data");
%>
Any idea??