Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

custom error messages

 
Nicola Guy
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi i'm doing a basic log in application to learn how to use struts. and was just wondering if anyone could help me with this minor problem.

when logging in i have it set that if the user doesn't enter their username or password that the page is reloaded and an error message appears beside the missing field.

However the error message has "null" placed at the start and end of the message.

The actual text itself ie "Username is required" comes form a .properties file

any ideas

thanx in advance
 
Pankaj Narang
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guy

Check the .properties file in thet the message where you have writen "Username is required" check for the symbol like {0} if this present that means it take some parameters remove that and you will not get null then

Try this , may solve your problem
Best Regards
Pankaj
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic