This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes Why does this exception happen? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Why does this exception happen?" Watch "Why does this exception happen?" New topic
Author

Why does this exception happen?

zohreh talebi
Ranch Hand

Joined: Sep 01, 2006
Posts: 41
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

Joined: Feb 15, 2005
Posts: 4864
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.


Merrill
Consultant, Sima Solutions
 
Don't get me started about those stupid light bulbs.
 
subject: Why does this exception happen?
 
Similar Threads
Hiberante transaction in Spring
Urgent !!! Entity bean JDBC connection Problem !!!
Reusing a font in a JSP
Phantom Read / Garbled Data for WAS 5 to DB2 7 OS390
Properties class