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

Stripes MissingResourceException

Vadim Vararu
Ranch Hand

Joined: Jan 03, 2009
Posts: 147
I just began to study Stripes and here is my first problem. I've put everything as it's written in the tutorial from their site and everything goes ok, but not
the Missing Resource problem:

Could not find an error message with any of the following keys: 'test.CalculatorActionBean.numberOne.valueNotPresent', 'test.CalculatorActionBean.numberOne.errorMessage', '/test/Calculator.action.numberOne.valueNotPresent', '/test/Calculator.action.numberOne.errorMessage', 'numberOne.valueNotPresent', 'numberOne.errorMessage', 'test.CalculatorActionBean.valueNotPresent'.test.CalculatorActionBean.errorMessage', '/test/Calculator.action.valueNotPresent', '/test/Calculator.action.errorMessage', 'validation.required.valueNotPresent'.

I can't understand what's wrong. I put default properties file in one of source packages of the application!


If you think you've done too much, usually it means you've done too few.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

I can't understand what's wrong. I put default properties file in one of source packages of the application!

Ok, but did you add the missing resource properties? test.CalculatorActionBean.numberOne.valueNotPresent is not a default key because it it specific to the example. So it will need to be added by you.


GenRocket - Experts at Building Test Data
Vadim Vararu
Ranch Hand

Joined: Jan 03, 2009
Posts: 147
No, i didn't! I've read that frameword uses next property if it does not find the more specific one. So, in the it should use the default one.
Frederic Daoud
author
Ranch Hand

Joined: May 22, 2008
Posts: 71
Vadim Vararu wrote:I can't understand what's wrong. I put default properties file in one of source packages of the application!


Actually, the StripesResources.properties file belongs on the classpath of the application: WEB-INF/classes.

Frederic Daoud
Author, Stripes...and Java Web Development is Fun Again
Stripes book
Vadim Vararu
Ranch Hand

Joined: Jan 03, 2009
Posts: 147
How could i set as welcome page, not a .jsp, but an action (that forwards to a jsp)?

I tried to put in web.xml welcome file an action:


so i have in the default package Default class that implement ActionBean and which has a default handler (which returns a forwardResolution to the .jsp a want), but this does not work.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Stripes MissingResourceException