Hey Dennis, long time no talk!

Well, not sure if there is a better way, but here is what we do:

<html:errors property="org.apache.struts.action.GLOBAL_ERROR"/>

(removes the import).. 

I guess you could write a custom tag to create one of the html:errors
tag instances, set the property name to the GLOBAL_ERROR constant, and
delegate to it.. Thus, you could do 

<my:globalError/>

And it would do the work for you to setup and delegate.. Seems like
something would be there for you already, though.. To prevent this
particular situation.. 

Just a thought,
James

> -----Original Message-----
> From: Dennis Muhlestein [mailto:dennis@;zserve.com] 
> Sent: Monday, October 21, 2002 12:09 PM
> To: [EMAIL PROTECTED]
> Subject: Best Practice for optaining GLOBAL_ERRORS
> 
> 
> I want to display errors with <html:errors 
> property="myproperty" /> By the input field for the property. 
>  That is fine and works ok.
> 
> At the top of my form, I'd like to display any Global Errors. 
> I've added <html:errors property="ActionErrors.GLOBAL_ERROR"/>
> 
> That works too, but it doesn't seem like very good practice 
> to have to 
> add the <%@page 
> import="org.apache.struts.aciton.ActionErrors"%> at the top 
> of the page so I can get the gobal_ERROR attribute
> 
> Any suggestions?  I could leave as is and everything would be 
> fine I guess.
> 
> Thanks
> Dennis
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:struts-user-> [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: <mailto:struts-user-help@;jakarta.apache.org>
> 
> 

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to