application.properties file:

errors.footer=
errors.header=
errors.abc.required=This is a test

when I use <html:errors property="abc" header="errors.footer" footer="
errors.header" />,I get following error:
org.apache.jasper.JasperException: /index.jsp(10,20) Attribute header
invalid for tag errors according to TLD
org.apache.jasper.servlet.JspServletWrapper.handleJspException(
JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java
:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)





On 2/24/06, Niall Pemberton <[EMAIL PROTECTED]> wrote:
>
> Try having the following in your message resources:
>
> errors.footer=
> errors.header=
>
> ... or rather than using the default, you could specify empty
> header/footer
> labels. In your application resources:
>
> empty.footer=
> empty.header=
>
> ... then on the errors tag:
>
> <html:errors property="abc" header="empty.footer" footer="empty.header" />
>
> ...or you could use the messages tag instead:
>
> <html:messages property="abc" id="msg"><bean:write
> name="msg"/></html:messages>
>
> See:
> http://www.niallp.pwp.blueyonder.co.uk/HelpTagsErrorsAndMessages.html
>
> Niall
>
> ----- Original Message -----
> From: "red phoenix" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <user@struts.apache.org>
> Sent: Friday, February 24, 2006 2:30 AM
> Subject: Re: <html:errors> question
>
>
> Thanks Niall,<html:errors property="logstime"/> works well. But I find
> another question,first look at my application.properties file:
> errors.footer=&nbsp;
> errors.header=&nbsp;
> errors.abc.required=This is a test
>
> In my jsp,use follows statement
> <html:text property="abc" /><html:errors name="abc"/>
>
> If errors is not empty,it will should the error message "This is a test"
> My question is when I run it,it can show the error message "This is a
> test",but the message is not showing in the line with the same line of
> <html:text
> property="abc" />,I guess the reason is <html:errors name="abc"/> shows
> not
> only errors.abc,but shows errors.header and errors.footer,so the
> <html:text
> property="abc" /> and <html:errors name="abc"/> will not show in the same
> line,if I delete errors.footer and errors.header from
> application.properties,
> application.properties only contain a single line,like follows
> errors.abc.required=This is a test
>
> When I run <html:text property="abc" /><html:errors name="abc"/>,it will
> show:
>
> the content of <html:text property="abc">
> null
> This is a test
> null
>
> How to make the show of <html:errors name="abc"/> is in the same line of
> the
> show of <html:text property="abc" /> and only show <html:errors
> name="abc"/>
> without errors.header and errors.footer?
>
> Thanks in advance
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to