Re: [jetty-discuss] [Fwd: [JBoss-user] Jetty's javax.servlet.errorrequest attributes]
With the stand alone Jetty that is used in jboss 3.0.2b, I get different behaviour. In the jetty demo, I changed the 404 error page to dump/info which should end up being served by the dump servlet. A request to http://localhost:8080/jetty/x does end up being served from the dump servlet with: getMethod: GET getContentLength: -1 getContentType: null getRequestURI: /jetty/x getContextPath: /jetty getServletPath: /dump getPathInfo: /info ... Request Attributes javax.servlet.error.servlet_name: Default javax.servlet.error.request_uri: /jetty/x javax.servlet.error.status_code: 404 javax.servlet.error.message: /jetty/x Not Found So the status looks to be working OK. But the problem I did find is that if I make the error page a JSP - the new jasper2 is dieing with a array out of bounds error deep in it's bowels So I'll investigate that further. cheers Jules Gosnell wrote: forwarding you to Jetty-Discuss... Jules Yahoo! Groups Sponsor -~-- 4 DVDs Free +sp Join Now http://us.click.yahoo.com/pt6YBB/NXiEAA/MVfIAA/CefplB/TM -~- For the latest information about Jetty, please see http://jetty.mortbay.org To alter your subscription to this list goto http://groups.yahoo.com/group/jetty-discuss Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ Subject: [JBoss-user] Jetty's javax.servlet.error request attributes From: Alex Loubyansky [EMAIL PROTECTED] Date: Tue, 24 Sep 2002 16:01:34 +0300 To: JBoss-User [EMAIL PROTECTED] Should javax.servlet.error.status_code attribute contain a corresponding value in case of HTTP error? Is it mandatory by the spec? With Jetty that comes with current JBoss-3.2.0beta2 status_code is null for 404 (haven't tried others). But servlet_name has a value set in case of error. The attributes were tested in a filter after request was processed by a servlet. Could someone, please, explain how it works and how it supposed to work? Thank you very much. alex --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user -- Greg Wilkins[EMAIL PROTECTED] Phone/fax: +44 7092063462 Mort Bay Consulting Australia and UK. http://www.mortbay.com --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [jetty-discuss] [Fwd: [JBoss-user] Jetty's javax.servlet.errorrequest attributes]
Alex, In the current version of the spec - filters only get applied to requests as they enter the container - not after request dispatching and undefined for error pages. In JSR154 (the 2.4 version of the spec), I was able to push through some clarifications on the welcome page mechanism and also extend the new Filter definitions to error pages. In 2.4 you will be able to specify if a filter applies to an normal request, a forward, an include or an error page. But that does not help you now! As it is in 2.3 your filter will be applied to the original request, but not for the implicit forwarding to the error page. My only suggestion is to write an error servlet that collects all the details and then does a META redirect to a URL that encodes the details. The redirected request will pass through your filter and will be able to display the results of your filter. Not very nice I'm afraid! regards -- Greg Wilkins[EMAIL PROTECTED] Phone/fax: +44 7092063462 Mort Bay Consulting Australia and UK. http://www.mortbay.com --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [jetty-discuss] [Fwd: [JBoss-user] Jetty's javax.servlet.errorrequest attributes]
If you are using a filter, why not wrap the response object and implement sendError yourself. cheers Alex Loubyansky wrote: Thank you very much, Greg. I am hacking OSCache filter that caches content. The problem is not to cache error pages. I tried to check request attributes and javax.servlet.error.servlet_name is really set to 'action' and I could make use of it. But as I got you right, it's not the right way. Do someone have any suggestions? Thank you. alex Wednesday, September 25, 2002, 5:46:28 PM, you wrote: GW Alex, GW In the current version of the spec - filters only get applied GW to requests as they enter the container - not after request GW dispatching and undefined for error pages. GW In JSR154 (the 2.4 version of the spec), I was able to push GW through some clarifications on the welcome page mechanism and GW also extend the new Filter definitions to error pages. GW In 2.4 you will be able to specify if a filter applies to GW an normal request, a forward, an include or an error page. GW But that does not help you now! As it is in 2.3 your GW filter will be applied to the original request, but not GW for the implicit forwarding to the error page. GW My only suggestion is to write an error servlet that collects GW all the details and then does a META redirect to a URL that GW encodes the details. The redirected request will pass GW through your filter and will be able to display the results GW of your filter. Not very nice I'm afraid! GW regards -- Greg Wilkins[EMAIL PROTECTED] Phone/fax: +44 7092063462 Mort Bay Consulting Australia and UK. http://www.mortbay.com --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user