File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "logic:present & html:errors" Watch "logic:present & html:errors" New topic

logic:present & html:errors

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">
<html:errors property="XXX" />
</logic resent>
Thanks for good ideas
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15629

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.

Customer surveys are for companies who didn't pay proper attention to begin with.
I agree. Here's the link:
subject: logic:present & html:errors
Similar Threads
why this logic:present can't work?
Validate if a field is present
Newbie: how to get parameter
When to use logic:present tag
populating jsp page dynamically using form beans