This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Struts and the fly likes logic:present & html:errors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "logic:present & html:errors" Watch "logic:present & html:errors" New topic
Author

logic:present & html:errors

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Is there a possibility to print out only this part of my JSP if I added an error with key �sucheKunden�?
I tried it like below but it doesn�t work.
<logic resent name="org.apache.struts.action.ERROR" property="XXX" scope="request">
�blabla�
<html:errors property="XXX" />
�blabla�
</logic resent>
Thanks for good ideas
Andr�
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17033
    
  26

logic:errors is designed to display a collection of messages created by the Form Bean. I'm unclear as to what you want to happen.
If you're trying to test for something and display a message, use logic resent + bean:message.
If you're trying to test for errors and display a message, the easiest way to do it is to take advantage of the error headers and footers keys in the error collection.


An IDE is no substitute for an Intelligent Developer.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: logic:present & html:errors
 
It's not a secret anymore!