try { afterMessage = bundle.getString("stripes.errors.afterMessage"); }
try { afterMessage = bundle.getString("stripes.messages.afterMessage"); }
    public int doEndTag() throws JspException {        try {            List<Message> messages = getMessages();            if (messages != null && messages.size() > 0) {                JspWriter writer = getPageContext().getOut();                // Output all errors in a standard format                Locale locale = getPageContext().getRequest().getLocale();                ResourceBundle bundle = StripesFilter.getConfiguration()                        .getLocalizationBundleFactory().getErrorMessageBundle(locale);                // Fetch the header and footer                String header, footer, beforeMessage, afterMessage;                try { header = bundle.getString("stripes.messages.header"); }                catch (MissingResourceException mre) { header = DEFAULT_HEADER; }                try { footer = bundle.getString("stripes.messages.footer"); }                catch (MissingResourceException mre) { footer = DEFAULT_FOOTER; }                try { beforeMessage = bundle.getString("stripes.messages.beforeMessage"); }                catch (MissingResourceException mre) { beforeMessage = "<li>"; }                try { afterMessage = bundle.getString("stripes.errors.afterMessage"); }                catch (MissingResourceException mre) { afterMessage = "</li>"; }                // Write out the error messages                writer.write(header);                for (Message message : messages) {                    writer.write(beforeMessage);                    writer.write(message.getMessage(locale));                    writer.write(afterMessage);                }                writer.write(footer);            }            return EVAL_PAGE;        }        catch (IOException e) {            throw new JspException("IOException encountered while writing messages " +                    "tag to the JspWriter.", e);        }    }