Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 83841 invoked from network); 25 Jun 2006 12:50:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 Jun 2006 12:50:55 -0000 Received: (qmail 42273 invoked by uid 500); 25 Jun 2006 12:50:43 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 42241 invoked by uid 500); 25 Jun 2006 12:50:43 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 42230 invoked by uid 99); 25 Jun 2006 12:50:43 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 Jun 2006 05:50:43 -0700 X-ASF-Spam-Status: No, hits=1.9 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,MSGID_FROM_MTA_HEADER,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of mgainty@hotmail.com designates 65.54.174.77 as permitted sender) Received: from [65.54.174.77] (HELO hotmail.com) (65.54.174.77) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 Jun 2006 05:50:42 -0700 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sun, 25 Jun 2006 05:50:22 -0700 Message-ID: Received: from 71.232.6.177 by BAY103-DAV5.phx.gbl with DAV; Sun, 25 Jun 2006 12:50:17 +0000 X-Originating-IP: [71.232.6.177] X-Originating-Email: [mgainty@hotmail.com] X-Sender: mgainty@hotmail.com Reply-To: "Martin Gainty" From: "Martin Gainty" To: "Tomcat Users List" , References: <004801c69847$a46ec2a0$651ea8c0@prosperity> <449E842A.5040508@pidster.com> Subject: Re: JSPs forcing session ID to be created? Date: Sun, 25 Jun 2006 08:50:08 -0400 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-OriginalArrivalTime: 25 Jun 2006 12:50:22.0141 (UTC) FILETIME=[EBBE7ED0:01C69855] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N In your jsp <%@ page session="false"> Is this what you're looking for?? Martin -- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. ----- Original Message ----- From: "Pid" To: "Tomcat Users List" Sent: Sunday, June 25, 2006 8:40 AM Subject: Re: JSPs forcing session ID to be created? >I think Tomcat creates a session, unless you tell it otherwise. > > > http://wiki.jboss.org/wiki/Wiki.jsp?page=DisableSessionPersistence > > I repeat the popular refrain "Google is your friend." > > > > > > > Michael Rimov wrote: >> Environment: Tomcat 5.5.17 using http connector, Servlet API 2.4. >> >> Hi All, >> >> I'm not sure where to go from here, so I'm going to assume it's a >> Catalina >> issue and go from there. >> >> I was working on a front controller that wouldn't instantiate a session >> unless absolutely necessary - (for scalability reasons) -- To my >> dismay, >> I was seeing a session created anyway. >> >> After some debugging, I came across the source of my problem: >> >> The following JSP will generate a session token: >> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> >> >> >> Example >> >> >>

Sample Form

>> >> >> >> >> Here's the relevant stack trace. >> >> >> RequestFacade.getSession(boolean) line: 822 >> >> ApplicationHttpRequest(HttpServletRequestWrapper).getSession(boolean) >> line: >> 215 >> ApplicationHttpRequest.getSession(boolean) line: 544 >> ApplicationHttpRequest.getSession() line: 493 >> PageContextImpl._initialize(Servlet, ServletRequest, >> ServletResponse, String, boolean, int, boolean) line: 148 >> PageContextImpl.initialize(Servlet, ServletRequest, ServletResponse, >> String, boolean, int, boolean) line: 123 >> JspFactoryImpl.internalGetPageContext(Servlet, ServletRequest, >> ServletResponse, String, boolean, int, boolean) line: 104 >> JspFactoryImpl.getPageContext(Servlet, ServletRequest, >> ServletResponse, String, boolean, int, boolean) line: 61 >> Example.jsp line: not available >> Example_jsp(HttpJspBase).service(HttpServletRequest, >> HttpServletResponse) line: 97 >> Example_jsp(HttpServlet).service(ServletRequest, ServletResponse) >> line: 802 >> JspServletWrapper.service(HttpServletRequest, HttpServletResponse, >> boolean) line: 332 >> >> In this case, the boolean value for creating the session is true. >> >> >> I got some raw source code (older tomcat) and the _jspService looked like >> this: >> >> >> _jspxFactory = JspFactory.getDefaultFactory(); >> response.setContentType("text/html"); >> pageContext = _jspxFactory.getPageContext(this, request, response, >> null, true, 8192, true); >> _jspx_page_context = pageContext; >> application = pageContext.getServletContext(); >> config = pageContext.getServletConfig(); >> session = pageContext.getSession(); >> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> >> >> Is this really by design? Bug? Obviously, I'd rather not have a new >> session created until I need it. >> >> Is this situation submittable as a bug or am I misusing the library? >> >> Thanks in advance! >> >> -Mike >> >> >> >> >> >> --------------------------------------------------------------------- >> To start a new topic, e-mail: users@tomcat.apache.org >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >> For additional commands, e-mail: users-help@tomcat.apache.org >> >> >> > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org