; can be
>> written as "'''{'0}''" or "'''{0}'''".
>
> I'd try some combinations of that; I recall having a similar issue at
> one point but don't remember what finally resolved it.
Thanks for the
I'd play with the MessageFormat Javadocs:
> Within a String, "''" represents a single quote. A QuotedString can contain
> arbitrary
> characters except single quotes; the surrounding single quotes are removed. An
> UnquotedString can contain arbitrary characters except single quotes and left
> c
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
All,
I've been using S1 for years to great satisfaction. Thanks!
I'm coming up against a problem that I think I can't get around, so I'm
posing it to the community to see if anyone can help.
We have a regular expression that we want to put into a pr
> I tried the simplest thing I could come up with, which was this:
>
> MessageResourcesFactory mrf = MessageResourcesFactory.createFactory();
> MessageResources mr = mrf.createResources("MyResources");
>
> This gives me two unique objects every time I execute the code
ad my own MessageResource objects on demand (say, when I have to
change a .properties file in production for some reason). I'd prefer to
avoid an app reload if possible.
I tried the simplest thing I could come up with, which was this:
MessageResourcesFactory mrf = MessageResourcesFactory.createFa
Martin Gainty wrote:
Should be located in struts-core
http://www.java2s.com/Code/Jar/Apache/Downloadstrutscore135jar.htm
As a side note, I don't think that's an official Apache mirror, and I
didn't see the signatures there--I couldn't recommend downloading it
from there.
http://www.up.ac.z
21 Jan 2009 18:18:06 -0800
> From: ee...@ncf.ca
> To: user@struts.apache.org
> Subject: s1: java.lang.NoClassDefFoundError MessageResources
>
>
> Hi,
>
> I have a Java class as a model which has a method taking a MessageResources
> as a parameter and returning a String
Hi,
I have a Java class as a model which has a method taking a MessageResources
as a parameter and returning a String loaded from a properties file using
the MessageResources. The model is created in Action.execute(). The project
can be compiled but when running it, we get
Hi,
I've just noticed that it's possible to format args in a
MessageResources' key (see
http://www.jguru.com/faq/view.jsp?EID=915891). I'm trying to do the
following:
In MessageResources.properties
label.mean=Nota mitjana: {0,number}
Then, in my JSP:
I get this error
[EMAIL PROTECTED] wrote:
Hello,
I'm developing a struts (1.2) application and wanted to add some administration
tasks. One that I'd like to have is the possibility to reload MessageResources.
I already defined my own MessageResourcesFactory and PropertyMessageResources
but I can
Hello,
I'm developing a struts (1.2) application and wanted to add some administration
tasks. One that I'd like to have is the possibility to reload MessageResources.
I already defined my own MessageResourcesFactory and PropertyMessageResources
but I can't figure out how to imple
Yip, that is what I ended up doing :).
I was just hoping there was a way to send the session into the
MessageResources as it would save me some time. Now I have to map our
language id's to locales, slight headache, but not the end of the world :).
Cheers,
Simon.
-Original Message-
Simon Pink wrote:
Hi there,
Nutshell version:
The problem is that I cannot seem to get access to the session from within
my MessageResources, so I cannot call my 'myWebSession.getLanguageId()'
method.
Explanation:
I need a MessageResources handler too solve two issues: 1) Pulling mes
Hi there,
Nutshell version:
The problem is that I cannot seem to get access to the session from within
my MessageResources, so I cannot call my 'myWebSession.getLanguageId()'
method.
Explanation:
I need a MessageResources handler too solve two issues: 1) Pulling messages
from a DB ta
Scott Van Wart wrote:
I'm implementing my own MessageResources and
MessageResourcesFactory-derived classes. Do these need to be
thread-safe, specifically, the 'String MessageResources.getMessage(
Locale locale, String key )'?
The factory probably doesn't; I would expect
I'm implementing my own MessageResources and
MessageResourcesFactory-derived classes. Do these need to be
thread-safe, specifically, the 'String MessageResources.getMessage(
Locale locale, String key )'?
Thanks,
Scott
-
On 6/13/06, Eric Rank <[EMAIL PROTECTED]> wrote:
I know that ApplicationResources and MessageResources do similar
things, but I'm confused about how to understand their individual
roles
1. What are the similarities and differences between MessageResources
and ApplicationResources
I know that ApplicationResources and MessageResources do similar
things, but I'm confused about how to understand their individual
roles
1. What are the similarities and differences between MessageResources
and ApplicationResources in a struts app?
2. What is the best way to specify t
the logic and use in your code
-Original Message-
From: Scott Van Wart [mailto:[EMAIL PROTECTED]
Sent: June 06, 2006 1:50 PM
To: user@struts.apache.org
Subject: Nesting MessageResources for parameter replacement.
In the default MessageResources.properties, it includes things
lik
In the default MessageResources.properties, it includes things like "{0}
is required." I'd like to use one of these, and replace {0} with
something _that is itself_ a key in the MessageResources.properties. I
tried something like this:
MessageResources.properties:
some.message={0} is my mess
Or if you just need a String value from the MessageResources you can
use:
String sValue = getResources(request).getMessage(locale, "key.value");
Gary
>>> [EMAIL PROTECTED] 5/18/2006 9:11:01 AM >>>
You would have to be more specific in your question. Do you mean
Actio
turn mapping.findForward("failure");
}
Harsh.
-Original Message-
From: fea jabi [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 18, 2006 8:57 AM
To: user@struts.apache.org
Subject: get message from MessageResources in Action Class
Using struts 1.2.7
How to get the messa
Using struts 1.2.7
How to get the message from MessageResource in the Action Class?
Thanks.
_
FREE pop-up blocking with the new MSN Toolbar get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
---
hi,
thank you very much your answer has been very helpful :)
ciao 4 now
Julian
> --- Ursprüngliche Nachricht ---
> Von: David Delbecq <[EMAIL PROTECTED]>
> An: Struts Users Mailing List
> Betreff: Re: Extracting MessageResources from Struts
> Datum: Mon, 24 Apr 2006 13:3
at how ressource bundles are used for i18n in the sun java
documentations http://java.sun.com/docs/books/tutorial/i18n/index.html
Please note basically the MessageResources is a front end to this
allowing configuration of ressources in struts xml configuration file.
Julian Tillmann a écrit :
>
don't want to destroy the
structure of the method-calls
and so I thought about Struts
MessageResources where I can use different language packages in form
of property files. So far so good,
but I don't want to add the whole struts to my framework but just the
MessageRessources-part and so
How do I get to a MessageResource bundle like I would with
Action.getResources() from the inside of my RequestProcessor or Plugin
implementation?
I assume from the moduleConfig, but I keep hitting dead ends in the API
javadocs.
TIA
---
At 5:15 PM +0200 10/10/05, Thomas Corte wrote:
Hi there,
I have a Struts plugin that needs to access the MessageResources of
my Struts application (to send out some internationalized mails).
However, neither the ActionServlet nor the ModuleConfig passed to
the PlugIn's init () method se
AIL PROTECTED]> wrote:
>
> Hi there,
>
> I have a Struts plugin that needs to access the MessageResources of my
> Struts application (to send out some internationalized mails).
> However, neither the ActionServlet nor the ModuleConfig passed to the
> PlugIn's
Hi there,
I have a Struts plugin that needs to access the MessageResources of my
Struts application (to send out some internationalized mails).
However, neither the ActionServlet nor the ModuleConfig passed to the
PlugIn's init () method seem to grant access to the MessageResources
the factory and implement
your own behavior which results in the placing into the
ServletContext the necessary MessageResources objects under the
correct keys.
When we work on fixing this in Struts own code, we want to steer
towards having an object which encapsulates the Module's resources
005 3:21 PM
> To: Struts Users Mailing List
> Subject: Re: Access to ServletContext from MessageResources[Factory]
>
> I agree with what Joe said.
>
> In the latest release (1.2.7) the only thing you get passed
> to the MessageResourcesFactory's create method is the
>
he point the Factory creates the
message resources. You would probably either need to make sure Spring was
initialized or store the ServletContext in the MessageResources.
That doesn't help you in the mean time - you could just let Struts create
the MessageResources and store them - then, afte
At 2:17 PM -0400 10/4/05, Chris Bredesen wrote:
Hi Group,
I'd like to create an implementation of MessageResources that is backed
by Spring-sourced database accessors. I can't seem to get ahold of
ServletContext form anywhere inside the MessageResources classes, and as
such I cannot
Hi Group,
I'd like to create an implementation of MessageResources that is backed
by Spring-sourced database accessors. I can't seem to get ahold of
ServletContext form anywhere inside the MessageResources classes, and as
such I cannot obtain my WebApplicationContext reference.
Sorry, that should be the first time the resource is *accessed* :-)
-Original Message-
From: Holshausen, Ron [mailto:[EMAIL PROTECTED]
Sent: 21 September 2005 19:01
To: Struts Users Mailing List
Subject: RE: MessageResources
Hi David,
Message resources are typically loaded by the class
rland, David [mailto:[EMAIL PROTECTED]
Sent: 21 September 2005 18:57
To: Struts Users Mailing List
Subject: MessageResources
When you create a MessageResources object is it getting the resources
from what was stored in memory on startup or directly from the file?
This e mail is from DLA Piper Rudnick
When you create a MessageResources object is it getting the resources
from what was stored in memory on startup or directly from the file?
This e mail is from DLA Piper Rudnick Gray Cary UK LLP.
The contents of this email and any attachments are confidential to the intended
recipient. They may
Thanks.
Dave Newton wrote:
> Mick Knutson wrote:
>
> >What is this used for though:
> >
> >
> >? I don't know what someOtherParam is for, or where it comes from.
> >
> >
> I believe that would be a parameter replacement for the resource?
>
> Like, say, in your case, if:
>
> label.default.title=Re
Mick Knutson wrote:
What is this used for though:
? I don't know what someOtherParam is for, or where it comes from.
I believe that would be a parameter replacement for the resource?
Like, say, in your case, if:
label.default.title=Replace {0} with the first parameter
then the ${someOth
What is this used for though:
? I don't know what someOtherParam is for, or where it comes from.
Wendy Smoak wrote:
> From: "Mick Knutson" <[EMAIL PROTECTED]>
>
> >I have the following tag in my defaultLayout:
> >
> >
> > and I want to show the label.default.title text from my
> > ApplicationR
From: "Mick Knutson" <[EMAIL PROTECTED]>
I have the following tag in my defaultLayout:
and I want to show the label.default.title text from my
ApplicationResources.properties file instead of my page showing:
"label.default.title"
How can I do this please?
Does this thread from last week hel
I just had the same questions answered:
http://marc.theaimsgroup.com/?t=11232885381&r=1&w=2
-Mark
> -Original Message-
> From: Mick Knutson [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 09, 2005 8:55 AM
> To: struts
> Subject: get MessageResources Key fro
I have the following tag in my defaultLayout:
and I want to show the label.default.title text from my
ApplicationResources.properties file instead of my page showing:
"label.default.title"
How can I do this please?
--
Thanks
Mick Knutson
(925) 951-4126
HP Consulting Services
Safeway (Blackhawk
Thank you for your advices. Following them I decided to resign from changing
encoding. Instead I have found an Eclipse plugin (Properties Editor which can
be
downloaded at http://eclipse-plugins.info) which allows easy edition of
properties files. It works fine and solves my problem.
Best reg
ewicz
Sent: Wednesday, August 03, 2005 2:28 PM
To: user@struts.apache.org
Subject: MessageResources file encoding
I'm unable to find an easy solution for my encoding problem with file
MessageResources.properties declared in struts-config.xml as:
File is encoded using ISO-8859-2 (Polish) while Strut
Hi Konrad,
It isn't even UTF, it's an older Java Properties file format:
http://java.sun.com/j2se/1.4.2/docs/api/java/util/Properties.html
You need to use native2ascii with something like
native2ascii -encoding ISO-8859-2 input.properties output.properties
it turns the non-ascii characters int
I'm unable to find an easy solution for my encoding problem with file
MessageResources.properties declared in struts-config.xml as:
File is encoded using ISO-8859-2 (Polish) while Struts interprets it as UTF. In
documentation I'm not able find any "encoding" property for this tag.
I, of cours
Hi all
Does somebody know if it's possible to get MessageResources diring
initialization of plugin?
I do some "global" initializations including reading some string from
resource file, so I need this resource "as early as possible"
Or maybe "global initializa
Is there any way to statically access fields from resources defined in
Struts?
In other words, I would to be able to access terms stored in properties
files without needing a ServletRequest. My application exists within a
servlet container, and utilizes Struts. However, I have processes
runn
At 12:51 PM -0400 4/22/05, Lukas Bradley wrote:
Is there any way to statically access fields from resources defined
in Struts?
Well, I have a solution.
String bundle = "common" ;
String key = "date" ;
MessageResources.getMessageResources(bundle).getMessage(Locale.EN, key);
This is very straightfor
At 12:34 PM -0400 4/22/05, Lukas Bradley wrote:
Is there any way to statically access fields from resources defined in Struts?
In other words, I would to be able to access terms stored in
properties files without needing a ServletRequest. My application
exists within a servlet container, and uti
Maybe a generic servlet style scheme similar to this:
web.xml
properties
/path/to/properties/file/webapp.properties
use servlet config instance at servlet init() to load (once):
props =
(Properties)config.getServletContext().getAttribute("webapp.properties");
then retriev
Search for org.apache.struts.util.MessageResources
I guess this should work:
MessageResourcesFactory messageFactory =
MessageResourcesFactory().createFactory();
MessageResources messages =
messageFactory.createResources();
Michael
On 4/22/05, Lukas Bradley <[EMAIL PROTECTED]>
Is there any way to statically access fields from resources defined in
Struts?
Well, I have a solution.
String bundle = "common" ;
String key = "date" ;
MessageResources.getMessageResources(bundle).getMessage(Locale.EN, key);
This is very straightforward.
So why does Struts prefer to store and acc
Niall Pemberton wrote:
I just committed a new feature (available now in the nightly build, coming
soon in 1.2.7 hopefully) where you can specify a message directly, so you
don't actually need message resources in the JSP. I don't know if that helps
you or not?
Yes; that's it exactly; a pint on m
I just committed a new feature (available now in the nightly build, coming
soon in 1.2.7 hopefully) where you can specify a message directly, so you
don't actually need message resources in the JSP. I don't know if that helps
you or not?
You simply construct an ActionMessage with the actual messag
Niall Pemberton wrote:
I believe you should be able to do this already, since you can define
different factories for different bundles. So you could have your regular
standard properties files, but then define a DB bundle with your own factory
as well.
Something like this in the struts-config.xml..
I believe you should be able to do this already, since you can define
different factories for different bundles. So you could have your regular
standard properties files, but then define a DB bundle with your own factory
as well.
Something like this in the struts-config.xml
Then you use th
Fogleson, Allen wrote:
I did a quick addition to the DB code to allow such things (but did not
check circularity.. the form where a child message includes a parent (or
itself).
Long story short is there any interest in this? I can have a quick patch
to the core source in bugzilla relatively quick
tch
combination.
-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 06, 2005 10:44 AM
To: Struts Users Mailing List
Subject: Re: MessageResources
Its not something I would want and it sounds like its over-complicating
the
situation.
You may want to see
EMAIL PROTECTED]>
Sent: Wednesday, April 06, 2005 4:18 PM
I know last week we had some discussions about MessageResources (mostly
about pulling from a DB). I did a little digging and extending and came
up with a quick hit that pulled the resources from a db. At the same
time I rememebered an earlier
I know last week we had some discussions about MessageResources (mostly
about pulling from a DB). I did a little digging and extending and came
up with a quick hit that pulled the resources from a db. At the same
time I rememebered an earlier discussion about having submessages in
messages. That
> That said, I don't know how you differentiate between
> messages and errors if you do that...
This two links on the Wiki explain a lot about ActionErrors and
ActionMessages usage...
http://wiki.apache.org/struts/ActionErrorsAndActionMessages?highlight=%28actionerrors%29
http://wiki.apache.org/
rs if you do that...
> -Original Message-
> From: Scott Purcell [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 28, 2005 5:08 PM
> To: Struts Users Mailing List; Hubert Rabago
> Subject: RE: MessageResources in ActionForm
>
>
> A follow up to this thread.
>
&g
How can I obtain a reference to a non-default MessageResources instance
from within the execute method of an ExceptionHandler?
The signature is:
public ActionForward execute(Exception e, ExceptionConfig config,
ActionMapping mapping, ActionForm form, HttpServletRequest request
-Original Message-
From: Hubert Rabago [mailto:[EMAIL PROTECTED]
Sent: Monday, March 28, 2005 2:10 PM
To: Struts Users Mailing List
Subject: Re: MessageResources in ActionForm
The API change occurred with the 1.1 release. With that release,
Action.MESSAGES_KEY was deprecated, as well as
t: Monday, March 28, 2005 1:51 PM
> To: Struts Users Mailing List; Hubert Rabago
> Subject: RE: MessageResources in ActionForm
>
>
> Is this an api change from 1.1? Does anyone know?
>
>
>
> -Original Message-
> From: Hubert Rabago [mailto:[EMAIL PROTECTED]
Is this an api change from 1.1? Does anyone know?
-Original Message-
From: Hubert Rabago [mailto:[EMAIL PROTECTED]
Sent: Monday, March 28, 2005 1:45 PM
To: Struts Users Mailing List
Subject: Re: MessageResources in ActionForm
Use Globals.MESSAGES_KEY .
On Mon, 28 Mar 2005 13:39:17
Use Globals.MESSAGES_KEY .
On Mon, 28 Mar 2005 13:39:17 -0600, Scott Purcell
<[EMAIL PROTECTED]> wrote:
> Hello,
> I am trying to obtain a MessageResources object in a ActionForm and I cannot
> figure out how.
>
> Prior to the new 1.2.4 struts I used this:
>
>
It's easy to confuse them, and I check their javadocs each time I use them.
Globals.MESSAGES_KEY gives you access to MessageResources specific to a module.
Globals.MESSAGE_KEY contains the ActionMessages for that request.
Globals.ERROR_KEY contains the ActionErrors for that request.
Huber
You might want to check Globals.MESSAGES_KEY
although this isn't how I understood the MessageResources to
work, I thought the ActionMessages was stored in the request
under the Global.MESSAGES_KEY and not the MessageResources...
anybody else?
> -Original Message-
> From: Sc
Hello,
I am trying to obtain a MessageResources object in a ActionForm and I cannot
figure out how.
Prior to the new 1.2.4 struts I used this:
MessageResources resources =
(MessageResources)req.getAttribute( Action.MESSAGES_KEY );
But it appears depreciated, or non existant in the
a line later in this manner:
MessageResources messages = getResources();
and access them I only get the texts of my default properties file but
not of my de-propertyfile.
Why?
Can please somebody tell me what went wrong and where I can get (webpage
etc.) an insight in
strut's modus operan
At 12:29 PM +0800 11/17/04, Eric Chow wrote:
Hello,
I implement a EJBMessageResource that extends Struts' MessageResources.
How can I reload the MessageResources after the application starts ???
Struts stores its MessageResources object in the ServletContext under
whatever key is specified
Hello,
I implement a EJBMessageResource that extends Struts' MessageResources.
How can I reload the MessageResources after the application starts ???
Best regards,
Eric
-
To unsubscribe, e-mail: [EMAIL PROTECTED
Struts uses java.util.ResourceBundle instances inside it's
MessageResources implementation. In particular, the most common
mechanism is to implicitly use PropertyResourceBundle instances that
take a properties file and turn it into a ResourceBundle. Therefore,
you must follow all the
Hi,
I have a struts based application which supports several locales (italian,
french, korean etc). There are different .properties files to accomplish
this. The respective .properties files of each language were translated
recently.
When I bring up the app in Korean, it seems like the strings
Bill,
Thanks for the pointer. I have already downloaded the source and have
extended Struts successfully many times. The MessageResources thing was
something I couldn't quite get my head around, so I figured I'd ask the
experts. Now I have the code, it didn't seem so compli
essage resources */
public String evaluateMessage(
String messageKey,
String bundle,
HttpServletRequest request,
ServletContext servletContext) {
// get the message resources
MessageResources resources;
if (bundle != null) {
r
;> > > * @param request the request being processed
> >> > > * @param servletContext the current [EMAIL PROTECTED] ServletContext}
> >> > > * @return the value of paramName from the message resources
> >> > > */
> >> > &
; * <message-resources> element for the
>> >> > > * resource bundle to use
>> >> > > * @param request the request being processed
>> >> > > * @param servletContext the current [EMAIL PROTECTED]
>> >
sources> element for the
> >> > > * resource bundle to use
> >> > > * @param request the request being processed
> >> > > * @param servletContext the current [EMAIL PROTECTED] ServletContext}
> >> > > * @return t
n the value of paramName from the message resources
> >> > */
> >> > public String evaluateMessage(
> >> > String messageKey,
> >> > String bundle,
> >> > HttpServletRequest request,
> >> >
* @param servletContext the current [EMAIL PROTECTED] ServletContext}
>> > > * @return the value of paramName from the message resources
>> > > */
>> > > public String evaluateMessage(
>> > > String messageKey,
>> >
*/
> > > public String evaluateMessage(
> > > String messageKey,
> > > String bundle,
> > > HttpServletRequest request,
> > > ServletContext servletContext) {
> > > // get the message resources
> > &
me from the message resources
>> > */
>> > public String evaluateMessage(
>> > String messageKey,
>> > String bundle,
>> > HttpServletRequest request,
>> > ServletContext s
from the message resources
> > */
> > public String evaluateMessage(
> > String messageKey,
> > String bundle,
> > HttpServletRequest request,
> > ServletContext servletContext) {
> > // get
ServletContext}
> * @return the value of paramName from the message resources
> */
> public String evaluateMessage(
> String messageKey,
> String bundle,
> HttpServletRequest request,
> ServletContext servletContext) {
bundle,
HttpServletRequest request,
ServletContext servletContext) {
// get the message resources
MessageResources resources;
if (bundle != null) {
resources = getResources(bundle, request, servletContext);
} else {
res
Hi,
I want my action to read a property from the MessageResources.properties
file in the same way that ActionMessages does. What's the simplest code I
can use to retreive a particular property's value?
Thanks in advance,
-
I've found it out! So simply and It wasnot clear to me!
I'm sorry for this question, since it is so easy:
When You specify additional resources, such
so You can sipmly access whole MessageResources class by for example in JSP:
So the key to access the whole class equals (is the sa
hould work, there's no problem probably in it. Only
think I can see on first view is, that this method is deprecated - this is
still not the biggest problem, but this will return only one message. What I
need more is to get whole MessageResources class.
But thanks for hint. This is usable in li
ED]
Sent: Friday, September 17, 2004 1:48 PM
To: [EMAIL PROTECTED]
Subject: Accesssing the multiple MessageResources
Hi there,
since I've been searching for answer for hours and nothing have found, I'd
like to ask You for help.
I'd like to define 2 (or more) MessageResources fil
Hi there,
since I've been searching for answer for hours and nothing have found, I'd
like to ask You for help.
I'd like to define 2 (or more) MessageResources files (two differents
bundles) by inserting into struts-config.xml this:
It's easy to access these message re
Look into using the fmt:setBundle tag.
Eric Chow wrote:
Hello,
In struts-conf.xml, we can define more than one Message Resources:
In JSTL, I have to add a for use
in
How can I defein JSTL to use Struts' message resources setting without
setting the context-param in web.xml ???
Eric
Hello,
In struts-conf.xml, we can define more than one Message Resources:
In JSTL, I have to add a for use
in
How can I defein JSTL to use Struts' message resources setting without
setting the context-param in web.xml ???
Eric
---
How do I obtain a MessageResources by name that I have configured in
struts-config.xml from outside of an Action class, where I have no
Struts object references to work with (in other words, starting with
some static method call)?
I tried using MessageResourcesFactory but I'm not havin
Yeah - I've reviewed that package but it doesn't appear to solve the real issue. The
getMessage() call in the OJBMessageResources class clears the cache of the
MessageResources class. That's fine, but as soon as you return the value back up to
MessageResources, it's go
http://sourceforge.net/project/showfiles.php?group_id=49385&package_id=76369
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
1 - 100 of 106 matches
Mail list logo