> -----Original Message-----
> From: Eisert, Wolfram [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 23, 2001 3:43 PM
> To: '[EMAIL PROTECTED]'
> Subject: AW: [C2.0] 404 Error and Cocoon response
>
>
> Hi,
>
> sorry, but I've just seen that
>       res.setContentType(Notifier.notify(n, (OutputStream)null));
> is there with intention to use the HTTP 404 error code instead
> of a cocoon message.
>
> In this case I think the HttpServletResponse method
>       res.sendError(res.SC_NOT_FOUND)
> should be used instead of
>       res.setStatus(res.SC_NOT_FOUND)
> because setStatus() is only intented for "non error" status codes.
>
Thanks Wolfram for reporting this! I just fixed it.

Thanks,
Carsten

> I get the blank page whenever I enter an invalid http-adress in cocoon
> (using IE 5.0). When using "sendError" I get a correct "NOT FOUND"
> message.
>
> Example "blank page":
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META content="text/html; charset=windows-1252"
> http-equiv=Content-Type></HEAD>
> <BODY></BODY></HTML>
>
> Wolfram
>
> -----UrsprØngliche Nachricht-----
> Von: Eisert, Wolfram [mailto:[EMAIL PROTECTED]]
> Gesendet am: Freitag, 23. November 2001 14:50
> An: '[EMAIL PROTECTED]'
> Betreff: AW: [C2.0] 404 Error and Cocoon response
>
> Hi,
>
> I think this is because of an problem in CocoonServlet.java.
>
> When catching "ResourceNotFoundException" in method service()
> the error response is set via
>
>       res.setContentType(Notifier.notify(n, (OutputStream)null));
>
> but I think it should be
>
>             res.setContentType(Notifier.notify(n,
> (OutputStream)res.getOutputStream()));
>
> Wolfram
>
>
> -----UrsprØngliche Nachricht-----
> Von: Piroumian, Konstantin [mailto:[EMAIL PROTECTED]]
> Gesendet am: Freitag, 23. November 2001 13:44
> An: [EMAIL PROTECTED]
> Betreff: Re: [C2.0] 404 Error and Cocoon response
>
> > > >
> > > > Hi all!
> > > >
> > > > I noticed that I get a blank page instead of 404 Error when
> something's
> > > > wrong in sitemap and the file could not be found. Long time
> ago Cocoon
> > was
> > > > giving an Exception, then it was changed to give a
> response: 404 File
> > not
> > > > found error. Now something's went wrong and the result is a blank
> page.
> > > >
> > > > Do I miss something?
> > > >
> > > I just tested it - and got a shock as I did get a blank page,
> too, after
> I
> > > changed
> > > the src attribute for a generator to a non existing xml document.
> > > But then it hit me: The IE things he is clever and caches something of
> the
> > > first working response. After restarting the IE and invoking the same
> > > URL I get the 404 as expected.
> > > So, I hope you use the IE, too. Then try this.
> > > If not, well - please give more information then.
> >
> > Yes, I use IE, so it must be the cache, but I couldn't check it cause I
> > couldn't reproduce the blank page. All I remember is that the page was
> > correct HTML without any content in the BODY. And I have seen a lot of
> > messages in cocoon-users about the blank-page response.
> > Couldn't it be a problem somewhere in Cocoon? Maybe with HTTP headers or
> the
> > cache?
>
> Look at this quot from a cocoon-users list message. Maybe the problem
> appears only with readers? I've been working with JSPReader when I was
> getting blank pages.
>
> <quot>
> ...
> <map:match pattern="**.pdf">
>     <map:read src="resources/pdf/{1}.pdf" mime-type="application/pdf"/>
>     </map:match>
> ...
> If the pdf file cannot be found, how do I redirect to an error page ??
>
> I always get a blank page !
>
> Thanks
> Beat De Martin
>
> </quot>
>
> >
> > >
> > > Carsten
> > >
> > > > Best regards,
> > > >
> > > > Konstantin Piroumian
> > > > Software engineer
> > > >
> > > > Protek Flagship LLC
> > > > Phone: + 7 095 795 0520 (add. 1288)
> > > > Fax: + 7 095 795 0525
> > > > E-mail: [EMAIL PROTECTED]
> > > > http://www.protek.com
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, email: [EMAIL PROTECTED]
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, email: [EMAIL PROTECTED]
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to