Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 53673 invoked by uid 500); 5 Jul 2001 13:16:27 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: tomcat-user@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 53666 invoked from network); 5 Jul 2001 13:16:26 -0000 Received: from cgey2.capgemini.se (HELO cormrw1.cgey.com) (193.234.247.51) by h31.sny.collab.net with SMTP; 5 Jul 2001 13:16:26 -0000 Received: from mailsweeper.capgemini.se (mailsweeper.capgemini.se [192.176.203.17]) by cormrw1.cgey.com (8.11.3/8.11.3) with ESMTP id f65DGav70210 for ; Thu, 5 Jul 2001 15:16:36 +0200 (CEST) (envelope-from tim.hughes@capgemini.no) Received: from master01.capgemini.se (unverified) by mailsweeper.capgemini.se (Content Technologies SMTPRS 4.2.1) with ESMTP id for ; Thu, 5 Jul 2001 15:06:45 +0200 Received: by master01.capgemini.se with Internet Mail Service (5.5.2653.19) id ; Thu, 5 Jul 2001 15:16:17 +0200 Message-ID: <086757ACB14DD211A2B900805FBB0B8D07A4FAE1@OSL01> From: "Hughes, Tim" To: "'tomcat-user@jakarta.apache.org'" Subject: RE: has anyone ever got the feature (defined in web. xml) to work? Date: Thu, 5 Jul 2001 15:16:14 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Hi, I have been playing around with this for a couple of hours now and it seems that the following is the case: If the error is generated by a servlet (response.sendError(int i)), then: -you can "catch" it with another servlet (i.e. with a servlet as error page) -but you cannot "catch" it with a simple html file. If the error is an HTTP error (e.g. you try to access a resource that doesn't exist: error code 404): -you cannot "catch it" at all: neither with a servlet or an html file. Does anyone have any evidence of this being false? It would be nice if it was. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tim Hughes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -----Original Message----- From: Randy Layman [mailto:randy.layman@aswethink.com] Sent: 5. juli 2001 14:03 To: tomcat-user@jakarta.apache.org Subject: RE: has anyone ever got the feature (defined in web. xml) to work? We have is successfully working for catching Java Exceptions. Haven't tried HTTP Error codes, though. Randy > -----Original Message----- > From: Hughes, Tim [mailto:tim.hughes@cgey.com] > Sent: Thursday, July 05, 2001 8:38 AM > To: 'tomcat-user@jakarta.apache.org' > Subject: RE: has anyone ever got the feature (defined in > web. xml) to work? >=20 >=20 >=20 > Hi, >=20 > We are trying to use the facility but without=20 > any success. Does > Tomcat implement this or not? > Has anyone seen it working? >=20 > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Tim Hughes > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >=20 >=20 >=20 > -----Original Message----- > From: guido.bartels@gerling.de [mailto:guido.bartels@gerling.de] > Sent: 4. juli 2001 17:27 > To: tomcat-user@jakarta.apache.org > Subject: AW: http errors >=20 >=20 > Hi Tim, > =20 > I tried the stuff you described, but had not success with it. > I placed the error-page item in both web.xml files, but=20 > nothing changed. > =20 > In addition I removed the from the web-app=20 > web.xml file and > placed that section into the default web.xml. > The result was, that the login-config seemed to be lost. > =20 > So what's wrong? I use Tomcat 3.2.2. > =20 > It seems to me, that Tomcat does not implement the specification! > =20 > Kind regards > Guido >=20 > -----Urspr=FCngliche Nachricht----- > Von: Hughes, Tim [mailto:tim.hughes@cgey.com] > Gesendet am: Mittwoch, 4. Juli 2001 09:39 > An: 'tomcat-user@jakarta.apache.org' > Betreff: RE: http errors >=20 > Hi, > =20 > You will find a full copy of the **default** web.xml in=20 > TOMCAT_HOME/conf/. > =20 > What is the default web.xml --> Extract from the user guide=20 > (which you will > find at TOMCAT_HOME\doc\uguide\tomcat_ug.html: recommended reading) > [A detailed description of web.xml and the web application structure > (including directory structure and configuration) is=20 > available in chapters > 9, 10 and 14 of the =20 > Servlet API > Spec and we are not going to write about it.=20 >=20 > There is however a small Tomcat related "feature" that is related to > web.xml. Tomcat lets the user define defaultw eb.xml values=20 > for all context > by putting a default web.xml file in the conf directory. When=20 > constructing a > new Context, Tomcat uses the default web.xml file as the base=20 > configuration > and the application specific web.xml (the one located in the=20 > application's > WEB-INF/web.xml), only overwrite these defaults.] >=20 > So if you want the error pages to apply to all webapps then=20 > you put the > error page tags in the default web.xml like this: >=20 > >=20 > =20 > PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" >=20 > "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"> >=20 > >=20 > > =20 > > javax.servlet.TryagainException > /errors/TryAgain.html > > =20 > > 503 >=20 > /errors/TryAgain.html > >=20 > >=20 > (I assume that you have renamed the directories and files accordingly: > errors directory and TryAgain.html file are only examples). >=20 > If you only want the error pages to apply to a particular=20 > webapp then you > should create a web.xml file that you place in > TOMCAT_HOME/webapps/yourWebApp/WEB-INF. This file should look=20 > like this: >=20 > =20 > PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" >=20 > "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"> >=20 > >=20 > > javax.servlet.TryagainException > /errors/TryAgain.html > > =20 > > 503 >=20 > /errors/TryAgain.html > >=20 > >=20 > I hope this works. >=20 > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=20 > Tim Hughes=20 > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=20 >=20 > -----Original Message----- > From: Francisco Areas Guimaraes [mailto:fareas@larc.usp.br] > Sent: 4. juli 2001 02:25 > To: tomcat-user@jakarta.apache.org > Subject: Re: http errors >=20 >=20 > it didn=B4t work...could you please give a "complete" web.xml? and where > should I put this file? in %TOMCAT_HOME%/conf or somewhere=20 > else? I=B4m using > tomcat 3.2.2 and win2k, I would like any help you could=20 > provide, because I > just started working with tomcat. > =20 > thanks, > =20 > Francisco > fareas@larc.usp.br =20 >=20 > ----- Original Message -----=20 > From: Hughes, Tim=20 > To: 'tomcat-user@jakarta.apache.org' > =20 > Sent: Tuesday, July 03, 2001 4:29 AM > Subject: RE: http errors >=20 > Hi, > =20 > Using elements in the web.xml, you can program=20 > web applications > to handle HTTP errors and exceptions. > =20 > The deployment description below makes the container send the > /errors/TryAgain.html file if either a TryAgainExeption or the > HttpServletResponse.SC_SERVER_UNAVAILABLE error code occurs: > =20 > > =20 > > =20 > > javax.servlet.TryagainException > /errors/TryAgain.html > > =20 > > 503 >=20 > /errors/TryAgain.html > > =20 > I hope this helps. >=20 > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=20 > Tim Hughes=20 > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=20 >=20 > -----Original Message----- > From: Francisco Areas Guimaraes [mailto:fareas@larc.usp.br] > Sent: 3. juli 2001 02:15 > To: Lista tomcat User > Subject: http errors >=20 >=20 > Anyone know if I can set tomcat to use a custom page for http=20 > errors, like > 500, instead of it=B4s default??? > =20 > please, help me, i=B4ve tried a lot of things and it didn=B4t help. > =20 > []=B4s > Francisco >=20 >=20 >=20 > This message contains information that may be privileged or=20 > confidential and > is the property of the Cap Gemini Ernst & Young Group. It is=20 > intended only > for the person to whom it is addressed. If you are not the intended > recipient, you are not authorized to read, print, retain,=20 > copy, disseminate, > distribute, or use this message or any part thereof. If you=20 > receive this > message in error, please notify the sender immediately and=20 > delete all copies > of this message. >=20 >=20 >=20 >=20 > This message contains information that may be privileged or=20 > confidential and > is the property of the Cap Gemini Ernst & Young Group. It is=20 > intended only > for the person to whom it is addressed. If you are not the intended > recipient, you are not authorized to read, print, retain,=20 > copy, disseminate, > distribute, or use this message or any part thereof. If you=20 > receive this > message in error, please notify the sender immediately and=20 > delete all copies > of this message. >=20 >=20 >=20 >=20 >=20 > -------------------------------------------------------------- > -------------- > ------- > This message is intended for the adressee or its=20 > representative only. Any > form of unauthorized use, publication, reproduction, copying=20 > or disclosure > of the content of this e-mail is not permitted. If you are=20 > not the intended > recipient of this e-mail message and its contents, please=20 > notify the sender > immediately and delete this message and all its attachments=20 > subsequently. >=20 >=20 >=20 > This message contains information that may be privileged or=20 > confidential and is the property of the Cap Gemini Ernst &=20 > Young Group. It is intended only for the person to whom it is=20 > addressed. If you are not the intended recipient, you are not=20 > authorized to read, print, retain, copy, disseminate,=20 > distribute, or use this message or any part thereof. If you=20 > receive this message in error, please notify the sender=20 > immediately and delete all copies of this message. >=20 This message contains information that may be privileged or confidential an= d is the property of the Cap Gemini Ernst & Young Group. It is intended onl= y for the person to whom it is addressed. If you are not the intended recip= ient, you are not authorized to read, print, retain, copy, disseminate, dis= tribute, or use this message or any part thereof. If you receive this messa= ge in error, please notify the sender immediately and delete all copies of = this message.