You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Nadja Senoucci <Na...@zmnh.uni-hamburg.de> on 2003/07/29 12:29:30 UTC

MessageResource

Hello,

I have a question concerning the MessageResources. I would like to access
the (localised) messages within my application (not in the page getting
displayed but within my actually Java code) and I've looked up
MessageResource and MessageResourceFactory but I am still a bit confused as
to how to use it... Could someone please give me a simple example code? Or
point me to one?

All I need is to access the correct MessageResource file (depending on the
current local) and read out a few messages certain messages.

I'd greatly appreciate any kind of help.

Greetings,
Nadja

---------------------------------------------------------------------
Nadja  Senoucci
Universitaet Hamburg
Zentrum für Molekulare Neurobiologie
Service-Gruppe EDV
Falkenried 94
20251 Hamburg
Germany
Tel.:040 - 428 - 03 - 6619
Fax.:040 - 428 - 03 - 6621


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: MessageResource

Posted by Nadja Senoucci <Na...@zmnh.uni-hamburg.de>.
Hello,

>I am assuming you want to get at your bundle from within your action class,
>take a look at any of the actions that are there.

Ah, thank you! I actually didn't want to do it in an action class but I can
pass request object to the appropriate methods anyway.

Greetings,
Nadja

---------------------------------------------------------------------
Nadja  Senoucci
Universitaet Hamburg
Zentrum für Molekulare Neurobiologie
Service-Gruppe EDV
Falkenried 94
20251 Hamburg
Germany
Tel.:040 - 428 - 03 - 6619
Fax.:040 - 428 - 03 - 6621


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: MessageResource

Posted by James Mitchell <jm...@apache.org>.
I am assuming you want to get at your bundle from within your action class,
take a look at any of the actions that are there.

--
James Mitchell
Software Developer/Struts Evangelist
http://www.struts-atlanta.org
678-910-8017
AIM:jmitchtx


----- Original Message ----- 
From: "Nadja Senoucci" <Na...@zmnh.uni-hamburg.de>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, July 29, 2003 6:42 AM
Subject: Re: MessageResource


Hello,

>The struts-example application shows how to do this.  Did you take a look
at
>that yet?

Oh no, I forgot about it. I actually even forgot I *had* the example app in
the first place. Stupid me. ;) Thank you, but can you tell me in which of
the classes I can find that? There are quite a few... <starts searching>

Greetings,
Nadja

---------------------------------------------------------------------
Nadja  Senoucci
Universitaet Hamburg
Zentrum für Molekulare Neurobiologie
Service-Gruppe EDV
Falkenried 94
20251 Hamburg
Germany
Tel.:040 - 428 - 03 - 6619
Fax.:040 - 428 - 03 - 6621


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: MessageResource

Posted by Nadja Senoucci <Na...@zmnh.uni-hamburg.de>.
Hello,

>The struts-example application shows how to do this.  Did you take a look at
>that yet?

Oh no, I forgot about it. I actually even forgot I *had* the example app in
the first place. Stupid me. ;) Thank you, but can you tell me in which of
the classes I can find that? There are quite a few... <starts searching>

Greetings,
Nadja

---------------------------------------------------------------------
Nadja  Senoucci
Universitaet Hamburg
Zentrum für Molekulare Neurobiologie
Service-Gruppe EDV
Falkenried 94
20251 Hamburg
Germany
Tel.:040 - 428 - 03 - 6619
Fax.:040 - 428 - 03 - 6621


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: MessageResource

Posted by James Mitchell <jm...@apache.org>.
The struts-example application shows how to do this.  Did you take a look at
that yet?

--
James Mitchell
Software Developer/Struts Evangelist
http://www.struts-atlanta.org
678-910-8017
AIM:jmitchtx


----- Original Message ----- 
From: "Nadja Senoucci" <Na...@zmnh.uni-hamburg.de>
To: <st...@jakarta.apache.org>
Sent: Tuesday, July 29, 2003 6:29 AM
Subject: MessageResource


Hello,

I have a question concerning the MessageResources. I would like to access
the (localised) messages within my application (not in the page getting
displayed but within my actually Java code) and I've looked up
MessageResource and MessageResourceFactory but I am still a bit confused as
to how to use it... Could someone please give me a simple example code? Or
point me to one?

All I need is to access the correct MessageResource file (depending on the
current local) and read out a few messages certain messages.

I'd greatly appreciate any kind of help.

Greetings,
Nadja

---------------------------------------------------------------------
Nadja  Senoucci
Universitaet Hamburg
Zentrum für Molekulare Neurobiologie
Service-Gruppe EDV
Falkenried 94
20251 Hamburg
Germany
Tel.:040 - 428 - 03 - 6619
Fax.:040 - 428 - 03 - 6621


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org