3

Is there any way to make all my JSPs not create sessions when using Jasper (Tomcat)? Apparently Jasper will create a session unless you specify not to:

<%@ page contentType="text/html;charset=UTF-8" language="java" session="false" %>

Is there way to do this for the entire webapp (session="false")?

Its seems you can't change:

org.apache.jasper.runtime.JspFactoryImpl.getPageContext

Which will create a session unless the JSP says session=false.

Adam Gent
  • 47,843
  • 23
  • 153
  • 203
  • I have the same situation here. Now im resorting to eclipse template for jsp that automatically includes the page directive with session="false". – Bertie May 03 '12 at 09:56

1 Answers1

1

This is container-specific; see this question.

Community
  • 1
  • 1
Haakon
  • 1,741
  • 10
  • 19
  • I gave up on this one. Ended up just writing a groovy script that checks for session="false" in my JSPX files. – Adam Gent Mar 04 '11 at 13:58