Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MessageResources.properties missing

 
veronique alvaro
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
Using Struts exemples, I got the message error
javax.servlet.ServletException: Missing message for key "index.title"
It's seems that the MessageResources.properties is missing , and in fact all my C:\J2EE\Tomcat4\webapps\struts-example\WEB-INF\src\org\apache\struts\webapp\example directory is empty of classes. Everything is present except this. In Eclipse, the building of the application is successful, but probably the deployement isn't. How can't I fix it?
Thanks in advance
 
Karthik Guru
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by veronique alvaro:
hi
and in fact all my C:\J2EE\Tomcat4\webapps\struts-example\WEB-INF\src\org\apache\struts\webapp\example directory is empty of classes.

Why have yuo indicated the source folder here?. As far as my understanding goes, s'dnt the .properties file go into some folder under the classes directory?
W'd be nice if you could post the message-resources tag entry in your struts-config.xml file.
 
veronique alvaro
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have this in the struts-config.xml
<!-- ========== Message Resources Definitions =========================== -->
<message-resources parameter="org.apache.struts.webapp.example.ApplicationResources"/>
<message-resources key="alternate" parameter="org.apache.struts.webapp.example.AlternateApplicationResources"/>
and the error message I get is :
javax.servlet.ServletException: Missing message for key "index.title"
 
Karthik Guru
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by veronique alvaro:
I have this in the struts-config.xml
<!-- ========== Message Resources Definitions =========================== -->
<message-resources parameter="org.apache.struts.webapp.example.ApplicationResources"/>
<message-resources key="alternate" parameter="org.apache.struts.webapp.example.AlternateApplicationResources"/>
and the error message I get is :
javax.servlet.ServletException: Missing message for key "index.title"

this looks fine and hope you do have ApplicationResources.properties and AlternateApplicationResources.properties under
WEB-INF\classes\org\apache\struts\webapp\example
folder.
When do u actually see this error? when using it from within
bean:message tag?
do you specify the key ="alternate" when using the keys inside AlternateApplicationResources.properties
wait a minute! this looks so much like the example that ships with struts. Are you saying that example web app is not deploying?
 
veronique alvaro
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yep, I am trying to deploy struts-example from eclipse 2.1.0 to tomcat.
In Eclipse, it does fine the compile, .war file and deploy in tomcat webapp directory. Tomcat is running ok, but when I try to run the example application in tomcat, I get an error :
javax.servlet.ServletException: Missing message for key "index.title"
My web.xml file config seems ok :
<!-- Action Servlet Configuration -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml, /WEB-INF/struts-config-registration.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
Any clue?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic