[opencms-dev] Re: Setting response status from JSP page

Joe Desbonnet jdesbonnet at gmail.com
Thu Aug 18 12:55:48 CEST 2005


Are you using OpenCms from the head of the CVS tree? I believe that
bug was fixed there. But I haven't had time to verify that yet.

Joe.


On 8/18/05, Johannes Bornhold <bornhold at regio-institut.de> wrote:
> 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
> 
> 
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
>



More information about the opencms-dev mailing list