• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Trouble in displaying error message using html:errors tag

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Have you defined


in your ErrMsg.properties file? Everything else seems to be right.
 
reply
    Bookmark Topic Watch Topic
  • New Topic