Re: Configuring Tomcat 4.1.18 to handle 401 http errors
Hi Yoav, if I add this to the deployment description the my401ProcessingServlet would be called after an error-code 401 occured. But as this servlet is part of the container, too, it won't be able to send the same error 401 to the client - the container would catch this error and call my401ProcessingServlet again and again. And this error is necessary because only then the browser knows that he has to repeat the authentication. (What we *want* to do is to send the 401 error back to the client so that the browser is forced to repeat the authentication (popping up the login window) to allow the user to change his actual login. The joke is, that this actually worked under Tomcat 3.2 and with the former Servlet API 2.2, but not under Tomcat 4.1.18 and the Servlet API 2.3.). In other words: it seems that I can *not* do whatever I want under the new Servlet API 2.3, because the new tomcat engine masks all errors = 400 to a self-constructed html-page. Only during the authentication-phase of the realm the errors like 401 are send to the client normally. I still hope that there is a standard-conform way for servlets to force the container to send http errors to the client - or at least to inform the authentication realm that the current authentication should be invalidated and repeated (without automatically accepting the already used authentication data). Oliver Schönwald FernUniversität Hagen - LVU Entwicklungsgruppe University Hagen - Education and Knowledge Space: Virtual University, Development Task Force Shapira, Yoav wrote: Howdy, How about adding this to your web.xml: error-page error-code401/error-code location/my401ProcessingServlet/location /error-page Then do whatever you want in the servlet you map to the /my401ProcessingServlet url-pattern. Yoav Shapira Millennium ChemInformatics -Original Message- From: Oliver Schoenwald [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 4:18 AM To: Tomcat Users List Subject: Configuring Tomcat 4.1.18 to handle 401 http errors Good morning! some days ago I already asked a question regarding this context, but I had some time to dive a bit into the Servlet API 2.3 Specification. So far, it seems that the specification states that the container, not the servlet, is the layer attached to the client. And the container, not the servlet, controls, which and how any http errors created by a servlet within the container are handled, mapped and sent back to the client. Some digging in the catalina source code retrieved that in HttpResponseBase.java there is a method finishResponse where the handling of every HTTP error = 400 is hard-coded to be transformed into a simple, valid html-page with a plainly written error summary. However, we need the http error 401 to be send 'as is' to the client. It doesn't have to be directly, but the container should not catch this error and create an html page out of it. Does someone know how I can achieve this? Or has the Servlet API changed the communication protocol so far that this is just no longer possible without violating the standard? In that case, how SHOULD a servlet invalidate the current authentication so that the currently buffered authentication data (buffered by the client/browser) are no longer accepted and the browser is forced to ask the user again for authentication? Thank you in advance, Oliver Schönwald - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Oliver Schönwald, Diplom-Informatiker Entwicklungsgruppe Lernraum Virtuelle Universität - FernUniversität Hagen Universitätsstr.21/AVZ - 58084 Hagen Fon: +49 2331 987 1721 - Fax: +49 2331 987 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Configuring Tomcat 4.1.18 to handle 401 http errors
Good morning! some days ago I already asked a question regarding this context, but I had some time to dive a bit into the Servlet API 2.3 Specification. So far, it seems that the specification states that the container, not the servlet, is the layer attached to the client. And the container, not the servlet, controls, which and how any http errors created by a servlet within the container are handled, mapped and sent back to the client. Some digging in the catalina source code retrieved that in HttpResponseBase.java there is a method finishResponse where the handling of every HTTP error = 400 is hard-coded to be transformed into a simple, valid html-page with a plainly written error summary. However, we need the http error 401 to be send 'as is' to the client. It doesn't have to be directly, but the container should not catch this error and create an html page out of it. Does someone know how I can achieve this? Or has the Servlet API changed the communication protocol so far that this is just no longer possible without violating the standard? In that case, how SHOULD a servlet invalidate the current authentication so that the currently buffered authentication data (buffered by the client/browser) are no longer accepted and the browser is forced to ask the user again for authentication? Thank you in advance, Oliver Schönwald - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Configuring Tomcat 4.1.18 to handle 401 http errors
Howdy, How about adding this to your web.xml: error-page error-code401/error-code location/my401ProcessingServlet/location /error-page Then do whatever you want in the servlet you map to the /my401ProcessingServlet url-pattern. Yoav Shapira Millennium ChemInformatics -Original Message- From: Oliver Schoenwald [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 4:18 AM To: Tomcat Users List Subject: Configuring Tomcat 4.1.18 to handle 401 http errors Good morning! some days ago I already asked a question regarding this context, but I had some time to dive a bit into the Servlet API 2.3 Specification. So far, it seems that the specification states that the container, not the servlet, is the layer attached to the client. And the container, not the servlet, controls, which and how any http errors created by a servlet within the container are handled, mapped and sent back to the client. Some digging in the catalina source code retrieved that in HttpResponseBase.java there is a method finishResponse where the handling of every HTTP error = 400 is hard-coded to be transformed into a simple, valid html-page with a plainly written error summary. However, we need the http error 401 to be send 'as is' to the client. It doesn't have to be directly, but the container should not catch this error and create an html page out of it. Does someone know how I can achieve this? Or has the Servlet API changed the communication protocol so far that this is just no longer possible without violating the standard? In that case, how SHOULD a servlet invalidate the current authentication so that the currently buffered authentication data (buffered by the client/browser) are no longer accepted and the browser is forced to ask the user again for authentication? Thank you in advance, Oliver Schönwald - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 4.1.18: How to send HTTP errors from servlets
Hello! response.sendError with SC_UNAOTHORIZED is exactly the command I used successfully before switching to Tomcat 4.1.18. And no, we don't have a custom error-page in the web.xml-file. At least not in the web.xml-file which we created for our Web Application. I don't know if there might be something like that in the web.xml in the conf-directory of tomcat itself. As I will be on vacation for the next 5 days, I will bring up the subject after returning from that again. However, I will look for such a custom error page definition. Maybe there is one as system-wide default. Thank you, Oliver Shapira, Yoav wrote: Howdy, Umm, assuming you don't have a custom error-page for 401 errors in your web.xml (though you could and in your case might find it useful), did you try response.sendError(SC_UNAUTHORIZED, Please login); ? Yoav Shapira Millennium ChemInformatics -Original Message- From: Oliver Schoenwald [mailto:[EMAIL PROTECTED]] Sent: Friday, February 14, 2003 5:31 AM To: Tomcat Users List Subject: Tomcat 4.1.18: How to send HTTP errors from servlets Hello, we have updated from Tomcat 3.2.4 to 4.1.8 and now have problems with one of our servlets. Under 3.2.4, this servlet send an HTTP_UNAUTHORIZED under certain circumstances and the Browser popped up his Login-Windows. Now, under 4.1.8, the engine catches this error and wraps an html-page around it, delivering a valid html-page instead of the HTTP-error created by the servlet using the sendError-Method of HttpServlet.Response. So far I was not able to find out by what configuration or mechanism the engine catches such errors and wraps its own html-output around it. We installed the engine as binary under Linux and added our own authentication Realm and a Valve to do some after-work-cleansing. Can I de-activate it ('it' = the wrapping of http-error responses as html-pages)? How? Would this be ok or bad? Can I configure it to allow errors send by the servlet to be given straight to the client? How? Do I have to use another method to deliver HTTP-errors instead of the standard servlet API? Thank you in advance, Oliver Schönwald -- Oliver Schönwald, Diplom-Informatiker Entwicklungsgruppe Lernraum Virtuelle Universität - FernUniversität Hagen Universitätsstr.21/AVZ - 58084 Hagen Fon: +49 2331 987 1721 - Fax: +49 2331 987 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Oliver Schönwald, Diplom-Informatiker FernUniversität Hagen Lehrstuhl Praktische Informatik I Feithstr.142 - 58084 Hagen Telefon: +49 2331 987 2972 - Telefax: +49 2331 987 314 EMail: [EMAIL PROTECTED] WWW: http://www.oliver-schoenwald.de -- PGP Fingerprint: 0654 AAC3 4258 F7CE 4A21 BB1B 757F 1D74 D17E FEC2 PGP Public Key: http://www.oliver-schoenwald.de/pubkey.pgp -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 4.1.18: How to send HTTP errors from servlets
Hello, we have updated from Tomcat 3.2.4 to 4.1.8 and now have problems with one of our servlets. Under 3.2.4, this servlet send an HTTP_UNAUTHORIZED under certain circumstances and the Browser popped up his Login-Windows. Now, under 4.1.8, the engine catches this error and wraps an html-page around it, delivering a valid html-page instead of the HTTP-error created by the servlet using the sendError-Method of HttpServlet.Response. So far I was not able to find out by what configuration or mechanism the engine catches such errors and wraps its own html-output around it. We installed the engine as binary under Linux and added our own authentication Realm and a Valve to do some after-work-cleansing. Can I de-activate it ('it' = the wrapping of http-error responses as html-pages)? How? Would this be ok or bad? Can I configure it to allow errors send by the servlet to be given straight to the client? How? Do I have to use another method to deliver HTTP-errors instead of the standard servlet API? Thank you in advance, Oliver Schönwald -- Oliver Schönwald, Diplom-Informatiker Entwicklungsgruppe Lernraum Virtuelle Universität - FernUniversität Hagen Universitätsstr.21/AVZ - 58084 Hagen Fon: +49 2331 987 1721 - Fax: +49 2331 987 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 4.1.18: How to send HTTP errors from servlets
Howdy, Umm, assuming you don't have a custom error-page for 401 errors in your web.xml (though you could and in your case might find it useful), did you try response.sendError(SC_UNAUTHORIZED, Please login); ? Yoav Shapira Millennium ChemInformatics -Original Message- From: Oliver Schoenwald [mailto:[EMAIL PROTECTED]] Sent: Friday, February 14, 2003 5:31 AM To: Tomcat Users List Subject: Tomcat 4.1.18: How to send HTTP errors from servlets Hello, we have updated from Tomcat 3.2.4 to 4.1.8 and now have problems with one of our servlets. Under 3.2.4, this servlet send an HTTP_UNAUTHORIZED under certain circumstances and the Browser popped up his Login-Windows. Now, under 4.1.8, the engine catches this error and wraps an html-page around it, delivering a valid html-page instead of the HTTP-error created by the servlet using the sendError-Method of HttpServlet.Response. So far I was not able to find out by what configuration or mechanism the engine catches such errors and wraps its own html-output around it. We installed the engine as binary under Linux and added our own authentication Realm and a Valve to do some after-work-cleansing. Can I de-activate it ('it' = the wrapping of http-error responses as html-pages)? How? Would this be ok or bad? Can I configure it to allow errors send by the servlet to be given straight to the client? How? Do I have to use another method to deliver HTTP-errors instead of the standard servlet API? Thank you in advance, Oliver Schönwald -- Oliver Schönwald, Diplom-Informatiker Entwicklungsgruppe Lernraum Virtuelle Universität - FernUniversität Hagen Universitätsstr.21/AVZ - 58084 Hagen Fon: +49 2331 987 1721 - Fax: +49 2331 987 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Trapping connector HTTP errors in Apache
Hi, Anyone knows how to configure Apache to trap HTTP responses/errors, etc, HTTP 500, HTTP 404 that were returned via connectors like webapp and jk? Any info is greatly appreciated. Thanks. Rgds
Re: http errors
I tried what you said, put the error-page in the web.xml in the WEB-INF inside my app(webapps/test/WEB-INF) and in the web.xml in the conf directory( tomcat/conf). I´m using tomcat 3.2.1 and win2000, i tried in tomcat 3.3 and it didn´t workout either, what could be wrong? - Original Message - From: Hughes, Tim To: '[EMAIL PROTECTED]' Sent: Wednesday, July 04, 2001 4:39 AM Subject: RE: http errors Hi, You will find a full copy of the **default** web.xml in TOMCAT_HOME/conf/. What is the default web.xml -- Extract from the user guide (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 available in chapters 9, 10 and 14 of the Servlet API Spec and we are not going to write about it. There is however a small Tomcat related "feature" that is related to web.xml. Tomcat lets the user define defaultw eb.xml values for all context by putting a default web.xml file in the conf directory. When constructing a new Context, Tomcat uses the default web.xml file as the base configuration and the application specific web.xml (the one located in the application's WEB-INF/web.xml), only overwrite these defaults.] So if you want the error pages to apply to all webapps then you put the error page tags in the default web.xml like this: ?xml version="1.0" encoding="ISO-8859-1"? !DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd" web-app !--IMPORTANT: all the tags that were already in the default web.xmlfile should remain in the file-- error-page exception-typejavax.servlet.TryagainException/exception-type location/errors/TryAgain.html/location /error-page error-page error-code503/error-code location/errors/TryAgain.html/location /error-page /web-app (I assume that you have renamed the directories and files accordingly: errors directory and TryAgain.html file are only examples). If you only want the error pages to apply to a particular webapp then you should create a web.xml file that you place in TOMCAT_HOME/webapps/yourWebApp/WEB-INF. This file should look like this: !DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd" web-app error-page exception-typejavax.servlet.TryagainException/exception-type location/errors/TryAgain.html/location /error-page error-page error-code503/error-code location/errors/TryAgain.html/location /error-page /web-app I hope this works. Tim Hughes -Original Message-From: Francisco Areas Guimaraes [mailto:[EMAIL PROTECTED]]Sent: 4. juli 2001 02:25To: [EMAIL PROTECTED]Subject: Re: http errors it didn´t work...could you please give a "complete" web.xml? and where should I put this file? in %TOMCAT_HOME%/conf or somewhere else? I´m using tomcat 3.2.2 and win2k, I would like any help you could provide, because I just started working with tomcat. thanks, Francisco [EMAIL PROTECTED] - Original Message - From: Hughes, Tim To: '[EMAIL PROTECTED]' Sent: Tuesday, July 03, 2001 4:29 AM Subject: RE: http errors Hi, Using error-page elements in the web.xml, you can program web applications to handle HTTP errors and exceptions. 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: web-app !-- Servlet definitions -- error-page exception-typejavax.servlet.TryagainException/exception-type location/errors/TryAgain.html/location /error-page error-page error-code503/error-code location/errors/TryAgain.html/location /error-page I hope this helps. Tim Hughes -Original Message-From: Francisco Areas Guimaraes [mailto:[EMAIL PROTECTED]]Sent: 3. juli 2001 02:15To: Lista tomcat UserSubject: http errors Anyone know if I can set tomcat to use a custom page for http errors, like 500, instead of it´s default???
RE: http errors
Hi, You will find a full copy of the **default** web.xml in TOMCAT_HOME/conf/. What is the default web.xml -- Extract from the user guide (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 available in chapters 9, 10 and 14 of the Servlet API Spec and we are not going to write about it. There is however a small Tomcat related "feature" that is related to web.xml. Tomcat lets the user define defaultw eb.xml values for all context by putting a default web.xml file in the conf directory. When constructing a new Context, Tomcat uses the default web.xml file as the base configuration and the application specific web.xml (the one located in the application's WEB-INF/web.xml), only overwrite these defaults.] So if you want the error pages to apply to all webapps then you put the error page tags in the default web.xml like this: ?xml version="1.0" encoding="ISO-8859-1"? !DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd" web-app !--IMPORTANT: all the tags that were already in the default web.xmlfile should remain in the file-- error-page exception-typejavax.servlet.TryagainException/exception-type location/errors/TryAgain.html/location /error-page error-page error-code503/error-code location/errors/TryAgain.html/location /error-page /web-app (I assume that you have renamed the directories and files accordingly: errors directory and TryAgain.html file are only examples). If you only want the error pages to apply to a particular webapp then you should create a web.xml file that you place in TOMCAT_HOME/webapps/yourWebApp/WEB-INF. This file should look like this: !DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd" web-app error-page exception-typejavax.servlet.TryagainException/exception-type location/errors/TryAgain.html/location /error-page error-page error-code503/error-code location/errors/TryAgain.html/location /error-page /web-app I hope this works. Tim Hughes -Original Message-From: Francisco Areas Guimaraes [mailto:[EMAIL PROTECTED]]Sent: 4. juli 2001 02:25To: [EMAIL PROTECTED]Subject: Re: http errors it didn´t work...could you please give a "complete" web.xml? and where should I put this file? in %TOMCAT_HOME%/conf or somewhere else? I´m using tomcat 3.2.2 and win2k, I would like any help you could provide, because I just started working with tomcat. thanks, Francisco [EMAIL PROTECTED] - Original Message - From: Hughes, Tim To: '[EMAIL PROTECTED]' Sent: Tuesday, July 03, 2001 4:29 AM Subject: RE: http errors Hi, Using error-page elements in the web.xml, you can program web applications to handle HTTP errors and exceptions. 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: web-app !-- Servlet definitions -- error-page exception-typejavax.servlet.TryagainException/exception-type location/errors/TryAgain.html/location /error-page error-page error-code503/error-code location/errors/TryAgain.html/location /error-page I hope this helps. Tim Hughes -Original Message-From: Francisco Areas Guimaraes [mailto:[EMAIL PROTECTED]]Sent: 3. juli 2001 02:15To: Lista tomcat UserSubject: http errors Anyone know if I can set tomcat to use a custom page for http errors, like 500, instead of it´s default??? please, help me, i´ve tried a lot of things and it didn´t help. []´s FranciscoThis message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is 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, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst & Young Group. It is intended onl
AW: http errors
Hi Tim, I tried the stuff you described, but had not success with it. I placed the error-page item in both web.xml files, but nothing changed. In addition I removed the login-config from the web-app web.xml file and placed that section into the default web.xml. The result was, that the login-config seemed to be lost. So what's wrong? I use Tomcat 3.2.2. It seems to me, that Tomcat does not implement the specification! Kind regards Guido -Ursprüngliche Nachricht- Von: Hughes, Tim [mailto:[EMAIL PROTECTED]] Gesendet am: Mittwoch, 4. Juli 2001 09:39 An: '[EMAIL PROTECTED]' Betreff: RE: http errors Hi, You will find a full copy of the **default** web.xml in TOMCAT_HOME/conf/. What is the default web.xml -- Extract from the user guide (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 available in chapters 9, 10 and 14 of the http://java.sun.com/products/servlet/ Servlet API Spec and we are not going to write about it. There is however a small Tomcat related feature that is related to web.xml. Tomcat lets the user define defaultw eb.xml values for all context by putting a default web.xml file in the conf directory. When constructing a new Context, Tomcat uses the default web.xml file as the base configuration and the application specific web.xml (the one located in the application's WEB-INF/web.xml), only overwrite these defaults.] So if you want the error pages to apply to all webapps then you put the error page tags in the default web.xml like this: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app !-- IMPORTANT: all the tags that were already in the default web.xml file should remain in the file -- error-page exception-typejavax.servlet.TryagainException/exception-type location/errors/TryAgain.html/location /error-page error-page error-code503/error-code location/errors/TryAgain.html/location /error-page /web-app (I assume that you have renamed the directories and files accordingly: errors directory and TryAgain.html file are only examples). If you only want the error pages to apply to a particular webapp then you should create a web.xml file that you place in TOMCAT_HOME/webapps/yourWebApp/WEB-INF. This file should look like this: !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app error-page exception-typejavax.servlet.TryagainException/exception-type location/errors/TryAgain.html/location /error-page error-page error-code503/error-code location/errors/TryAgain.html/location /error-page /web-app I hope this works. Tim Hughes -Original Message- From: Francisco Areas Guimaraes [mailto:[EMAIL PROTECTED]] Sent: 4. juli 2001 02:25 To: [EMAIL PROTECTED] Subject: Re: http errors it didn´t work...could you please give a complete web.xml? and where should I put this file? in %TOMCAT_HOME%/conf or somewhere else? I´m using tomcat 3.2.2 and win2k, I would like any help you could provide, because I just started working with tomcat. thanks, Francisco [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] - Original Message - From: Hughes, mailto:[EMAIL PROTECTED] Tim To: '[EMAIL PROTECTED]' mailto:'[EMAIL PROTECTED]' Sent: Tuesday, July 03, 2001 4:29 AM Subject: RE: http errors Hi, Using error-page elements in the web.xml, you can program web applications to handle HTTP errors and exceptions. 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: web-app !-- Servlet definitions -- error-page exception-typejavax.servlet.TryagainException/exception-type location/errors/TryAgain.html/location /error-page error-page error-code503/error-code location/errors/TryAgain.html/location /error-page I hope this helps. Tim Hughes -Original Message- From: Francisco Areas Guimaraes [mailto:[EMAIL PROTECTED]] Sent: 3. juli 2001 02:15 To: Lista tomcat User Subject: http errors Anyone know if I can set tomcat to use a custom page for http errors, like 500, instead of it´s default??? please, help me, i´ve tried a lot of things and it didn´t help. []´s Francisco This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read
RE: http errors
Hi, Using error-page elements in the web.xml, you can program web applications to handle HTTP errors and exceptions. 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: web-app !-- Servlet definitions -- error-page exception-typejavax.servlet.TryagainException/exception-type location/errors/TryAgain.html/location /error-page error-page error-code503/error-code location/errors/TryAgain.html/location /error-page I hope this helps. Tim Hughes -Original Message-From: Francisco Areas Guimaraes [mailto:[EMAIL PROTECTED]]Sent: 3. juli 2001 02:15To: Lista tomcat UserSubject: http errors Anyone know if I can set tomcat to use a custom page for http errors, like 500, instead of it´s default??? please, help me, i´ve tried a lot of things and it didn´t help. []´s Francisco This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst & Young Group. It is 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, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
Re: http errors
it didn´t work...could you please give a "complete" web.xml? and where should I put this file? in %TOMCAT_HOME%/conf or somewhere else? I´m using tomcat 3.2.2 and win2k, I would like any help you could provide, because I just started working with tomcat. thanks, Francisco [EMAIL PROTECTED] - Original Message - From: Hughes, Tim To: '[EMAIL PROTECTED]' Sent: Tuesday, July 03, 2001 4:29 AM Subject: RE: http errors Hi, Using error-page elements in the web.xml, you can program web applications to handle HTTP errors and exceptions. 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: web-app !-- Servlet definitions -- error-page exception-typejavax.servlet.TryagainException/exception-type location/errors/TryAgain.html/location /error-page error-page error-code503/error-code location/errors/TryAgain.html/location /error-page I hope this helps. Tim Hughes -Original Message-From: Francisco Areas Guimaraes [mailto:[EMAIL PROTECTED]]Sent: 3. juli 2001 02:15To: Lista tomcat UserSubject: http errors Anyone know if I can set tomcat to use a custom page for http errors, like 500, instead of it´s default??? please, help me, i´ve tried a lot of things and it didn´t help. []´s FranciscoThis message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is 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, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
http errors
Anyone know if I can set tomcat to use a custom page for http errors, like 500, instead of it´s default??? please, help me, i´ve tried a lot of things and it didn´t help. []´s Francisco
Re: http errors
hi Francisco, Use error-document in web.xml. Its covered in the Servlet 2.2 spec. cheers dim On Tue, 3 Jul 2001 10:14, you wrote: Anyone know if I can set tomcat to use a custom page for http errors, like 500, instead of it´s default??? please, help me, i´ve tried a lot of things and it didn´t help. []´s Francisco Content-Type: text/html; charset=iso-8859-1; name=Attachment: 1 Content-Transfer-Encoding: quoted-printable Content-Description:
How to catch handle HTTP errors (esp. 404) ?
I'd like to know if Tomcat (standalone mode) enables transfer errors (especially 404 persona non grata !) and how to configure this. Thank you ~ JF - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]