aspose file tools*
The moose likes Struts and the fly likes Erros in Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Erros in Struts" Watch "Erros in Struts" New topic
Author

Erros in Struts

william kane
Ranch Hand

Joined: Nov 21, 2000
Posts: 260
Hi,
I have been reading abt using error management in struts.The ActionError object needs a mandatory key for the constructor.
This can be used only when i have resource bundles for an internationalized application.What if application need not be internationalized and doesnot have resource bundles for me to refer keys?How do i use the ActionError class to display errors?
Also what is the use of adding the attribute name of the actionForm as the property name for action errors class?
Ex.ActionErrors ae=new ActionErrors();
ae.add("inputVariable",new ActionError("xxx"));( here inputVariable is the property of the formBean that created the error)
Can I use any value for the first parameter of the add method?
Hope my queries are clear.
Thanks in advance.
William


Help me!Help you!!!
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

You should have a .properties file even if it is not an international app.
The first parameter can be named anything. It is only used when you specify on the tags in your jsps that you only want to display errors/messages of a certain type.


A good workman is known by his tools.
william kane
Ranch Hand

Joined: Nov 21, 2000
Posts: 260
Thanks Marc for the clarification
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Erros in Struts