File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes MessageResource error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "MessageResource error" Watch "MessageResource error" New topic

MessageResource error

krishna prasad gunasekaran
Ranch Hand

Joined: Jul 25, 2006
Posts: 158

<message-resources parameter="MessageResources" />
<message-resources key="test" parameter="TestMessageResources" null="false" /> is in /WEB-INF/classes.

form.firstName=First Name.
form.lastName=Last Name.
form.emailID=Email ID.

JSP files:

<bean:message bundle="test" key="form.firstName" />: <html:text property="firstName"/><br>
<bean:message bundle="test" key="form.lastName" />: <html:text property="lastName"/><br>
<bean:message bundle="test" key="form.emailID" /> : <html:text property="email"/><br>
<bean:message bundle="test" key="form.password" /> : <html:text property="password"/><br>

This is what i get

???en_US.form.emailID??? :
???en_US.form.password??? :

When I include the keys in MessageResources, the default file,and change my jsp, it works fine.

have a great day,
krishna prasad
I agree. Here's the link:
subject: MessageResource error
It's not a secret anymore!