When using jakarta-taglibs-standard-1.1.2 in JSP pages where I first declare: <%@page session="false"%> I get an exception when using <x:set> The exception is: java.lang.IllegalStateException: Cannot access session scope in page that does not participate in any session at org.apache.jasper.runtime.PageContextImpl.doGetAttributeNamesInScope(PageContextImpl.java:501) at org.apache.jasper.runtime.PageContextImpl.getAttributeNamesInScope(PageContextImpl.java:487) at org.apache.taglibs.standard.tag.common.xml.XPathUtil.getVariableQNames(XPathUtil.java:100) at org.apache.taglibs.standard.tag.common.xml.XPathUtil.fillVarStack(XPathUtil.java:772) ... Looks like XPathUtil always assumes a session is available. My setup is briefly: jakarta-tomcat-5 web.xml starts: <?xml version="1.0" encoding="ISO-8859-1"?> <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"> .. and an example page that causes trouble: <%@ page session="false" %> <%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/core" %> <x:parse var="xml"> <test>blah</test> </x:parse> <x:set var="test" select="$xml"/>
Created attachment 16386 [details] Fix to XPathUtil.java that checks if a session is available before getting the attributes.
*** This bug has been marked as a duplicate of 35216 ***