Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 63148 invoked from network); 5 Aug 2004 12:56:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 5 Aug 2004 12:56:45 -0000 Received: (qmail 16492 invoked by uid 500); 5 Aug 2004 12:56:15 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 16350 invoked by uid 500); 5 Aug 2004 12:56:13 -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 16336 invoked by uid 99); 5 Aug 2004 12:56:13 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [62.216.11.165] (HELO mail.topicus.nl) (62.216.11.165) by apache.org (qpsmtpd/0.27.1) with ESMTP; Thu, 05 Aug 2004 05:56:10 -0700 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: custom error pages X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 Date: Thu, 5 Aug 2004 14:56:08 +0200 Message-ID: <310D4AECF671CE43B79E0A979914850F1B4275@baas.topicus.nl> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: custom error pages Thread-Index: AcR6wTmA/NR/PFHoTG+9lMjn2IkMLwAJ53ogAAAwmuA= From: "Maurice Marrink" To: "Tomcat Users List" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi, Thanks for the reply. I think you might have misunderstood my second request. Tomcat allows you to define custom errorpages by specifying them in the conf/web.xml file as a default for all webapps (existing or nonexisting) What I would like to request is that these defaults are checked before sending the tomcat error. Imo this is not a hack, what I did with the listeners was a hack and I thought I made that clear. Maybe I need to clarify this a bit more. If I specify a custom errorpage in the /conf/web.xml it is this error (provided I used the right http error code) that gets shown whenever I go to a non existing webapp/url. What I would like is to have a stopped webapp behave in the same way. (at least for errorpages). Maurice Marrink -----Oorspronkelijk bericht----- Van: Shapira, Yoav [mailto:Yoav.Shapira@mpi.com]=20 Verzonden: donderdag 5 augustus 2004 14:37 Aan: Tomcat Users List Onderwerp: RE: custom error pages Hi, I'll save you time and tell you your 2nd request will not happen. A webapp is a webapp including its error pages. If it's off, it's off, including its error pages. We won't put in hacks like hard-coding a backup location for error pages. Yoav Shapira Millennium Research Informatics >-----Original Message----- >From: Maurice Marrink [mailto:maurice.marrink@topicus.nl] >Sent: Thursday, August 05, 2004 3:53 AM >To: tomcat-user@jakarta.apache.org >Subject: custom error pages > >Hi, > >I,m using tomcat 5.0.27 and am trying to show custom error pages. >I added a couple of errorpage tags to my webapps web.xml and the >/conf/web.xml in the tomcat installation dir. > > 500 > /error/error.html > >and after telling internet explorer not to use userfriendly errorpages it >shows the errorpages defined in my webapp when I try to access an >nonexisting url inside my webapps context (e.g. >/my_existing_webapp/does_not_exist.html) and shows the default errorpages >when I go to an url that does not exist at all (e.g. >/non_existing_webapp/whatever.html), that is after I copied my error files >into the ROOT context. >But I cant get it to work when my webapp is defined but not running. What I >did was this: >- start tomcat >- goto the manager webapp >- shutdown the webapp with custom errorpages >- enter a valid url for that webapp in the browser. > >Now I get the standard tomcat errorpage. >So I did a little debugging and found that when tomcat stops a webapp, it >preserves the context it just strips it from all but the name (well >almost). >So my custom defined errorpages are gone and because tomcat did find a >context it wont use the errorpages defined in the default web.xml (or root >context) but instead goes for the tomcat errorpage. > >I thought I could outsmart tomcat, so I made a little lifecylelistener and >container listener so I would get notified of the removal of my errorpages >and then put them back in. Even though that works, tomcat still shows its >own errorpages because further down the line it tries to get a >requestdispatcher from the context (which was stripped) to forward the >request for the errorpages. And there it fails offcourse. > >Now we get to the question(s) :) > >- does anyone know what else needs to be preserved in the context in order >to deliver a valid requestdispatcher (there is a lot that gets removed, and >its probably quicker to get an answer from you guys then painstakingly use >trial and error) >- or perhaps a better question could you guys (developers) make the next >(nightly) release so that it tries to get errorpages from the default >web.xml (root context) before showing the tomcat errorpage. Because its >more >then likely my little hack is going to break something if I get it to work. > >If no one can or bothers to answer the first question I can live with that, >I've surrendered :) but I would like to see the 2nd request/ feature to >happen. > >Thanks, > >Maurice Marrink > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org