Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Multipls message bundle resource error  RSS feed

 
Ranch Hand
Posts: 472
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi good day ,
i trying to setup 2 resource properties files, where i located it in web-inf\src\java

there are MessageResource.properties and PagesResources.properties,

and i have configure struts-config in this way



this is how PagesResources look like :


when i try display it out in jsp by using


it prompt me error "SEVERE: ServletException in '/pages/userrole/userrolesearch.jsp': Missing messag
e for key "userrole.search"
javax.servlet.ServletException: Missing message for key "userrole.search""

can someone spot out any error on this ?
thanks for enlighten
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your message resource files must be in WEB-INF/classes. It's fine if they are also in a source directory, but they must be copied to WEB-INF/classes when the web application is deployed.
 
Nakata kokuyo
Ranch Hand
Posts: 472
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Merrill Higginson , i check out the web-inf folder, the 2 properties file does exist ini WEB-INF\classes\java
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They should not be in WEB-INF/classes/java. They should be in WEB-INF/classes.
 
Nakata kokuyo
Ranch Hand
Posts: 472
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you Merrill Higginson for helping to solved my problem, you are great , it really caused by the location of properties file, that cause me figure out many hours , thanks again and have a nice day
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!