aspose file tools*
The moose likes Struts and the fly likes MessageResources.properties missing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "MessageResources.properties missing" Watch "MessageResources.properties missing" New topic
Author

MessageResources.properties missing

veronique alvaro
Greenhorn

Joined: Sep 05, 2003
Posts: 24
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

Joined: Mar 06, 2001
Posts: 1209
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

Joined: Sep 05, 2003
Posts: 24
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

Joined: Mar 06, 2001
Posts: 1209
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

Joined: Sep 05, 2003
Posts: 24
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?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: MessageResources.properties missing