Reputation: 16147
How do I retrieve a single fielderror without any formatting?
I want just the plain text message without any formatting in a jsp is that possible?
This can be done in an action but how would I do this inside a jsp?
System.out.println(this.getFieldErrors().get("fileMissing"));
Upvotes: 5
Views: 2916
Reputation: 7836
You can use <s:fielderror />
in your jsp like this:
<s:fielderror fieldName="fileMissing"/>
Upvotes: 3
Reputation: 4732
If you are using JSTL you can do this
<c:out value="${fieldErrors['passwordError']}"/>
and for struts tag, you can do this
<s:property value="fieldErrors['fileMissing']"/>
Upvotes: 4