File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why does this exception happen?

 
zohreh talebi
Ranch Hand
Posts: 41
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic