You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2009/07/02 13:01:23 UTC

DO NOT REPLY [Bug 47466] New: Page session="false" directive ignored in include-prelude JSP

https://issues.apache.org/bugzilla/show_bug.cgi?id=47466

           Summary: Page session="false" directive ignored in
                    include-prelude JSP
           Product: Tomcat 6
           Version: 6.0.20
          Platform: Macintosh
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Jasper
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: damien@taglab.com


Created an attachment (id=23920)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23920)
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).

/WEB-INF/web.xml:
<?xml version="1.0"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
         version="2.4">
  <jsp-config>
    <jsp-property-group>
      <url-pattern>*.jsp</url-pattern>
      <include-prelude>/WEB-INF/prelude.jsp</include-prelude>
    </jsp-property-group>
  </jsp-config>
</web-app>

/WEB-INF/prelude.jsp:
<%@ page session="false" %>

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

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.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 47466] Page session="false" directive ignored in include-prelude JSP

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47466


Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE




--- Comment #1 from Mark Thomas <ma...@apache.org>  2009-07-02 05:02:54 PST ---


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

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org