tomcat-users mailing list archives

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

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

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

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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message