aspose file tools*
The moose likes Struts and the fly likes Error message from Action class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Error message from Action class" Watch "Error message from Action class" New topic
Author

Error message from Action class

Bhaskar Reddy
Ranch Hand

Joined: Dec 17, 2002
Posts: 52
Hi Folks,

I have two fields in a form - serialNo & activationCode.
I am doing the 'required' field check using ValidatorForm in my form bean. I do not have any problem in this. When user enters invalid "serialNo &/or activationCode", I need to display a specific error (in a div tag) that will be coming from my Action class.
I guess the way I am setting the error in Action Class and displaying it in JSP is not correct...

The relevant code is -


Please let me know where am I going wrong.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
In your logic:messagesPresent tag, specify property="entry.invalid" rather than name="entry.invalid".


Merrill
Consultant, Sima Solutions
Bhaskar Reddy
Ranch Hand

Joined: Dec 17, 2002
Posts: 52
It now worked!

Thank you again, Merrill !!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error message from Action class
 
Similar Threads
Which is Model and Controller in this example?
Global excpetion-getting print stack trace?
Struts newbie question - bean:message
WARNING: Unexpected error forwarding to login page
Struts 2: Custom display of error messages