[opencms-dev] How do you customize error page
Alexander Kandzior
alex at opencms.org
Fri Feb 11 11:15:30 CET 2005
Forgive me if I am stating the obvious, but on you your JSP you need to
write some code like this:
CmsJspAction Element cmsJsp; // need to be initialzed
CmsObejct cms = cmsJsp.getCmsObject();
boolean success;
try {
cms.addWebuser(...);
success = true;
} catch (Excaption e) {
success = false;
}
if (success) {
// display some success message
} else {
// display some failure message
}
To customize the OpenCms core error pages themself is IIRC not possible in
OpenCms 5 without hacking the core. What you can do is add a 500 (internal
server error) handler using standard Java Webapp means, which should then be
invoked in case of any error in OpenCms.
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 James
> Sent: Friday, February 11, 2005 11:04 AM
> To: 'The OpenCms mailing list'
> Subject: RE: [opencms-dev] How do you customize error page
>
> This is exactly what I want to know.
>
> How do you customize the cmsExceptions that are thrown?
>
> Say when you try to addWebUser and the user already exists,
> how do I customize the error message that is thrown or
> capture the error and send back a certain value to the JSP
> page that has caused it?????
>
> Please.... .... somebody... .... anybody........
>
>
>
> -----Original Message-----
> From: opencms-dev-bounces at opencms.org
> [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Tim Van
> Der Hulst
> Sent: 10 February 2005 23:06
> To: The OpenCms mailing list
> Subject: RE: [opencms-dev] How do you customize error page
>
> This covers the webserver errors (eg 404,500,etc). Not
> opencms errors...
>
> -----Original Message-----
> From: Daniel Rhoden [mailto:drhoden at iiwinc.com]
> Sent: Friday, 11 February 2005 11:58 a.m.
> To: The OpenCms mailing list
> Subject: Re: [opencms-dev] How do you customize error page
>
>
> The web.xml file has an entry for the 404 error mapping. I
> do not know for sure, but I suspect that you would enter the
> location of the page
> (VFS) hosted by openCMS.
>
> --Daniel
>
> Tim Van Der Hulst wrote:
>
> >Forgive my noobness but please can someone help me out here!!!
> >
> >HOW DO YOU CUSTOMIZE THE OPENCMS ERROR PAGE?
> >
> >I've looked around where I thought it might live, (eg
> /system/workplace/templates/, etc) but I can't find it. Am I
> stupid? or what??
> >
> >Thankyou,
> >
> >TiM
> >
> >
> >-----Original Message-----
> >From: Tim Van Der Hulst
> >Sent: Friday, 4 February 2005 3:37 p.m.
> >To: The OpenCms mailing list
> >Subject: [opencms-dev] How do you customize error page
> >
> >
> >Can someone enlighten me.
> >I have not seen answer to this question.
> >I'm using version 5
> >
> >Thankyou,
> >
> >TiM
> >
> >##
> >##
> >
> >
> >_______________________________________________
> >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
> >
> >
> >
>
>
> _______________________________________________
> 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
>
>
>
> _______________________________________________
> 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