tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Schönwald <oliver.schoenw...@fernuni-hagen.de>
Subject Re: Tomcat 4.1.18: How to send HTTP errors from servlets
Date Sun, 16 Feb 2003 09:21:25 GMT
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:Oliver.Schoenwald@FernUni-Hagen.de]
> >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: 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

-- 
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: Oliver.Schoenwald@fernuni-hagen.de
          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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message