I'm not sure what printing out the headers and footers has to do with creating ActionError objects in your Action class, but here goes:
If you just want to create ActionError object(s) in your Action and forward to a page that displays it/them, then create an ActionErrors (note the 's') object to contain the errors, create and add ActionError objects to it, and save them using the saveErrors(...) method in Action (this method saves the ActionErrors object to the session). Then forward to a jsp that uses the <html:errors> tag to print out the errors. If you don't want any headers and footers period, then just set the header and footer to be blank in your config. If you don't want headers/footers for specific instances, then you'll have to extend the <html:errors> tag to support an attribute like "errorsOnly", which, if given a value of "true", will not spit out the header/footer. Or you can grab the ActionErrors object from the session (I don't know what name the saveErrors() method saves them under, however) and print them out directly using a scriplet, your choice. Or, finally, you can just save these no header/footer error messages in your own custom bean by populating it with error messages retrieved from the MessageResources class (which loads them from ApplicationResources file), put the bean into the request or session, and then spit out the messages using <bean:write> tags in your jsp error page. As usual, more than one way to skin the proverbial cat. peace, Joe Barefoot > -----Original Message----- > From: Schmidt, Carl [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, June 05, 2002 3:26 PM > To: Struts (E-mail) > Subject: Error headers and footers > > > A perusal of the mailing list archives gives me the impression > that there is > no way around printing out the error header and footers when using the > html:errors tag. While I understand that the html:errors tag is > to be used > mostly for printing form validation errors, what about those > errors that are > generated in the Action, and I don't mean exceptions? > > For example, let's say the user is logging in. In the Action , I have > business logic that validates the password against the db, and if > after the > 3rd try, I want to have an ActionError object created, forward the user on > to a generic error .jsp page, and display a message like "You've > been locked > out". Here no exception is thrown (it's not like the db > connection is dead > or soemthing) and i want to take advantage of the locale > feature, plus be > able to keep the design neat by putting all my error messages in > applicationResources file. Anyone with suggestions? > > > Carl > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

