Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 36163 invoked from network); 27 Apr 2003 11:02:53 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 27 Apr 2003 11:02:53 -0000 Received: (qmail 14588 invoked by uid 97); 27 Apr 2003 11:04:51 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@nagoya.betaversion.org Received: (qmail 14581 invoked from network); 27 Apr 2003 11:04:50 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 27 Apr 2003 11:04:50 -0000 Received: (qmail 34694 invoked by uid 500); 27 Apr 2003 11:02:36 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 34678 invoked from network); 27 Apr 2003 11:02:36 -0000 Received: from imsm033.netvigator.com (218.102.23.103) by daedalus.apache.org with SMTP; 27 Apr 2003 11:02:36 -0000 Received: (qmail 8690 invoked from network); 27 Apr 2003 11:02:33 -0000 Received: from n218103215131.netvigator.com (HELO mac.com) (218.103.215.131) by imsm033.netvigator.com with SMTP; 27 Apr 2003 11:02:33 -0000 Date: Sun, 27 Apr 2003 19:02:32 +0800 Mime-Version: 1.0 (Apple Message framework v552) Content-Type: multipart/alternative; boundary=Apple-Mail-20-119708366 Subject: How to handle out-of-session error in JSP??? From: Charles So To: tomcat-user@jakarta.apache.org Message-Id: X-Mailer: Apple Mail (2.552) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N --Apple-Mail-20-119708366 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed The entry point of a webapp I am writing is /Index.jsp I set the total number of sessions in the to, say, 40. How can I present user with an HTML page if all the sessions are already used? (the next session is Session no. 41) Since Index.jsp can no longer instantiate a session such that it can do *something*... I am getting a blank page now; Here is the code I am trying in Index.jsp <% if ( session != null ) { %> <% } else { response.setContentType("text/html"); RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/Sessions.html"); dispatcher.forward(request, response); } %> I also tried: <%@ page errorPage = "/Sessions.html" %> thanks! --Apple-Mail-20-119708366--