A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Brian M Smith
Joined: Aug 13, 2009
Apr 07, 2011 12:26:46
I'm faced with a problem that I'm not sure how to get around. I'm hoping that I can accomplish this with
and not have to write any additional Java code.
Problem: I need to render different messages in a
from properties files based on struts module.
load the same JSP after performing some actions.
The JSP has a properties key in it catalog.tab.product
There are 2 struts config files defined in web.xml mod1_config.xml and mod2_config.xml which are mapped to the mod1 and mod2 struts modules.
mod1_config.xml contains a message-resource entry mapping to resources_mod1.properties.
mod2_config.xml contains a message-resource entry mapping to resources.properties.
resources_mod1.properties contains an entry catalog.tab.product=Product mod1
resources.properties contains an entry catalog.tab.product=Product default.
Now what I would expect to happen is when I visit
I should see the text "Product mod1" and when I visit
I should see "Product default". The problem is that no matter which URL/struts module I use I always end up seeing "Product default".
Is this behavior something that struts should support without customization?
Thanks in advance!
I agree. Here's the link:
subject: Overwritting message-resources
Hierarchical Organization of Struts Modules
Problem: Struts+Modules+jsps under WEB-INF
[struts] mapping actions in modules
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014