wood burning stoves 2.0*
The moose likes Struts and the fly likes quick question on actionerror constructor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "quick question on actionerror constructor" Watch "quick question on actionerror constructor" New topic
Author

quick question on actionerror constructor

Tony Smith
Ranch Hand

Joined: Jul 07, 2007
Posts: 229
ActionError constructor takes a string symbolic key that maps to the value in resource bundle. What happens if the key can't be found in the resource bundle? Do you get error message?
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
The ActionError class has been deprecated, so don't use it. Use ActionMessage instead. In answer to your question, I believe that the error message will just be blank if there is no message with that key, and no exception is thrown.


Merrill
Consultant, Sima Solutions
Tony Smith
Ranch Hand

Joined: Jul 07, 2007
Posts: 229
Oh ok, thanks. Do you know the main reason why it's deprecated?
Michael Ku
Ranch Hand

Joined: Apr 20, 2002
Posts: 510
There was confusioin when using ActionErrors and ActionMessages, so now there is only one with an indicator as to whether you want an error or messge.

PS - in the later vertsions of Struts you can indicate whether or not you are using a key that will be used for lookup in the MessagResources files or using a String literal that you want used instead of a lookup value
 
wood burning stoves
 
subject: quick question on actionerror constructor