tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles So <charles...@mac.com>
Subject How to handle out-of-session error in JSP???
Date Sun, 27 Apr 2003 11:02:32 GMT
The entry point of a webapp I am writing is <webapp>/Index.jsp

I set the total number of sessions in the <webapp> 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; <html><body></body></html>


Here is the code I am trying in Index.jsp

<html>
<body bgcolor="white">


<!-- Forward to a servlet -->
<% if ( session != null ) { %>
    <jsp:forward page="/WelcomeServlet" />
<% } else {
	response.setContentType("text/html");
	RequestDispatcher dispatcher = 
getServletContext().getRequestDispatcher("/Sessions.html");
	dispatcher.forward(request, response);
}  %>

</html>


I also tried:

<html>
<body bgcolor="white">
<%@ page errorPage = "/Sessions.html" %>

<!-- Forward to a servlet -->
<jsp:forward page="/WelcomeServlet" />
</html>


thanks!
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message