• 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

Why does this exception happen?

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tested login, register, ... form by a sample validation and it worked fine but when i set database properties in struts-config.xml , it gives this exception :

org.apache.jasper.JasperException : Exception in JSP: /LoginPage.jsp:24
24: <bean:message key = "login.password">

root cause:
javax.servlet.ServletException: Missing message for key "login.password"
......

Again if i remove those properties ,there would be no such exceptions.

I used <logic:messagesPresent> tag. Sometimes it works and sometimes not.

What should I do?

Thank you,
Zohreh
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What this message is telling you is that there is no entry in your ApplicationResources.properties file (or whatever name you called it in your struts-config.xml file) with a key of login.password. Add a message with this key and restart the server and it should work fine. If it still doesn't work, it's probably because you haven't configured your message resource bundle properly.

Also, it's important to understand that a logic:messagesPresent tag isn't going to be of any use here. This tag checks for the presence of an ActionMessages object in request scope that might contain error messages or other messages. It does not check for the existence of a key in the message resource bundle.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic