That was it... I just kept looking over it and never noticed the missing
taglib directive... Thanks for your patience and help

-----Original Message-----
From: Niall Pemberton [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 11, 2004 4:12 PM
To: Struts Users Mailing List
Subject: Re: using multiple error messages


The only thing I can see is the bean taglib is missing from your jsp

 <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>

Niall

----- Original Message ----- 
From: "Nimmons, Buster" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, May 11, 2004 9:59 PM
Subject: RE: using multiple error messages


> here is the snippet of code which produces the ActionErrors object
>
>      Long id = new Long(System.currentTimeMillis());
>      ActionErrors errors = new ActionErrors();
>      errors.add( ActionErrors.GLOBAL_ERROR, new
> ActionError("error.folders.po.saveFileException",id.toString()) );
>      saveErrors( request, errors );
>      logger.log(this,"PO_FOLDER",e.getMessage()+"
{"+id+"}",e,logger.ERROR);
>      return "systemError";
>
> below are the entries in the ApplicationResources.properties file
>
>      errors.systemErrorHeader=<h3><font color\="red">The following System
> error(s) occurred!</font></h3>It appears you will not be able to proceed.
> When contacting support please refer to the Error ID listed next to each
> error\:<ul>
>      error.folders.po.invalidJobException=Invalid job number.
>      error.folders.po.uvSessionException=Could not create Universe
Session.
> LogID = {0}
>      error.folders.po.saveDataException=Could not save document data.
LogID
> = {0}
>      error.folders.po.saveFileException=Could not save electronic file.
> LogID = {0}
>      error.folders.po.openPoDocsException=Could not open the PO_DOCUMENTS
> table = {0}
>
> below is the jsp page to output the error above
>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
> <%@ page import="org.apache.struts.Globals" %>
>
> <%@ page contentType="text/html;charset=windows-1252"%>
> <html>
>   <head>
>     <meta http-equiv="Content-Type" content="text/html;
> charset=windows-1252">
>     <title>untitled</title>
>   </head>
>   <body>
>     <P>
>       <html:messages id="myError" header="errors.testErrorHeader">
>         <bean:write name="myError"/>
>       </html:messages>
>     </P>
>   </body>
> </html>
>
>
>
>
> -----Original Message-----
> From: Niall Pemberton [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 11, 2004 3:56 PM
> To: Struts Users Mailing List
> Subject: Re: using multiple error messages
>
>
> Well, works for me and dubugging your stuff without seeing your code is
> difficult.
>
> Niall
>
> ----- Original Message ----- 
> From: "Nimmons, Buster" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Tuesday, May 11, 2004 9:44 PM
> Subject: RE: using multiple error messages
>
>
> > I do in fact have and <html:errors/> on the page to test for the
existence
> > of errors and it does display the errors
> >
> > -----Original Message-----
> > From: Niall Pemberton [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, May 11, 2004 3:44 PM
> > To: Struts Users Mailing List
> > Subject: Re: using multiple error messages
> >
> >
> > It only outputs the headers if there are messages - are the message keys
> in
> > your application resources? If you put <html:errors/> on the same page
do
> > you see the error messages correctly?
> >
> > Niall
> >
> > ----- Original Message ----- 
> > From: "Nimmons, Buster" <[EMAIL PROTECTED]>
> > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> > Sent: Tuesday, May 11, 2004 8:02 PM
> > Subject: RE: using multiple error messages
> >
> >
> > > The code suggested below seems to work as far as displaying the
> > appropriate
> > > header message if errors are present but none of the actual error
> messages
> > > get printed.. any ideas why
> > >
> > > -----Original Message-----
> > > From: Niall Pemberton [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, May 11, 2004 11:19 AM
> > > To: Struts Users Mailing List
> > > Subject: Re: using multiple error messages
> > >
> > >
> > > By default it looks for action errors under the same key as
> <html:errors/>
> > > does (Globals.ERROR_KEY) or you can specify a message="true" attribute
> > which
> > > causes it to look under the Globals.MESSAGE_KEY instead, or you can
> > specify
> > > your own key with the "name" attribute.
> > >
> > > The id is something different, you specify anything you want, it
stores
> > each
> > > message under  a page context attribute
> > > that you name in "id"
> > >
> > >    <html:messages id="myError" header="errors.systemheader">
> > >         <bean:write name="myError"/>
> > >    </html:messages>
> > >
> > >
> > > ----- Original Message ----- 
> > > From: "Nimmons, Buster" <[EMAIL PROTECTED]>
> > > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> > > Sent: Tuesday, May 11, 2004 4:58 PM
> > > Subject: RE: using multiple error messages
> > >
> > >
> > > > Sorry I replied to the wrong post earlier.... I noticed the API
> > > > documentation stated that the messages tag could Iterate over the
> > > > ActionErrors but does not say what the ActionErrors bean is saved as
> so
> > I
> > > > don't know what to specify in the id attribute.. Does struts define
a
> > > > constant somewhere defining the bean id
> > > >
> > > > -----Original Message-----
> > > > From: Niall Pemberton [mailto:[EMAIL PROTECTED]
> > > > Sent: Tuesday, May 11, 2004 10:39 AM
> > > > To: Struts Users Mailing List
> > > > Subject: Re: using multiple error messages
> > > >
> > > >
> > > > The <html:messages> tag does exactly what you want - you can specify
> the
> > > > header/footer/suffix/prefix as attributes on the tag:
> > > >
> > > >    <html:messages header="errors.systemheader"/>
> > > >
> > > > http://jakarta.apache.org/struts/userGuide/struts-html.html#messages
> > > >
> > > > Niall
> > > >
> > > > ----- Original Message ----- 
> > > > From: "Nimmons, Buster" <[EMAIL PROTECTED]>
> > > > To: <[EMAIL PROTECTED]>
> > > > Sent: Tuesday, May 11, 2004 2:07 PM
> > > > Subject: using multiple error messages
> > > >
> > > >
> > > > > currently my ApplicationResources.properties file contains the
> > following
> > > > > errors.header entry
> > > > >
> > > > > <h3><font color\="red">The following error occurred</font></h3>You
> > must
> > > > > correct the following error(s) before proceeding\:<ul>
> > > > >
> > > > > this is fine for application errors. However I would like to
define
> a
> > > > > different header for System errors so I may such as
> > > > >
> > > > > <h3><font color\="red">The following unrecoverable error(s) have
> > > > > occurred</font></h3>It is not possible to proceed. When contacting
> > > support
> > > > > identify the errors below by the error ID listed\:<ul>
> > > > >
> > > > > How can I specify multiple error headers and tell the <html:error
> tag
> > to
> > > > use
> > > > > the appropriate one
> > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



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

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

Reply via email to