Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Struts
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Ron McLeod
Paul Clapham
Tim Cooke
Devaka Cooray
Sheriffs:
Liutauras Vilda
paul wheaton
Rob Spoor
Saloon Keepers:
Tim Moores
Stephan van Hulst
Tim Holloway
Piet Souris
Mikalai Zaikin
Bartenders:
Carey Brown
Roland Mueller
Forum:
Struts
ActionMessages & logic:messagesPresent
Alessandro Ilardo
Ranch Hand
Posts: 218
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi there,
I can't display any error on the
jsp
. On a DispatchAction class I've the following method invoked by catch statements
private void reportException(HttpServletRequest request, ApplicationExceptionImpl ex){ ActionMessages errors = new ActionErrors(); ActionMessage msg = null; //define the user error and save it back if(ex instanceof EmailApplicationException) msg = new ActionMessage("errors.app", "Email"); if(ex instanceof UsernameApplicationException) msg = new ActionMessage("errors.app","Username"); if(ex instanceof PasswordApplicationException) msg = new ActionMessage("errors.app","Password"); if(msg!=null) { logger.debug("[reportException] save the message."); errors.add(ActionMessages.GLOBAL_MESSAGE,msg); } saveErrors(request,errors); }
and on my jsp
<logic:messagesPresent message="true"> <html:messages id="msg" message="true"> <bean:write name="msg"/> <br/> </html:messages> </logic:messagesPresent>
The logger correctly display my message but I still can't see anything.
Any suggestions?
trying to decode a woman mind....
Jaap v Hengstum
Greenhorn
Posts: 6
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
When iterating over messages saved with
saveErrors(...)
, the
message
attribute of the
logic:messagesPresent
and
html:messages
tags should be
false
.
If this attribute is
true
the tags will iterate over the messages saved with
saveMessages(...)
.
[ May 17, 2007: Message edited by: Jaap v Hengstum ]
Nick Williamson
Ranch Hand
Posts: 73
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
you could also just use the following tag:
<html:errors/>
Replace the word "snake" with "danger noodle" in all tiny ads.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
bean 'message' not found for html:messages tag
Issues with <html:messages >
ActionMessages?????????
Handling Messages (v1.2.9)
Re, Handling Error using ActionMessages
More...