• 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
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Can't read from 'messages.properties' file

 
Ranch Hand
Posts: 88
IBM DB2 Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can any one please help me to find out my mistake? Down here I just want to implement a simple form validation (NotEmpty) for two fields only. And if fields are empty (either one or both), then error message will appear where those message(s) I want to set through my "mesages.properties" file. However, it is not working (not reading mesages.properties file) like the way I want

My codes are as folows:

a) web.xml

b) FormExample-servlet.xml

c) messages.properties

d) ProductController.java

e) ProductList.java

f) index.jsp

g) FormInput.jsp

h) FormOutput.jsp


Thanks
 
Faisal Fuad
Ranch Hand
Posts: 88
IBM DB2 Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did solve this problem as follows:

As in my "ProductController.java" I defined this following:

Therefore, in "messages.properties" file I did the following change (followed the right format):

and in "FormExample-servlet.xml" I did register the messages properties file as follows:

Honestly speaking, I did these same changes even before and tried many times but didn't work. And now it is 1 AM...
May be my lenovo needs to sleep and so did this little favor after this long

Anyway, will be glad if this post helps someone. Good Night
 
reply
    Bookmark Topic Watch Topic
  • New Topic