Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Newbie -Struts - Exception

 
Karthik Rajendiran
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)



MY WEB.XML



Kindly help me with doing the struts application.

Thanks in advance
Karthik R
 
David Dhune
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in struts-config file try to put (at the end, just before plug-ins)


<message-resources parameter="resources.ApplicationResources">

this is the path to your ApplicationResources.properties

Hope this helps
 
David Dhune
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also try with commenting the following from the web.xml


 
Karthik Rajendiran
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then Should i have to keep the properties file
name as applicationresources?

what does resources.applicationresources mean, i should keep in WEB-INF\classes directory
one directory called resources.
Inside that i should have my resourcebundle propertyfile.
What should be the name of the file
 
Karthik Rajendiran
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Atlast Found the Issue
The web.xml entry init param can be removed
at the same time, we need to give the message resources entry in struts config.xml and restart the tomcat
<message-resources parameter="resources.application"/>

make sure the resources folder exists in WEB-INF\classes folder.
and that folder has application.properties


web-inf/classes/
/resources
/application.properties
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic