Greg notes:
That wont work. The way the error code stuff works is that if the request throws an exception, the servlet container fetches the appropriate file and serves up the response including the contents of the file.
This bit in web.xml
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/error.html</location>
</error-page>
causes this type of response to be sent to the browser:
HTTP/1.1 500 java.lang.RuntimeException
Server: Apache-Coyote/1.1
ETag: W/"278-1209424220000"
Last-Modified: Mon, 28 Apr 2008 23:10:20 GMT
Content-Type: text/html
Content-Length: 278
Date: Thu, 05 Jun 2008 15:23:45 GMT
Connection: close
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
Something bad happened.
</body>
</html>[52.659103s]
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Thu, 05 Jun 2008 15:23:45 GMT
For this to work, the exception has to be thrown to the servlet container, and the servlet container fetches the resource and serves it up all in one motion.
The framework doesn't throw sessionExpired exceptions. The framework and bridge engage in a protocol to shut down the bridge instance and dipose of the views.
Greg notes:
That wont work. The way the error code stuff works is that if the request throws an exception, the servlet container fetches the appropriate file and serves up the response including the contents of the file.
This bit in web.xml
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/error.html</location>
</error-page>
causes this type of response to be sent to the browser:
HTTP/1.1 500 java.lang.RuntimeException
Server: Apache-Coyote/1.1
ETag: W/"278-1209424220000"
Last-Modified: Mon, 28 Apr 2008 23:10:20 GMT
Content-Type: text/html
Content-Length: 278
Date: Thu, 05 Jun 2008 15:23:45 GMT
Connection: close
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
Something bad happened.
</body>
</html>[52.659103s]
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Thu, 05 Jun 2008 15:23:45 GMT
For this to work, the exception has to be thrown to the servlet container, and the servlet container fetches the resource and serves it up all in one motion.
The framework doesn't throw sessionExpired exceptions. The framework and bridge engage in a protocol to shut down the bridge instance and dipose of the views.