This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Struts and the fly likes Trouble in displaying error message using html:errors tag Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "Trouble in displaying error message using html:errors tag" Watch "Trouble in displaying error message using html:errors tag" New topic
Author

Trouble in displaying error message using html:errors tag

mahesh gopi
Greenhorn

Joined: Dec 17, 2003
Posts: 1
Hi All,

I am a newbie as far as struts is concerned.
I am using weblogic 8.1 and struts 1.1 .

My problem is that when i am returning actionerrors from my validate method but the html:errors tag is not able to display my error mesages. It displays the key name with question marks which i believe happens when the struts is not able to pick the resource bundle.
The string displayed by JSp is like this -> ???en_US.xyz???

In the validate method of my action form class this is how i am setting the
action error where ae is an instance of ActionErrors

ae.add("abc",new ActionError("xyz"))

In the JSP i am using <html:errors /> to display all the error messages

In the Struts-config file i have configured the resource file by adding this
<message-resources parameter="ErrorMsg" null="false"/>

and i have placed ErrorMsg.properties inside web-inf/classes

please send in ur inputs on why this could be happening

regards and thanks
mahesh
M Murthy
Ranch Hand

Joined: Nov 20, 2004
Posts: 33
Hi,

Have you defined


in your ErrMsg.properties file? Everything else seems to be right.


Sindhu Murthy<br />SCJP 1.4<br />SCBCD
 
I agree. Here's the link: http://zeroturnaround.com/jrebel
 
subject: Trouble in displaying error message using html:errors tag
 
Similar Threads
ActionErrors (Struts)
Struts Validator not validating on the server-side
validate to check errors on jsp
Getting values from properties in validate-using multiple message-resources in struts
Action Form - ERROR_KEY & saveErrors