You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Lai Boon Hui <ba...@yahoo.com> on 2004/09/06 07:10:18 UTC
Message-resources parameter setting for struts 1.2
In struts 1.1, struts-confgi.xml we declare properties
file setting using:
<message-resources parameter="resources.application"/>
but in struts 1.2, it has become:
<message-resources parameter="MessageResources"/> as
seen in struts-blank.war. I tried to extract and
recompile and redeploy this war file and it didn't
work like the properties file is not recognized. It
only worked when i revert to struts 1.1 kind of
setting.
Is there a reason why struts 1.2 does things this way?
How can i make it work?
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Message-resources parameter setting for struts 1.2
Posted by Lai Boon Hui <ba...@yahoo.com>.
Thanks for the quick reply.
I am just curious why the struts-blank.war for struts
1.2 uses MessageResources at the message resource
setting when there is no MessageResource.properties
file inside the resources folder.
So is there a mistake there and that the resource
setting should have been resources.application instead
since there is only this file in the resources folder?
--- Michael McGrady <mi...@michaelmcgrady.com> wrote:
> Lai Boon Hui wrote:
>
> >I am just playing around with struts-blnak.war that
> >comes with all dist.
> >
>
> The reason that the references to resources works is
> that the references
> really refer to the files in question. Just any old
> name won't do. So,
> if you use a file name that is totally different
> from the file you are
> trying to reference, that won't work. This is not
> magic. I know you
> know that, but try to remember that there have to be
> connections between
> the things you are talking about. Do you
> understand? When resources
> are sought under /classes, they are sought in much
> the same way that
> CLASSPATH works under /classes, except there is a
> seeking. Try to
> figure out how resources are sought by the
> ClassLoader class.
>
> Michael
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
>
>
__________________________________
Do you Yahoo!?
Y! Messenger - Communicate in real time. Download now.
http://messenger.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Message-resources parameter setting for struts 1.2
Posted by Michael McGrady <mi...@michaelmcgrady.com>.
Lai Boon Hui wrote:
>I am just playing around with struts-blnak.war that
>comes with all dist.
>
The reason that the references to resources works is that the references
really refer to the files in question. Just any old name won't do. So,
if you use a file name that is totally different from the file you are
trying to reference, that won't work. This is not magic. I know you
know that, but try to remember that there have to be connections between
the things you are talking about. Do you understand? When resources
are sought under /classes, they are sought in much the same way that
CLASSPATH works under /classes, except there is a seeking. Try to
figure out how resources are sought by the ClassLoader class.
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Message-resources parameter setting for struts 1.2
Posted by Lai Boon Hui <ba...@yahoo.com>.
I am just playing around with struts-blnak.war that
comes with all dist.
The structure is like:
C:.
|---META-INF
|---pages
|---WEB-INF
|---classes
| |--resources
|---lib
|---src
|---java
|---resources
where application.properties file is in the resources
folder. Thus when you set
<message-resources parameter="resources.application"/>
the application recognizes the setting but not
<message-resources parameter="MessageResources"/>
--- Michael McGrady <mi...@michaelmcgrady.com> wrote:
> Lai Boon Hui wrote:
>
> >In struts 1.1, struts-confgi.xml we declare
> properties
> >file setting using:
> ><message-resources
> parameter="resources.application"/>
> >
> >but in struts 1.2, it has become:
> ><message-resources parameter="MessageResources"/>
> as
> >seen in struts-blank.war. I tried to extract and
> >recompile and redeploy this war file and it didn't
> >work like the properties file is not recognized. It
> >only worked when i revert to struts 1.1 kind of
> >setting.
> >
> >Is there a reason why struts 1.2 does things this
> way?
> >How can i make it work?
> >
> >
>
> Why don't you give us the name of your file, where
> it is located, and
> the actual code you have in the config file? Then,
> you can get an
> immediate answer, because that is all that is
> relevant, I think.
>
> Michael McGrady
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
>
>
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Message-resources parameter setting for struts 1.2
Posted by Michael McGrady <mi...@michaelmcgrady.com>.
Lai Boon Hui wrote:
>In struts 1.1, struts-confgi.xml we declare properties
>file setting using:
><message-resources parameter="resources.application"/>
>
>but in struts 1.2, it has become:
><message-resources parameter="MessageResources"/> as
>seen in struts-blank.war. I tried to extract and
>recompile and redeploy this war file and it didn't
>work like the properties file is not recognized. It
>only worked when i revert to struts 1.1 kind of
>setting.
>
>Is there a reason why struts 1.2 does things this way?
>How can i make it work?
>
>
Why don't you give us the name of your file, where it is located, and
the actual code you have in the config file? Then, you can get an
immediate answer, because that is all that is relevant, I think.
Michael McGrady
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org