[opencms-dev] Re: Declare http status (404/301/...) in JSP

Thorsten Duhn duhn at regio.uni-oldenburg.de
Tue Nov 22 13:55:23 CET 2005


Hy again,

> Couple of things (maybe obvious, but you never know) :
> - after a response.sendError(404) you should directly stop
>   processing the jsp, so add a return after the sendError

ends up with an blank page. With status code 200 :-(

> - It could be that the response object is wrapped by opencms
>   (if I am not mistaken it is). Try to get the original response
>   and invoke a sendError on that object directly (if opencms
>   actually override sendError)

There are reasons the things are the way they are. Due to
virtual file system we needed another way to synchronize with
our development enviroment and CVS. This sounds like a workaround,
not a solution, and this workaround is not available for us.

I maybe have an idea for another workaround, redirecting to a
not available (in VFS) resource, so a "real" 404 is sent, but
I have not tried, because, I'll say again and again, I believe,
this is a bug in OpenCms and it should be fixed.

Regards,
Thorsten




More information about the opencms-dev mailing list