tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexandr Molochnikov" <a...@gestalt.com>
Subject How to control text in error description in browser?
Date Wed, 22 Oct 2003 21:29:33 GMT
Hello,

Under certain conditions my servlet must send an error response to the
browser. I do this by sending ((HttpServletResponse) res).setError(503,
"You goofed"). When this message is displayed in the browser, this is
what gets shown:

In large font on the top of the browser page, the text appears: "HTTP
Status 503 - You goofed".
Below it, in smaller font, the following is displayed:

Type Status report
Message You goofed
Description The requested service (You goofed) is not currently
available.

Apache Tomcat/4.1.27

As you can see, the description field is not very meaningful. I could
not find a method in HttpServletResponse that controls the description.

Does anyone know if (and how) the browser content can be controlled from
the servlet?

Thanks for any help.

Alex Molochnikov
Gestalt Corporation
www.gestalt.com

PS: No, I don't really say "You goofed" in the message text - it just
saves me typing :-)

---------------------------------------------------------------------
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