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 MessageResources 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 "MessageResources" Watch "MessageResources" New topic
Author

MessageResources

Madhu Sudhana
Ranch Hand

Joined: Apr 16, 2006
Posts: 127
Hi Ranchers

I am working on a sample struts application

when I am trying to access MessageResources

I am getting this exception



javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:76)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)


entry in struts-config.xml

<message-resources className="org.apache.struts.action.ActionMessage" parameter="MessageResources"/>

I am using struts 1.2

can any body help me ...


"And the trouble is, if you don't risk anything, you risk even more." -- Erica Jong.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Remove className="org.apache.struts.action.ActionMessage" from your <message-resource> definition. It isn't necessary.

Also, make sure that the file MessageResources.properties exists in your /WEB-INF/classes directory.


Merrill
Consultant, Sima Solutions
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: MessageResources
 
Similar Threads
struts
problem in Struts Internationalization:Error 500:Cannot find message resources
problem with struts
For cracks only
problem in retriving the data from ArrayList using Struts bean:write tag