Bug 47466 - Page session="false" directive ignored in include-prelude JSP
Summary: Page session="false" directive ignored in include-prelude JSP
Status: RESOLVED DUPLICATE of bug 47318
Alias: None
Product: Tomcat 6
Classification: Unclassified
Component: Jasper (show other bugs)
Version: 6.0.20
Hardware: Macintosh Mac OS X 10.4
: P2 normal (vote)
Target Milestone: default
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2009-07-02 04:01 UTC by Damien Papworth
Modified: 2009-07-02 05:02 UTC (History)
0 users

Example war consisting of the above web.xml and JSP files (2.37 KB, application/octet-stream)
2009-07-02 04:01 UTC, Damien Papworth

Note You need to log in before you can comment on or make changes to this bug.
Description Damien Papworth 2009-07-02 04:01:22 UTC
Created attachment 23920 [details]
Example war consisting of the above web.xml and JSP files

Page session directive appears to be ignored when specified in include-prelude declarations. For example, the following configuration should ensure that JSP pages do not create sessions. This works in 6.0.14, but not in 6.0.20 (I've not test 6.0.18 yet).

<?xml version="1.0"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"

<%@ page session="false" %>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  <title>Session Test</title>
<%  if (null != request.getSession(false)) {
      %>Session present<%
    } else {
      %>Session not present<%

I've attached a sample WAR file containing the above files. Under 6.0.20, the output will be 'Session present', whereas in 6.0.14 the output will be 'Session not present'.

Has the behaviour of preludes been intentionally changed in 6.0.20? I've not seen any specific in the change logs between versions.
Comment 1 Mark Thomas 2009-07-02 05:02:54 UTC

*** This bug has been marked as a duplicate of bug 47318 ***