Mantis - Resin
Viewing Issue Advanced Details
6289 minor always 10-02-19 10:45 10-03-19 16:48
nam  
ferg  
normal  
closed 4.0.62  
fixed  
none    
none 4.0.63  
0006289: sessions are not saved to persistent storage for jsp pages with c:import tag
(rep by alpor9)

Problem appears if there is <c:import> tag in the target page.

If page contains any such import, any session manipulations on that page will not be saved to persistent storage.

Because import request clears _isModified flag in SessionImpl#load() (see line 725 in SessionImpl.java for 4.0.48).

And then, the subsequent SessionImpl#save() method (after the main page request) sees nothing to save. And 4.0.62 has the same logic there.
Steps to reproduce:
1. view.jsp => see that attribute is null
2. save.jsp
3. view.jsp => see that attribute is "bar"
4. remove.jsp
5. view.jsp => see that attribute is null
6. restart resin
7. view.jsp => see that attribute is "bar"
8. remove_no_import.jsp
9. view.jsp => see that attribute is null
10 restart resin
11. view.jsp => see that attribute is null


save.jsp
======
<%

request.getSession().setAttribute("foo", "bar");

%>


view.jsp
======
<%

out.println("foo=" + request.getSession().getAttribute("foo"));

%>


remove.jsp
========
<%@ taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core' [^] %>
<c:import url="view.jsp">

<%

request.getSession().removeAttribute("foo");

%>


remove_no_import.jsp
================
<%

request.getSession().removeAttribute("foo");

%>

Notes
(0006917)
ferg   
10-03-19 16:27   
jsp/1cq0