Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cannot find message resources

 
saurav sarkar
Ranch Hand
Posts: 180
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
I have a new problem now.
i am getting javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE


Here is the exception



Please see my jsp and struts-config.xml



Struts-config.xml


Please help
 
Nakata kokuyo
Ranch Hand
Posts: 472
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi saurav ,

i guess you have miss out bundle attribute

assume you have a resource property file name = PagesResources.property in web-inf\classes folder



hope it help
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're using the default bundle, it is not necessary to specify a bundle attribute in a <bean:message> tag. Most likely the problem is that you haven't copied your MessageResources.properties file to the WEB-INF/classes/struts/example directory.
[ January 18, 2007: Message edited by: Merrill Higginson ]
 
saurav sarkar
Ranch Hand
Posts: 180
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the messagesresources.properties files under the required folder.Dont know why mu life is not easy with struts
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the messagesresources.properties files under the required folder


If you have a file named "messagesresources.properties" under the required folder, then that's the problem. What you need is a file named "MessageResources.properties", since that's what you declared in your struts-config.xml file.

If the file is named correctly, and you were just careless in your post, then I suspect that many of your problems with Struts stem from mixing artifacts from different versions. That's why I've been trying to convince you to re-download Struts and start with a fresh installation that you know is consistent.
[ January 18, 2007: Message edited by: Merrill Higginson ]
 
saurav sarkar
Ranch Hand
Posts: 180
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Merill,

Again i was careless in my post.You are absolutely right.
But the problem is i am unable to download struts versions.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic