On Wed, 25 Jul 2001, Vladimir Grishchenko wrote:
>
>
> extract
>
> org/apache/tomcat/core/LocalStrings.properties
>
> (or org/apache/tomcat/service/LocalStrings.properties ??
> don't remember exactly which one did it for me..)
>
> from webserver.jar, add/edit status codes you want, put it
> back and restart Tomcat. You should be running fine now.
> This should work on 3.2.2, not sure about T4.
>
> --V.
>
A similar technique will work in Tomcat 4 to avoid the exceptions on
unknown status codes.
However, I would strongly urge Germano to *not* arbitrarily extend the
HTTP protocol in this way. It's obvious that the client application
making these requests is aware of the special meaning of these status
codes, so it could be modified to acquire whatever additional info it
needs from HTTP headers, or cookies, or something else that is already
supported by standard HTTP.
Making yourself dependent on a hand-modified version of a single servlet
container is just asking for maintenance headaches down the road. And the
whole thing collapses when you need to insert something like a standard
HTTP proxy server between the client and the server, or switch to a
different container that absolutely refuses to deal with your modified
status codes, or ...
Craig McClanahan
>
>
>
> ---------------
> Hi!
>
> I'm developing an application not targeted to the web, but still I need to
> use the HTTP as the protocol. I've chosen to specify five new status code,
> to report some kind of errors I may generate and that aren't covered by
> existing ones. These codes are 601, 602, 603, 605, 606. The problem is that
> using JRun it just ignored the error code, and reported the page normally;
> tomcat, on the other hand, throws an exception everytime my application
> reports one such code. This degrades performances very much...
>
> Is there a way to specify these new codes as valid? And, in case, to bind a
> string to them as a description, just as for the other ones? I saw there are
> some LocalString.properties files, but I can't get them to work; and I think
> they're just for localization...
>
> Many thanks,
>
> Germano Rizzo
>
>
> ***********************************************************************
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. Any unauthorized review, use, disclosure or distribution
> is prohibited. If you are not the intended recipient, please contact
> the sender by reply e-mail and destroy all copies of the original
> message.
> ***********************************************************************
>