[opencms-dev] Re: Setting response status from JSP page
Johannes Bornhold
bornhold at regio-institut.de
Thu Aug 18 08:45:03 CEST 2005
Hi,
"Thomas Maerz" <thomasmaerz at gmx.de> writes:
> "Johannes Bornhold" <bornhold at regio-institut.de> writes:
> > i'm trying to set the HTTP response status code from a JSP page which
> > resides in the OpenCMS VFS. Using response.sendError(404) did not
work.
>
|http://www.opencms.org/cvs/viewcvs.cgi/opencms/history.txt?rev=1.677&content-type=text/vnd.viewcvs-markup
> |
> | OpenCms 6.0.1 - ???, 2005
> [...]
> | * Fixed issue with error (404) pages not returning a 404 status code
Thanks, but i already read this. But the problem I am trying to solve is
to set the 404 statuscode from a normal JSP-Page within the OpenCMS VFS. I
tried within my page "response.setStatus(404)" and
"response.sendError(404)" but both calls are without an effect. It seems
that OpenCMS overwrites the statuscode after the JSP-page has been
processed. And I did not find an alternative way to respond with the
statuscode set to 404.
I am processing some dynamic content with this JSP page and if the
parameters don't match the result shall not be indexed by search engines.
I think the right solution to this is to set the statuscode to 404.
Maybe anyone knows how to correctly respond with the statuscode set to 404
from a normal JSP-page in the OpenCMS VFS?
Regards,
Johannes
More information about the opencms-dev
mailing list