On 03/08/2004 08:35 AM Billy Ng wrote:
Hi folks,
I need to get a value from the properties file. I can easily do it in action subclass with the getResource().getMessage() and in jsp with the bean:message tag. However, how I can it in a taglib?
MessageResources resources = (MessageResources)
Hi folks,
I need to get a value from the properties file. I can easily do it in action subclass
with the getResource().getMessage() and in jsp with the bean:message tag. However,
how I can it in a taglib?
Billy Ng
This mailbox protected
.
Does anyone have any suggestions?
It doesn't appear as though there is a MessageResource instance in the request.
When I dump the request, I get:
org.apache.struts.action.mapping.instance =
ActionConfig[path=/Login,forward=/jsp/login.jsp,scope=request
WntLogin = [EMAIL PROTECTED
=
(MessageResources) req.getAttribute(WntFramework);
I just get null for my resources reference.
Does anyone have any suggestions?
It doesn't appear as though there is a MessageResource instance in the request. When I dump the request, I get:
org.apache.struts.action.mapping.instance
I am wanting to do some special logging
of MessageResource requests based on what
page the user makes the request from.
I looked at subclassing MessageResources
and MessageResourcesFactory - but it looks like
that won't work because in the MessageResources
class you don't have a way to access
Part 1
On a jsp page I want to have a html:select of the type that has a
predefined
number of options, e.g. different sports. Now, I want to make use of
Struts
internalization where the differents locales text strings are retrieved
from
its locale properties file.
If I read the text strings from
You could use a single key with some sort of delimter:
sports.options=Football\Hockey\Badminton
and parse the key to create your options.
Paul
-Original Message-
From: Lars Bergstrm [mailto:[EMAIL PROTECTED]
Sent: 28 August 2003 12:25
To: [EMAIL PROTECTED]
Subject: MessageResource
-
From: James Mitchell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 19, 2003 4:31 AM
To: 'Struts Users Mailing List'
Subject: RE: bean:message , reads only once the message from
MessageResource, is it caching messages for later use?
Yes, it is true that it is cached. No, it is not configurable
-Original Message-
From: Seyhan BASMACI (Internet Yazilimlari Yetkilisi)
thanks James,
is it cause a performance problem calling formats.clear() for
each message ,
I'm not sure how much of a performance hit you would take. The
bottleneck in most applications is typically
We are using DB based Messages,
to do this we extended MessageResources class such as
/*public class MyMessageResources extends MessageResources implements
Serializable {
public String getMessage(Locale locale, String key) {
DAO class
MessageResource, is it caching messages for later use?
We are using DB based Messages,
to do this we extended MessageResources class such as
/*public class MyMessageResources extends
MessageResources implements Serializable {
public String getMessage
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
: 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
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
PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
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
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
Hello All,
I need to read the MessageResource object in my From class. How can I do it?
Alok Garg
[EMAIL PROTECTED]
Time is the most valuable thing a man can spend.
Hi, does anyone know how I can access value of a property from
MessageResource from one of my Action classes.
Cheers.
Anil
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
://www.apache.org/struts/
-Original Message-
From: Chonalal, Anil (Contractor) [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 27, 2003 11:42 AM
To: '[EMAIL PROTECTED]'
Subject: how to access value of a property from
MessageResource in Action class
Hi, does anyone know how I can access
Cheers.
-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]
Sent: 27 February 2003 16:47
To: 'Struts Users Mailing List'
Subject: RE: how to access value of a property from MessageResource in
Action class
The same way it's done in the example app that ships with struts
Unfortunately, this is one of the side-effects of each module having
it's own configuration. Your solution is sound and should work just
fine. Hopefully this will be streamlined before 1.1 final. There are
other ... features that arise from each module being wholly independent
I'm not to
Hi,
I'm utilizing the MessageResources class in a non-struts class.
Compiling it isn't an issue because the struts.jar is added in the
classpath. However when running on the servlet container i get the problem:
NoClassDefinitionFoundEror for org.apache.struts.util.MessageResources.
This problem
Hi,
Not directly.
You can use the keys in tiles-def.xml, and use these keys in your jsp
page to lookup the MessageResources file.
Cedric
Eric Chow wrote:
Hi,
Is it possible to use some dynamic message(defined in MessageResources) in
the tiles-def.xml ?
Some of the static values I
Hi,
Is it possible to use some dynamic message(defined in MessageResources) in
the tiles-def.xml ?
Some of the static values I want to use the message in the message
resources. This is useful in developing multi lingual application.
Eric
--
To unsubscribe, e-mail: mailto:[EMAIL
Hi,
no problem this time but a strategy question :
is it advisable to put large blocks of html code under one message resource
key ? Because sometimes you have styled text intermixed with bullets and you
consider this as one content block. I'm reticent to store html code in the
resource
Struts Newsgroup (@Basebeans.com) wrote:
can someone give me a hint, how i can access MessageResources (From
ApplicationResources.properties) within a Subclass of ActionForm???
My prpoblem is, the ActionForm does not know anything about the
ActionServlet, and so I have no Chance to get the
Internet Developer -- Manduca Management
(786)552-0504
[EMAIL PROTECTED]
AOL Instant Messenger: [EMAIL PROTECTED]
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 01, 2002 11:08 AM
To: Struts Users Mailing List
Subject: Re: Get MessageResource
Hi all,
I would like to access the Struts message resources from parts of my
application which are not servlet or JSP related, say in business components
or non-JSP presentation parts.
In an action or form I would do something like this:
MessageResources messages =
Hi,
I am trying to set the initial values of the parameters in a FormBean from
MessageResource. I called getServlet().getResources() in the bean
constructor method. However, getServlet() returned null. Do you have an idea
of why can't I get the servlet in the constructor? and how can get
29 matches
Mail list logo