[opencms-dev] OpenCMS: 404-error-handling

Bernd Wolfsegger bw at code-create.com
Mon Apr 4 19:27:03 CEST 2005


Hello Alex,

thanx for throwing me deeper into the code :)
I tested it before with another ErrorCode and because of that it did not work.
Well, now I delved a little bit more.
Missed the sendError and some other things back and force between OpenCmsCore 
and OpenCmsServlet.
Am I correct, when I think it would be good to have a handle500.html too?

Huuhh. And can you just say yes or no, if it is possible to access the 
original Exception type in the handle404.html (JSP)?

Kind Regards, Bernd



On Monday 04 April 2005 16:43, Alexander Kandzior wrote:
> Bernd,
>
> since you apparently have looked into the OpenCms source code, you should
> read it correctly before claiming that something does not work.
>
> You only need to create the folder / file "/handler/handle404.html" in the
> OpenCms "/system" folder, which will be displayed in case of a 404 error.
> Make this "handle404.html" a JSP that uses your template of choice in case
> you want more advanded error handling stuff. Everything works as expected.
>
> Best Regards,
> Alex.
>
> Alexander Kandzior
> Alkacon Software - The OpenCms Experts
> http://www.alkacon.com
>
> > -----Original Message-----
> > From: opencms-dev-bounces at opencms.org
> > [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Bernd Wolfsegger
> > Sent: Monday, April 04, 2005 2:30 PM
> > To: opencms-dev at opencms.org
> > Subject: Re: [opencms-dev] OpenCMS: 404-error-handling
> >
> > Well,
> >
> > read no answer to this question yet ...
> >
> > In 6.0 beta 2 OpenCmsServlet would forward a 404-request to
> > "system/handlers/handler404.html" if the exception would
> > reach this point in code. But OpenCMSCore calls
> > res.sendError() with a 404 code before in method
> > "errorhandling", at least if your are outside the opencms
> > system. If you are inside, this nice errorbox is served.
> > This way its not possible yet to add customized errorhandling
> > for the webuser and more descriptive messages than a blank page ...
> > Will it be possible in the 6.0 final, like it is in "normal"
> > JSPs with the errorPage Tag?
> >
> > Kind regards, Bernd Wolfsegger
> >
> > On Thursday 31 March 2005 09:35, Uwe König wrote:
> > > Hello to all,
> > >
> > > we're hosting different sites in one OpenCMS instance
> >
> > (5.0.1). Now we
> >
> > > want different 404-errorpages for each site we're hosting. Does
> > > anybody dealt with that issue?
> > >
> > > For we're thinking about using OpenCMS6 soon, I had a look at the
> > > handling of 404-errors there. It seems to me that the class
> > > OpenCMSCore forwards a 404-request to the location
> > > "system/handlers/handler404.html"
> > > So I created this resource, but it is not displayed. Instead, I
> > > receive an empty page with some HTML-headers, indicating that this
> > > empty page is OpenCMS-generated. Is this behaviour still in
> >
> > progress
> >
> > > due to beta state or has someone any hints for me?
> > > Thanks in advance,
> > >
> > >
> > > Uwe König
> > >
> > >
> > > _______________________________________________
> > > 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
> >
> > _______________________________________________
> > 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

-- 

[  Code Create
[  Information Technology & Architecture


[  Bernd Wolfsegger

[  Sun Certified Programmer for Java(TM) 2 Platform
[  Dipl.-Ing. Architekt

[  Office in Germany
[
[  Lohmeyerstrasse 13
[  10587 Berlin
[  Germany
[  +49 (0)30 26555788

[  Office in Kenya
[
[  P.O. Box 890
[  V/Market
[  00621 Nairobi
[  Kenya
[  +254 (0)720 481053

[  bw at code-create.de(com)
[  http://www.code-create.de(com)/




More information about the opencms-dev mailing list