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

Bernd Wolfsegger bw at code-create.com
Mon Apr 4 20:39:59 CEST 2005


Thanx for this information Alex.
Just thought about the 500 because it is in the Handler_Names.
But you're right there need to be a 500 entry in the web.xml.

As for the exception information, I will test a little bit.

By the way, the OpenCms explorer navigation hang bug I posted some time ago 
seems to be gone with the beta 2. :)
But if I have selected "/" site in the explorer view and have the "/sites" 
tree unfolded for editing some resource and than unfold the "/system" tree 
too and open some resource below and close or save it again, the "/sites" 
tree is displayed folded again after that, and vis versa.
If you jump back and force between both while developing site content 
templates and site layout templates its a little bit annoying.

Kind regards, Bernd


On Monday 04 April 2005 20:42, Alexander Kandzior wrote:
> Bernd,
>
> > 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?
>
> I didn't try for the 500 error. Only 404 is handled "nativly" in OpenCms
> for sure, for reasons of the static export. IIRC for all other error codes
> your must add something into web.xml.
>
> So for a XXX handler, you should add
>
>     <error-page>
>       <error-code>XXX</error-code>
>       <location>/opencms/system/handler/handleXXX.html</location>
>     </error-page>
>
> > Huuhh. And can you just say yes or no, if it is possible to
> > access the original Exception type in the handle404.html (JSP)?
>
> Not sure about what's available in the JSP and what not. Try accessing the
> Java servlet / JSP standard objects for the error handler (see above),
> probably located in the request context. These should provide you with all
> information required. Didn't try that so far.
>
> It's not unlikley we will add some handlers / pages by default until the
> 6.0 final is ready.
>
> Best Regards,
> Alex.
>
> Alexander Kandzior
> Alkacon Software - The OpenCms Experts
> http://www.alkacon.com

-- 

[  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