You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Kanuri, Chand" <ch...@landg.com> on 2005/11/21 14:01:10 UTC

how to display error messages from actions?

hi all,
i am trying to display error messages.it works fine with the following
code(works for both form validation messages and messages from actions).
<logic:messagesPresent>
	<div id="errorList">
	<ul>
		<LI><html:errors /></LI>
	</ul>
	</div>
</logic:messagesPresent>

now i am trying to display the error messages each in a row

<logic:messagesPresent>
	<div id="errorList">
	<UL>
		<html:messages id="error">
			<LI><bean:write name="error" /></LI>
		</html:messages>
	</UL>
	</div>
</logic:messagesPresent>

this works finr for form validation messages but fails with messages from
actions..

any ideas?it thows error 500
Error 500: ServletException in '/errors.jsp': Cannot find bean error in any
scope 

fails at
at
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.ja
va:923)

any ideas?

regards and thanks in advance


This e-mail (and any attachments) may contain privileged and/or confidential information. If you are not the intended recipient please do not disclose, copy, distribute, disseminate or take any action in reliance on it. If you have received this message in error please reply and tell us and then delete it. Should you wish to communicate with us by e-mail we cannot guarantee the security of any data outside our own computer systems. For the protection of Legal & General's systems and staff, incoming emails will be automatically scanned.

Any information contained in this message may be subject to applicable terms and conditions and must not be construed as giving investment advice within or outside the United Kingdom.

The following companies are subsidiary companies of the Legal & General Group Plc which are authorised and regulated by the Financial Services Authority for advising and arranging the products shown: Legal & General Partnership Services Limited (insurance and mortgages), Legal & General Insurance Limited (insurance), Legal & General Assurance Society Limited 
(life assurance, pensions and investments), Legal & General Unit Trust Managers Limited and Legal & General Portfolio Management Services Limited (investments).

They are registered in England under numbers shown.
The registered office is Temple Court, 11 Queen Victoria Street, London EC4N 4TP.

Legal & General Partnership Services Limited: 5045000 Legal & General Assurance Society Limited: 166055 Legal & General (Unit Trust Managers) Limited: 1009418 Legal & General (Portfolio Management Services) Limited: 2457525 Legal & General Insurance Limited: 423930

They are registered with the Financial Services Authority under numbers shown. You can check this at www.fsa.gov.uk/register

Legal & General Partnership Services Limited: 300792 Legal & General Assurance Society Limited: 117659 Legal & General (Unit Trust Managers) Limited: 119273 Legal & General (Portfolio Management Services) Limited: 146786 Legal & General Insurance Limited: 202050


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: how to display error messages from actions?

Posted by Su...@Keane.com.
Add following entry in your resource bundle 
errors.header = <ul>
errors.footer = </ul><hr>
errors.prefix=<li>
errors.suffix =</li>

Use <html:errors/> in your jsp page, it will display error in separate 
row.

hope it helps
Sunil



"Kanuri, Chand" <ch...@landg.com> 
11/21/2005 06:31 PM
Please respond to
"Struts Users Mailing List" <us...@struts.apache.org>


To
'Struts Users Mailing List' <us...@struts.apache.org>
cc

Subject
how to display error messages from actions?






hi all,
i am trying to display error messages.it works fine with the following
code(works for both form validation messages and messages from actions).
<logic:messagesPresent>
                 <div id="errorList">
                 <ul>
                                 <LI><html:errors /></LI>
                 </ul>
                 </div>
</logic:messagesPresent>

now i am trying to display the error messages each in a row

<logic:messagesPresent>
                 <div id="errorList">
                 <UL>
                                 <html:messages id="error">
                                                 <LI><bean:write 
name="error" /></LI>
                                 </html:messages>
                 </UL>
                 </div>
</logic:messagesPresent>

this works finr for form validation messages but fails with messages from
actions..

any ideas?it thows error 500
Error 500: ServletException in '/errors.jsp': Cannot find bean error in 
any
scope 

fails at
at
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.ja
va:923)

any ideas?

regards and thanks in advance


This e-mail (and any attachments) may contain privileged and/or 
confidential information. If you are not the intended recipient please do 
not disclose, copy, distribute, disseminate or take any action in reliance 
on it. If you have received this message in error please reply and tell us 
and then delete it. Should you wish to communicate with us by e-mail we 
cannot guarantee the security of any data outside our own computer 
systems. For the protection of Legal & General's systems and staff, 
incoming emails will be automatically scanned.

Any information contained in this message may be subject to applicable 
terms and conditions and must not be construed as giving investment advice 
within or outside the United Kingdom.

The following companies are subsidiary companies of the Legal & General 
Group Plc which are authorised and regulated by the Financial Services 
Authority for advising and arranging the products shown: Legal & General 
Partnership Services Limited (insurance and mortgages), Legal & General 
Insurance Limited (insurance), Legal & General Assurance Society Limited 
(life assurance, pensions and investments), Legal & General Unit Trust 
Managers Limited and Legal & General Portfolio Management Services Limited 
(investments).

They are registered in England under numbers shown.
The registered office is Temple Court, 11 Queen Victoria Street, London 
EC4N 4TP.

Legal & General Partnership Services Limited: 5045000 Legal & General 
Assurance Society Limited: 166055 Legal & General (Unit Trust Managers) 
Limited: 1009418 Legal & General (Portfolio Management Services) Limited: 
2457525 Legal & General Insurance Limited: 423930

They are registered with the Financial Services Authority under numbers 
shown. You can check this at www.fsa.gov.uk/register

Legal & General Partnership Services Limited: 300792 Legal & General 
Assurance Society Limited: 117659 Legal & General (Unit Trust Managers) 
Limited: 119273 Legal & General (Portfolio Management Services) Limited: 
146786 Legal & General Insurance Limited: 202050


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org