RE: MessageResources and html help! (solved)

2004-01-19 Thread Khalid K.
Thanks for the clarification!

After I sent the message a little light bulb  came on and I realized
that I was using  to output the content, so I did turn on the
filter and it worked

Thanks!
p.s. I guess women are right when they say 'verbalize' your problem lol



> Actually those 2 methods should provide the same output.  This is from the 
> TagUtils.jsp, which is used in the  MessageResources resources =
> retrieveMessageResources(pageContext, bundle, false);
> ...
> message = resources.getMessage(userLocale, key);
> ...
> return message;
> 
> which is the same way you're describing retrieving the message in your 
> action.  I'm assuming you're problem is when you are outputting the message 
> in your jsp.  To confirm this, try outputting the message from your action. 
> 
> To fix your problem, if you're using  
> escapeXml and set it to false.  I believe  attribute, called filter.
> 
> -Ben
> 
> >From: "Khalid K." <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: Struts Users Mailing List <[EMAIL PROTECTED]>
> >Subject: MessageResources and html help!
> >Date: Mon, 19 Jan 2004 11:47:16 -0800
> >
> >Hello All,
> >
> >I use MessageResources to pull text from property files, but it doesn't
> >interpret the html tags. I do need to pull the text in the Action class.
> > recognizes and parses html tags but 
> >MessageResources.getMessage
> >just prints it out.   Any help is appreciated.
> >
> >example:
> >CompanyResources.properties
> >key1=HelloWorld
> >
> >Action:
> >msg = bundle.getMessage(locale, key1);
> >
> >jsp shows
> >HelloWorld
> >
> >instead of
> >Hello
> >World
> >
> >Thanks,
> >Khalid
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> _
> Let the new MSN Premium Internet Software make the most of your high-speed 
> experience. http://join.msn.com/?pgmarket=en-us&page=byoa/prem&ST=1
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
Khalid K.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: MessageResources and html help!

2004-01-19 Thread Ben Anderson
Actually those 2 methods should provide the same output.  This is from the 
TagUtils.jsp, which is used in the 
   MessageResources resources =
   retrieveMessageResources(pageContext, bundle, false);
   ...
   message = resources.getMessage(userLocale, key);
   ...
   return message;

which is the same way you're describing retrieving the message in your 
action.  I'm assuming you're problem is when you are outputting the message 
in your jsp.  To confirm this, try outputting the message from your action.  
To fix your problem, if you're using 

-Ben

From: "Khalid K." <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: MessageResources and html help!
Date: Mon, 19 Jan 2004 11:47:16 -0800
Hello All,

I use MessageResources to pull text from property files, but it doesn't
interpret the html tags. I do need to pull the text in the Action class.
 recognizes and parses html tags but 
MessageResources.getMessage
just prints it out.   Any help is appreciated.

example:
CompanyResources.properties
   key1=HelloWorld
Action:
msg = bundle.getMessage(locale, key1);
jsp shows
HelloWorld
instead of
Hello
World
Thanks,
Khalid
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Let the new MSN Premium Internet Software make the most of your high-speed 
experience. http://join.msn.com/?pgmarket=en-us&page=byoa/prem&ST=1

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: MessageResources in ActionForm

2003-11-25 Thread Frers Michael
Globals are in the struts.jar

org.apache.struts.Globals


Have a nice day

Michael

- Original Message -
From: "Honza Spurný" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, November 25, 2003 11:07 AM
Subject: Re: MessageResources in ActionForm


> Manish Singla wrote:
> > Hi
> >
> > Use following
> >
> > MessageResources mr = ((MessageResources)
> > request.getAttribute(Globals.MESSAGES_KEY));
>
>
> what is Globals ??? I've tried it, but my java compiler does not knows
it...
>
> >
> > Instaed of
> >
> >>  MessageResources mr = request.getMessageResources();
> >
> > HTH
> > Manish Singla
> >
> >
> >
> > Honza Spurný wrote:
> >> Hi there,
> >>
> >> I'm able to read values from MessageResources in JSP files. But in
> >> special case I need to read such values in java-classes.
> >> Unfortunatelly I need it in ActionForm in validate() method...
> >>
> >> To understand me I'm attaching my vision of how it could be very
> >> easy (it doesn't work):
> >>
> >> public ActionErrors validate(ActionMapping mapping,
> >> HttpServletRequest request){
> >>   MessageResources mr = request.getMessageResources();
> >>   ActionErrors errors = new ActionErrors();
> >>
> >>   if (anyReasonToFailValidation){
> >> errors.add("Error found", new ActionError("key.to.this.error",
> >> mr.getMessage("key.to.errorMessageParameter")));
> >>
> >>   return errors;
> >> }
> >>
> >> I think it's clear why I need to have an object of Messageresources
> >> in ValidatorForm.
> >>
> >> Please, could anybody help me?
> >>
> >> Thanks a lot.
> >> Sporak
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: MessageResources in ActionForm

2003-11-25 Thread Honza Spurný
Manish Singla wrote:
> Hi
>
> Use following
>
> MessageResources mr = ((MessageResources)
> request.getAttribute(Globals.MESSAGES_KEY));
   

what is Globals ??? I've tried it, but my java compiler does not knows it...

>
> Instaed of
>
>>  MessageResources mr = request.getMessageResources();
>
> HTH
> Manish Singla
>
>
>
> Honza Spurný wrote:
>> Hi there,
>>
>> I'm able to read values from MessageResources in JSP files. But in
>> special case I need to read such values in java-classes.
>> Unfortunatelly I need it in ActionForm in validate() method...
>>
>> To understand me I'm attaching my vision of how it could be very
>> easy (it doesn't work):
>>
>> public ActionErrors validate(ActionMapping mapping,
>> HttpServletRequest request){
>>   MessageResources mr = request.getMessageResources();
>>   ActionErrors errors = new ActionErrors();
>>
>>   if (anyReasonToFailValidation){
>> errors.add("Error found", new ActionError("key.to.this.error",
>> mr.getMessage("key.to.errorMessageParameter")));
>>
>>   return errors;
>> }
>>
>> I think it's clear why I need to have an object of Messageresources
>> in ValidatorForm.
>>
>> Please, could anybody help me?
>>
>> Thanks a lot.
>> Sporak
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: MessageResources in ActionForm

2003-11-25 Thread Honza Spurný
Manish Singla wrote:
> Hi
>
> Use following
>
> MessageResources mr = ((MessageResources)
> request.getAttribute(Globals.MESSAGES_KEY));
   

what is Globals ??? I've tried it, but my java compiler does not knows it...

>
> Instaed of
>
>>  MessageResources mr = request.getMessageResources();
>
> HTH
> Manish Singla
>
>
>
> Honza Spurný wrote:
>> Hi there,
>>
>> I'm able to read values from MessageResources in JSP files. But in
>> special case I need to read such values in java-classes.
>> Unfortunatelly I need it in ActionForm in validate() method...
>>
>> To understand me I'm attaching my vision of how it could be very
>> easy (it doesn't work):
>>
>> public ActionErrors validate(ActionMapping mapping,
>> HttpServletRequest request){
>>   MessageResources mr = request.getMessageResources();
>>   ActionErrors errors = new ActionErrors();
>>
>>   if (anyReasonToFailValidation){
>> errors.add("Error found", new ActionError("key.to.this.error",
>> mr.getMessage("key.to.errorMessageParameter")));
>>
>>   return errors;
>> }
>>
>> I think it's clear why I need to have an object of Messageresources
>> in ValidatorForm.
>>
>> Please, could anybody help me?
>>
>> Thanks a lot.
>> Sporak
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: MessageResources in ActionForm

2003-11-24 Thread Manish Singla
Hi

Use following

MessageResources mr = ((MessageResources) 
request.getAttribute(Globals.MESSAGES_KEY));

Instaed of

 MessageResources mr = request.getMessageResources();
HTH
Manish Singla


Honza Spurný wrote:
Hi there,

I'm able to read values from MessageResources in JSP files. But in special
case I need to read such values in java-classes. Unfortunatelly I need it in
ActionForm in validate() method...
To understand me I'm attaching my vision of how it could be very easy (it
doesn't work):
public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request){
  MessageResources mr = request.getMessageResources();
  ActionErrors errors = new ActionErrors();
  if (anyReasonToFailValidation){
errors.add("Error found", new ActionError("key.to.this.error",
mr.getMessage("key.to.errorMessageParameter")));
  return errors;
}
I think it's clear why I need to have an object of Messageresources in
ValidatorForm.
Please, could anybody help me?

Thanks a lot.
Sporak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
Thanks
Manish Singla
x73166
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: MessageResources...

2003-11-20 Thread Yee, Richard K,,DMDCWEST
Mitesh,
Globals.MESSAGE_KEY was added in Struts 1.1. I think you should add the
following code to one of your JSPs to see exactly what you are getting in
your request and session


  out.println("All Attributes in request scope:");

  Enumeration paramNames = request.getAttributeNames();
  while (paramNames.hasMoreElements()) {
String name = (String) paramNames.nextElement();
Object values = request.getAttribute(name);
out.println(" " + name + ":" + values);
  }

  out.println("All Attributes in session scope:");
  
  paramNames = session.getAttributeNames();
  while (paramNames.hasMoreElements()) {
String name = (String) paramNames.nextElement();
Object values = session.getAttribute(name);
out.println(" " + name + ":" + values);
  }

Also, there should be no dependencies between Struts 1.1 and BC4J so you
should be able to replace the Struts 1.1b2 jars you have with the released
ones.

ApplicationConfig is deprecated in Struts 1.1. You should look at using
ModuleConfig. 

-Richard

-Original Message-
From: Mitesh Patel [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 20, 2003 9:55 AM
To: 'Struts Users Mailing List'
Subject: RE: MessageResources...



Hi,

We are using it oracle BC4J :( I will be raising this with our oracle
consultant.

Anyway I have just managed to figure it out.

God knows how.

  ApplicationConfig AppConfig =
(ApplicationConfig)request.getAttribute(Action.APPLICATION_KEY);

  Resource_Bundle =
AppConfig.findMessageResourcesConfig(Action.MESSAGES_KEY).getParameter();

The question I have it will above not work with struts 1.2 etc (will it
be depreciated?)

Also I found that the MESSAGE_KEY does not exist in my request object

Mitesh

-Original Message-
From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 20, 2003 5:44 PM
To: 'Struts Users Mailing List'
Subject: RE: MessageResources...


Mitesh,
Why are you using a beta version when there is a released version available?

You can access the PageContext object and use methods on it to get the
objects that the Struts framework puts in your request object. Specifically,
you want the Globals.MESSAGE_KEY attribute.

This article describes everything you need to know:
http://javaboutique.internet.com/tutorials/excep_struts/index-3.html


Regards,

Richard

-Original Message-
From: Mitesh Patel [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 20, 2003 6:22 AM
To: '[EMAIL PROTECTED]'
Subject: MessageResources...


Hi,

Using Struts 1.1b2 

Is it possible to get the message-resource parameter in the struts-config
file from a customTag?

  

(Any examples would be much appreciated)

Thanks

Mitesh Patel


This email message is intended for the named recipient only and may be
privileged and/or confidential. If you are 
not the intended or named recipient or have received this email in error
then you should not copy, forward or 
disclose it to any other person. The views and opinions expressed in this
e-mail are those of the sender and 
may not represent the views and opinions of Misys Securities Trading
Systems. If you have received this email  in error you should destroy it or
contact postmaster [EMAIL PROTECTED] so that we may take appropriate action.

-



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

_
***
This message has been checked for all known viruses by the E-mail Virus
Protection service, powered by MessageLabs.
***

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: MessageResources...

2003-11-20 Thread Mitesh Patel

Hi,

We are using it oracle BC4J :( I will be raising this with our oracle
consultant.

Anyway I have just managed to figure it out.

God knows how.

  ApplicationConfig AppConfig =
(ApplicationConfig)request.getAttribute(Action.APPLICATION_KEY);

  Resource_Bundle =
AppConfig.findMessageResourcesConfig(Action.MESSAGES_KEY).getParameter();

The question I have it will above not work with struts 1.2 etc (will it
be depreciated?)

Also I found that the MESSAGE_KEY does not exist in my request object

Mitesh

-Original Message-
From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 20, 2003 5:44 PM
To: 'Struts Users Mailing List'
Subject: RE: MessageResources...


Mitesh,
Why are you using a beta version when there is a released version available?

You can access the PageContext object and use methods on it to get the
objects that the Struts framework puts in your request object. Specifically,
you want the Globals.MESSAGE_KEY attribute.

This article describes everything you need to know:
http://javaboutique.internet.com/tutorials/excep_struts/index-3.html


Regards,

Richard

-Original Message-
From: Mitesh Patel [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 20, 2003 6:22 AM
To: '[EMAIL PROTECTED]'
Subject: MessageResources...


Hi,

Using Struts 1.1b2 

Is it possible to get the message-resource parameter in the struts-config
file from a customTag?

  

(Any examples would be much appreciated)

Thanks

Mitesh Patel


This email message is intended for the named recipient only and may be
privileged and/or confidential. If you are 
not the intended or named recipient or have received this email in error
then you should not copy, forward or 
disclose it to any other person. The views and opinions expressed in this
e-mail are those of the sender and 
may not represent the views and opinions of Misys Securities Trading
Systems. If you have received this email  in error you should destroy it or
contact postmaster [EMAIL PROTECTED] so that we may take appropriate action.

-



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

_
***
This message has been checked for all known viruses by the
E-mail Virus Protection service, powered by MessageLabs.
***

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: MessageResources...

2003-11-20 Thread Yee, Richard K,,DMDCWEST
Mitesh,
Why are you using a beta version when there is a released version available?

You can access the PageContext object and use methods on it to get the
objects that the Struts framework puts in your request object. Specifically,
you want the Globals.MESSAGE_KEY attribute.

This article describes everything you need to know:
http://javaboutique.internet.com/tutorials/excep_struts/index-3.html


Regards,

Richard

-Original Message-
From: Mitesh Patel [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 20, 2003 6:22 AM
To: '[EMAIL PROTECTED]'
Subject: MessageResources...


Hi,

Using Struts 1.1b2 

Is it possible to get the message-resource parameter in the struts-config
file from a customTag?

  

(Any examples would be much appreciated)

Thanks

Mitesh Patel


This email message is intended for the named recipient only and may be
privileged and/or confidential. If you are 
not the intended or named recipient or have received this email in error
then you should not copy, forward or 
disclose it to any other person. The views and opinions expressed in this
e-mail are those of the sender and 
may not represent the views and opinions of Misys Securities Trading
Systems. If you have received this email  in error you should destroy it or
contact postmaster [EMAIL PROTECTED] so that we may take appropriate action.

-



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: MessageResources...

2003-11-20 Thread Edgar P Dollin
A brute force approach is to loop through the context objects looking for
ActionMessages or ActionError objects which contain the key you are looking
for.  Of course, once you have it, just put the key somewhere for future
reference.

Edgar


> -Original Message-
> From: Mitesh Patel [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, November 20, 2003 9:22 AM
> To: '[EMAIL PROTECTED]'
> Subject: MessageResources...
> 
> 
> Hi,
> 
> Using Struts 1.1b2 
> 
> Is it possible to get the message-resource parameter in the 
> struts-config file from a customTag?
> 
>parameter="com.misys.sts.ms.customiser.utils.ApplicationResources" />
> 
> (Any examples would be much appreciated)
> 
> Thanks
> 
> Mitesh Patel
> --
> --
> 
> This email message is intended for the named recipient only 
> and may be privileged and/or confidential. If you are 
> not the intended or named recipient or have received this 
> email in error then you should not copy, forward or 
> disclose it to any other person. The views and opinions 
> expressed in this e-mail are those of the sender and 
> may not represent the views and opinions of Misys Securities 
> Trading Systems. If you have received this email  in error 
> you should destroy it or contact postmaster [EMAIL PROTECTED] so 
> that we may take appropriate action.
> --
> --
> -
> 
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: MessageResources...

2003-11-20 Thread Mitesh Patel
Hi,

Sorry, I have been trying to get hold of the message-resource parameter
(e.g.com.misys.sts.ms.customiser.utils.ApplicationResources) when running 
from java class (which is part of a customTag).

The reason for this is because the customTag will be accessed by two Web 
Projects and therefore I need know/find out which ApplicationResource to
use.

any clearer?

Thanks

Mitesh


-Original Message-
From: Nick Heudecker [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 20, 2003 2:49 PM
To: Struts Users Mailing List
Subject: Re: MessageResources...


I'm not clear on what you want to do.  Do you want the name of the resources
file?

On Thu, Nov 20, 2003 at 02:22:04PM -, Mitesh Patel wrote:
> Hi,
> 
> Using Struts 1.1b2 
> 
> Is it possible to get the message-resource parameter in the struts-config
> file from a customTag?
> 
>parameter="com.misys.sts.ms.customiser.utils.ApplicationResources" />
> 
> (Any examples would be much appreciated)
> 
> Thanks
> 
> Mitesh Patel
>

> 
> This email message is intended for the named recipient only and may be
> privileged and/or confidential. If you are 
> not the intended or named recipient or have received this email in error
> then you should not copy, forward or 
> disclose it to any other person. The views and opinions expressed in this
> e-mail are those of the sender and 
> may not represent the views and opinions of Misys Securities Trading
> Systems. If you have received this email
>  in error you should destroy it or contact postmaster [EMAIL PROTECTED] so
that
> we may take appropriate action.
>

> -
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Nick Heudecker
SystemMobile, Inc.
Email: [EMAIL PROTECTED]
Web: http://www.systemmobile.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

_
***
This message has been checked for all known viruses by the
E-mail Virus Protection service, powered by MessageLabs.
***

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: MessageResources...

2003-11-20 Thread Nick Heudecker
I'm not clear on what you want to do.  Do you want the name of the resources file?

On Thu, Nov 20, 2003 at 02:22:04PM -, Mitesh Patel wrote:
> Hi,
> 
> Using Struts 1.1b2 
> 
> Is it possible to get the message-resource parameter in the struts-config
> file from a customTag?
> 
>parameter="com.misys.sts.ms.customiser.utils.ApplicationResources" />
> 
> (Any examples would be much appreciated)
> 
> Thanks
> 
> Mitesh Patel
> 
> 
> This email message is intended for the named recipient only and may be
> privileged and/or confidential. If you are 
> not the intended or named recipient or have received this email in error
> then you should not copy, forward or 
> disclose it to any other person. The views and opinions expressed in this
> e-mail are those of the sender and 
> may not represent the views and opinions of Misys Securities Trading
> Systems. If you have received this email
>  in error you should destroy it or contact postmaster [EMAIL PROTECTED] so that
> we may take appropriate action.
> 
> -
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Nick Heudecker
SystemMobile, Inc.
Email: [EMAIL PROTECTED]
Web: http://www.systemmobile.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: MessageResources problem ?

2003-03-28 Thread Simon Kelly
You should really have the bundles named like this.

myresource
myresource_de (Germany)
myresourse_ko (Korea)
etc

One of the struts book will have a good line on this, or the i18n page at
the main web site.

Cheers

Simon
- Original Message -
From: "Eric Chow" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, March 28, 2003 11:30 AM
Subject: MessageResources problem ?


Hello,

For use multiple message-resources,

I set the following in struts-config.xml





Right?  The "eric.mymessage" is use by default.


Anyway, If I want to retrieve the default(eric.mymessage) in some area, such
as ActionForm or Actions.

I will use the following statement to get the MessageResources that store in
the REQUEST.


=
MessageResources messages =
(MessageResources)request.getAttribute(Globals.MESSAGES_KEY);

=

But the above statement will only return the default message resources.

How can I get the MesageResource of the bundle "country" ?



Best regards,
Eric





==
If you know what you are doing,
it is not called RESEARCH!
==


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: MessageResources question...

2003-01-20 Thread David Graham
MessageResources should not be used outside of the web tier.  I'm not sure 
where that code was used though.  You could define a context parameter or 
servlet init parameter that held the name of your resource bundle instead of 
hardcoding.

David






From: "Damm, Gary" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: MessageResources question...
Date: Mon, 20 Jan 2003 15:37:35 -0800

I'd like to be able to identify the message resources based on the
ServletRequest.  Is there a hook I can use to get the current
MessageResources based on the ServletRequest?  The class I'm using only
has hooks into the ServletRequest and not and struts specific objects.

I believe I can do the following but I'd like to avoid hard coding the
resource name:

...
MessageResources resources =
MessageResourcesFactory.getResources("MyResourceName");
...

Any help appreciated.

Gary

--
To unsubscribe, e-mail:   

For additional commands, e-mail: 



_
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE* 
http://join.msn.com/?page=features/virus


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Re: [MessageResources] - in my Action: getResources(request) returns null

2002-10-03 Thread Alex Birch

it's in WEB-INF/classes

called ApplicationResources.properties

it works when I use  so I know it's loaded ok

it also works when I call the deprecated getResources()...
just when I add the request param or the request and key param I get null

but getResources is deprecated so I don't want to use that!

Alex


 --- Thomas Eichberger <[EMAIL PROTECTED]> wrote: > What's the name of the properties 
file? Let's
say 
> ApplicationResources.properties
> 
> This file has to be placed in the web-inf/classes directory.
> 
> 
> 
> At 08:10 03.10.2002 +0100, Alex Birch wrote:
> >Hi,
> >
> >I can't find the answer to this anywhere but apologies if I missed 
> >something obvious
> >
> >I have the default ApplicationResources.properties in my web.xml
> >
> >in my action class, I've tried:
> >
> >MessageResources messages = getResources(request); // returns null
> >MessageResources messages = getResources(request, Action.MESSAGES_KEY); // 
> >returns null
> >MessageResources messages = getResources(request, "application"); // 
> >returns null
> >MessageResources messages = getResources(request, "ApplicationResources"); 
> >// returns null
> >
> >however, the deprecated
> >MessageResources messages = getResources();
> >returns what I want!
> >
> >is this a bug or am I doing something wrong?
> >
> >thanks in advance
> >
> >Alex
> >
> >
> >__
> >Do You Yahoo!?
> >Everything you'll ever need on one web page
> >from News and Sport to Email and Music Charts
> >http://uk.my.yahoo.com
> >
> >--
> >To unsubscribe, e-mail:   
> >For additional commands, e-mail: 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
>  

__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [MessageResources] - in my Action: getResources(request) returns null

2002-10-02 Thread Thomas Eichberger

What's the name of the properties file? Let's say 
ApplicationResources.properties

This file has to be placed in the web-inf/classes directory.



At 08:10 03.10.2002 +0100, Alex Birch wrote:
>Hi,
>
>I can't find the answer to this anywhere but apologies if I missed 
>something obvious
>
>I have the default ApplicationResources.properties in my web.xml
>
>in my action class, I've tried:
>
>MessageResources messages = getResources(request); // returns null
>MessageResources messages = getResources(request, Action.MESSAGES_KEY); // 
>returns null
>MessageResources messages = getResources(request, "application"); // 
>returns null
>MessageResources messages = getResources(request, "ApplicationResources"); 
>// returns null
>
>however, the deprecated
>MessageResources messages = getResources();
>returns what I want!
>
>is this a bug or am I doing something wrong?
>
>thanks in advance
>
>Alex
>
>
>__
>Do You Yahoo!?
>Everything you'll ever need on one web page
>from News and Sport to Email and Music Charts
>http://uk.my.yahoo.com
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [MessageResources] URGENT!!! Dynamic parameters in App Resources for error handling

2002-08-31 Thread James Mitchell

> -Original Message-
> From: Tarun Sainanee [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, August 31, 2002 11:05 AM
>
> Hi all,
> I have been pretty happy using struts 1.0.2 for some time now. But now i
> have a problem. Please help.
>
> I know that we can use parameterized messages in the App Resources file
> for error messages. Depending on the no of parameters i can have an
> errors.add() method pass the parameters.
> But the problem is that i do not know in advance how many
> parameters i may
> need to pass? Any workaround guys?

Instead of using getMessage(key, arg0, arg1, etc, etc

use getMessage(key, args[])


>
> Also is there a way that i can access the message in App Resources File
> and modify it at runtime???


The default implementation of MessageResources (PropertyMessageResources)
does not provide for any way to manipulate the underlying HashMap at
runtime.

However, I guess you could hack around this with your own implementation
(not recommended).  Myself and a few others are looking at creating a
JDBCMessageResources that will probably provide a reload method.  So, I
guess, in a way that would allow someone to modify at runtime.


>
> Pointers to a working code would be excellent.
>
>
> Regards,
> Tarun Sainanee
> TCS Delhi


Hope that helps

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://www.open-tools.org/struts-atlanta


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: MessageResources from ActionForm

2002-07-25 Thread Leblon Jean-marc

Hello,
   try HttpServletRequest.getParameter("key") 


JML
[EMAIL PROTECTED]





-Original Message-
From: David Wood [mailto:[EMAIL PROTECTED]] 
Sent: jeudi 25 juillet 2002 16:20
To: Struts Users Mailing List
Subject: MessageResources from ActionForm


I saw some posts with this question, but no answer.

How do you access the MessageResources from within an ActionForm, 
specifically from the validate method?
I need to test the value of a button that was submitted, but the value 
is localized in the messages.  I can test for this from the Action 
easily enough, but how do I do the same from the ActionForm.

Thanks

-- dave


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

Visit our website! http://www.nbb.be

"DISCLAIMER: The content of this e-mail message should not be constructed as binding 
for the National Bank of Belgium (NBB) unless otherwise and previously stated.
Besides, the opinions expressed in this message are solely those of the author and do 
not necessarily represent those of the NBB, which is particularly the case if the 
content of the present message, or part of it, is of a private nature or does not come 
whithin the professional scope of the author."








--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: MessageResources from ActionForm

2002-07-25 Thread Jon.Ridgway

Hi Dave,

Try getServlet().getResources().getMessage();
Or getServlet().getResources().getMessage(, );

Jon Ridgway


-Original Message-
From: David Wood [mailto:[EMAIL PROTECTED]] 
Sent: 25 July 2002 15:20
To: Struts Users Mailing List
Subject: MessageResources from ActionForm

I saw some posts with this question, but no answer.

How do you access the MessageResources from within an ActionForm, 
specifically from the validate method?
I need to test the value of a button that was submitted, but the value 
is localized in the messages.  I can test for this from the Action 
easily enough, but how do I do the same from the ActionForm.

Thanks

-- dave


--
To unsubscribe, e-mail:

For additional commands, e-mail:



The contents of this email are intended only for the named addressees and
may contain confidential and/or privileged material. If received in error
please contact UPCO on +44 (0) 113 201 0600 and then delete the entire
e-mail from your system. Unauthorised review, distribution, disclosure or
other use of this information could constitute a breach of confidence. Your
co-operation in this matter is greatly appreciated. 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: MessageResources problem under JBoss 3.0

2002-07-10 Thread Brian Topping

For the record, it turns out that the problem was related to a struts form
from my web war being found in my ejb jar.  This played tricks on the mind of
the UCL, having it look in the wrong jar for the properties.  

Be very careful about keeping your web and ejb classes exclusively in one or
the other if you are seeing problems like this.

Thanks to everyone that posted something on this.

best,

-b

> -Original Message-
> From: Brian Topping 
> Sent: Monday, July 08, 2002 5:49 PM
> To: [EMAIL PROTECTED]
> Subject: MessageResources problem under JBoss 3.0
> 
> 
> Hiyas,
> 
> I'm looking at a classloader problem with JBoss 3 and Struts 
> 1.1B1.  It would
> appear that this is the source of problems in loading 
> properties files for
> struts users on JBoss.
> 
> If there is anyone out there that is using JBoss 3, can you 
> comment on your
> ability to load or not load properties files correctly, for 
> instance in
> conjunction with ActionErrors?
> 
> My environment:
> 
> JBoss 3.0.1RC1_tomcat4.0.4 (same problem with JBoss 3 release)
> W2KSP2
> JDK 1.3.1_02
> Struts 1.1B1
> 
> Standard deployment of Struts of course is to have a 
> struts.jar in the deploy
> dir, next to the app.war file for the actual application.  
> app.war has no
> problem loading classes or resources out of the struts.jar file.  
> 
> I've dug into MessageResources.getMessage(), and it's getting 
> a resource
> stream with 
> 'this.getClass().getClassLoader().getResourceAsStream(name)'.
> The caller is a utility method inside struts.jar, not the 
> app.jar.  Like I
> said, the call works fine for properties files that are in 
> the struts.jar,
> but fails for properties that are in the app.war file.  
> 
> This is a major issue, since properties files that are listed in
>  can't be loaded.  I presume that it 
> works standalone
> tomcat just fine, otherwise someone else would have noticed ;)
> 
> I'm suspecting incompatibility with JBoss Unified Class 
> Loader -- I believe
> different jars mean these are different classloaders, so
> 'this.getClassLoader()' gets the wrong classloader.  Either 
> there is an
> implementation problem with JBoss -- that the UCL isn't 
> following the proper
> semantics of getResource(), or Struts is pushing the edge of 
> the semantics.  
> 
> Any thoughts on this?
> 
> *any* help appreciated...
> 
> best,
> 
> -b
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: MessageResources problem under JBoss 3.0

2002-07-08 Thread Brian Topping

> From: Martin Cooper 
> Subject: RE: MessageResources problem under JBoss 3.0 
> Date: Mon, 08 Jul 2002 15:18:56 -0700 
> 
>
-
---
> 
> > -Original Message-
> > From: Brian Topping [mailto:[EMAIL PROTECTED]]
> > Subject: MessageResources problem under JBoss 3.0
> > 
> > Standard deployment of Struts of course is to have a 
> > struts.jar in the deploy
> > dir, next to the app.war file for the actual application.  
> > app.war has no
> > problem loading classes or resources out of the struts.jar file.  
> 
> Actually, no. Standard deployment is to have struts.jar *inside* your web
> app, in WEB-INF/lib. If you check the examples that come with Struts,
you'll
> see that each web app has a copy of struts.jar inside it. If you don't do
> this, you'll certainly run the likelihood of classloader problems.
> 

Ooh, okay, good call, thanks Martin.  I changed this on recommendation from
Ishikawa-san...
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg34095.html.
This solved one of my bigger classloading problems.  

But now I am back to the original problem, exception as i load the servlet,
see below.  

So I'm kinda stuck btw a rock and a hard place ;)

Ideas?

best,

-b

21:02:13,590 INFO  [RequestProcessor] Processing a 'GET' for path
'/editRegistration'
21:02:13,750 ERROR [RequestUtils] Error creating form bean of class
com.bill2.ejb.CustomerFullForm
java.lang.NoClassDefFoundError: org/apache/struts/action/ActionForm
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:493)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at
org.jboss.mx.loading.UnifiedClassLoader.findClass(UnifiedClassLoader.java:226
)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at
org.jboss.mx.loading.UnifiedClassLoader.loadClassLocally(UnifiedClassLoader.j
ava:234)
at
org.jboss.mx.loading.UnifiedLoaderRepository.loadClassFromRepository(UnifiedL
oaderRepository.java:507)
at
org.jboss.mx.loading.UnifiedLoaderRepository.loadClass(UnifiedLoaderRepositor
y.java:179)
at
org.jboss.mx.loading.UnifiedClassLoader.loadClass(UnifiedClassLoader.java:283
)
at java.lang.ClassLoader.loadClass(ClassLoader.java:292)
at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:553)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java
:1355)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java
:1254)
at
org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:190)
at
org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:216
)
at
org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:610)
at
org.apache.struts.action.RequestProcessor.processActionForm(RequestProcessor.
java:349)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:243)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:452)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

21:02:13,770 DEBUG [RequestProcessor]  Looking for Action instance for class
com.bill2.site.controller.EditRegistrationA
ction
21:02:13,770 DEBUG [RequestProcessor]   Creating new Action instance
21:02:13,790 ERROR [RequestProcessor] No action instance for path
/editRegistration could be created
java.lang.NoClassDefFoundError: org/apache/struts/action/ActionForm
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:493)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at
org.jboss.mx.loading.UnifiedClassLoader.findClass(UnifiedClassLoader.java:226
)
at java.lang.ClassLoade

RE: MessageResources problem under JBoss 3.0

2002-07-08 Thread Martin Cooper



> -Original Message-
> From: Brian Topping [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 08, 2002 2:49 PM
> To: [EMAIL PROTECTED]
> Subject: MessageResources problem under JBoss 3.0
> 
> 
> Hiyas,
> 
> I'm looking at a classloader problem with JBoss 3 and Struts 
> 1.1B1.  It would
> appear that this is the source of problems in loading 
> properties files for
> struts users on JBoss.
> 
> If there is anyone out there that is using JBoss 3, can you 
> comment on your
> ability to load or not load properties files correctly, for 
> instance in
> conjunction with ActionErrors?
> 
> My environment:
> 
> JBoss 3.0.1RC1_tomcat4.0.4 (same problem with JBoss 3 release)
> W2KSP2
> JDK 1.3.1_02
> Struts 1.1B1
> 
> Standard deployment of Struts of course is to have a 
> struts.jar in the deploy
> dir, next to the app.war file for the actual application.  
> app.war has no
> problem loading classes or resources out of the struts.jar file.  

Actually, no. Standard deployment is to have struts.jar *inside* your web
app, in WEB-INF/lib. If you check the examples that come with Struts, you'll
see that each web app has a copy of struts.jar inside it. If you don't do
this, you'll certainly run the likelihood of classloader problems.

--
Martin Cooper


> 
> I've dug into MessageResources.getMessage(), and it's getting 
> a resource
> stream with 
> 'this.getClass().getClassLoader().getResourceAsStream(name)'.
> The caller is a utility method inside struts.jar, not the 
> app.jar.  Like I
> said, the call works fine for properties files that are in 
> the struts.jar,
> but fails for properties that are in the app.war file.  
> 
> This is a major issue, since properties files that are listed in
>  can't be loaded.  I presume that it 
> works standalone
> tomcat just fine, otherwise someone else would have noticed ;)
> 
> I'm suspecting incompatibility with JBoss Unified Class 
> Loader -- I believe
> different jars mean these are different classloaders, so
> 'this.getClassLoader()' gets the wrong classloader.  Either 
> there is an
> implementation problem with JBoss -- that the UCL isn't 
> following the proper
> semantics of getResource(), or Struts is pushing the edge of 
> the semantics.  
> 
> Any thoughts on this?
> 
> *any* help appreciated...
> 
> best,
> 
> -b
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: MessageResources configuration line to struts-config.xml ?

2002-06-14 Thread Barbara Post

ok, this solved my question by telling me to upgrade :-)

Prior to that I passed an application... parameter to my servlet
but the associated ActionForm could not use it then.

Thank you very much :-)

Barbara
- Original Message -
From: James Holmes <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Sent: Friday, June 14, 2002 4:09 PM
Subject: Re: MessageResources configuration line to struts-config.xml ?


> Oops, sorry for the confusion.  The
>  tag is new in 1.1 and thus is only
> available in Struts 1.1b.
>
> Here are links to both the 1.0 and 1.1 DTDS:
> http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd
> http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd
>
> -james
> [EMAIL PROTECTED]
> http://www.jamesholmes.com/struts/
>
>
> --- Barbara Post <[EMAIL PROTECTED]> wrote:
> > Hi James, thanks for this, gotta give a try.
> >
> > Can you point me to the right tag in the DTD ? guess
> > that I cannot see it
> > because I have printed it out in black :-p
> >
> > I use Struts 1.0.2, should I move to 1.1b ? Gotta
> > see if it's out of beta
> > state...
> >
> > Barbara
> > - Original Message -
> > From: James Holmes <[EMAIL PROTECTED]>
> > To: Struts Users Mailing List
> > <[EMAIL PROTECTED]>
> > Sent: Friday, June 14, 2002 4:02 PM
> > Subject: Re: MessageResources configuration line to
> > struts-config.xml ?
> >
> >
> > > If you use the Struts Console to edit your config
> > file
> > > it will properly place the  tag
> > in
> > > your file to comply with the DTD.
> > >
> > > Struts Console:
> > > http://www.jamesholmes.com/struts/
> > >
> > > The thread you mention below explains what value
> > to
> > > set based on what you name your properties file
> > and
> > > what hierarchy it's in.
> > >
> > > -james
> > > [EMAIL PROTECTED]
> > >
> > >
> > > --- Barbara Post <[EMAIL PROTECTED]> wrote:
> > > > I have been reading (really...  lol) this thread
> > :
> > > >
> > >
> >
> http://www.mail-archive.com/struts-user@jakarta.apache.org/msg33807.html
> > > > but according to struts-config.xml's dtd dunno
> > where
> > > > to put the tag, and
> > > > which tag, to indicate the location (class) of
> > my
> > > > MessageResources
> > > > .properties file !
> > > >
> > > > The message told to do so :
> > > > 1. Define the Resource bundle in the
> > > > struts-config.xml file. If you have a
> > > > resource
> > > > bundle by name
> > > > FormErrorResources.properties, then define
> > it as
> > > > follows:
> > > >  > > > parameter="com.myDomain.FormErrorResources" />
> > > >
> > > >
> > > >
> > > > Thanks for any clue.
> > > >
> > > > Barbara
> > > >
> > > >
> > > >
> > >
> >
>

> > __
> > > > ifrance.com, l'email gratuit le plus complet de
> > > > l'Internet !
> > > > vos emails depuis un navigateur, en POP3, sur
> > > > Minitel, sur le WAP...
> > > > http://www.ifrance.com/_reloc/email.emailif
> > > >
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > >
> > <mailto:[EMAIL PROTECTED]>
> > > > For additional commands, e-mail:
> > > > <mailto:[EMAIL PROTECTED]>
> > > >
> > >
> > >
> > > __
> > > Do You Yahoo!?
> > > Yahoo! - Official partner of 2002 FIFA World Cup
> > > http://fifaworldcup.yahoo.com
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > >
> >
> >
> >
>

__
> > ifrance.com, l'email gratuit le plus complet de
> > l'Internet !
> > vos emails depuis un navigateur, en POP3, sur
> > Minitel, sur le WAP...
> > http://www.ifrance.com/_reloc/email.emailif
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
>
>
> __
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>

 
__
ifrance.com, l'email gratuit le plus complet de l'Internet !
vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
http://www.ifrance.com/_reloc/email.emailif



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: MessageResources configuration line to struts-config.xml ?

2002-06-14 Thread James Holmes

Oops, sorry for the confusion.  The
 tag is new in 1.1 and thus is only
available in Struts 1.1b.

Here are links to both the 1.0 and 1.1 DTDS:
http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd
http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd

-james
[EMAIL PROTECTED]
http://www.jamesholmes.com/struts/


--- Barbara Post <[EMAIL PROTECTED]> wrote:
> Hi James, thanks for this, gotta give a try.
> 
> Can you point me to the right tag in the DTD ? guess
> that I cannot see it
> because I have printed it out in black :-p
> 
> I use Struts 1.0.2, should I move to 1.1b ? Gotta
> see if it's out of beta
> state...
> 
> Barbara
> - Original Message -
> From: James Holmes <[EMAIL PROTECTED]>
> To: Struts Users Mailing List
> <[EMAIL PROTECTED]>
> Sent: Friday, June 14, 2002 4:02 PM
> Subject: Re: MessageResources configuration line to
> struts-config.xml ?
> 
> 
> > If you use the Struts Console to edit your config
> file
> > it will properly place the  tag
> in
> > your file to comply with the DTD.
> >
> > Struts Console:
> > http://www.jamesholmes.com/struts/
> >
> > The thread you mention below explains what value
> to
> > set based on what you name your properties file
> and
> > what hierarchy it's in.
> >
> > -james
> > [EMAIL PROTECTED]
> >
> >
> > --- Barbara Post <[EMAIL PROTECTED]> wrote:
> > > I have been reading (really...  lol) this thread
> :
> > >
> >
>
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg33807.html
> > > but according to struts-config.xml's dtd dunno
> where
> > > to put the tag, and
> > > which tag, to indicate the location (class) of
> my
> > > MessageResources
> > > .properties file !
> > >
> > > The message told to do so :
> > > 1. Define the Resource bundle in the
> > > struts-config.xml file. If you have a
> > > resource
> > > bundle by name
> > > FormErrorResources.properties, then define
> it as
> > > follows:
> > >  > > parameter="com.myDomain.FormErrorResources" />
> > >
> > >
> > >
> > > Thanks for any clue.
> > >
> > > Barbara
> > >
> > >
> > >
> >
>

> __
> > > ifrance.com, l'email gratuit le plus complet de
> > > l'Internet !
> > > vos emails depuis un navigateur, en POP3, sur
> > > Minitel, sur le WAP...
> > > http://www.ifrance.com/_reloc/email.emailif
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > >
> <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > >
> >
> >
> > __
> > Do You Yahoo!?
> > Yahoo! - Official partner of 2002 FIFA World Cup
> > http://fifaworldcup.yahoo.com
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
> 
>  
>
__
> ifrance.com, l'email gratuit le plus complet de
> l'Internet !
> vos emails depuis un navigateur, en POP3, sur
> Minitel, sur le WAP...
> http://www.ifrance.com/_reloc/email.emailif
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: MessageResources configuration line to struts-config.xml ?

2002-06-14 Thread Barbara Post

Hi James, thanks for this, gotta give a try.

Can you point me to the right tag in the DTD ? guess that I cannot see it
because I have printed it out in black :-p

I use Struts 1.0.2, should I move to 1.1b ? Gotta see if it's out of beta
state...

Barbara
- Original Message -
From: James Holmes <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Sent: Friday, June 14, 2002 4:02 PM
Subject: Re: MessageResources configuration line to struts-config.xml ?


> If you use the Struts Console to edit your config file
> it will properly place the  tag in
> your file to comply with the DTD.
>
> Struts Console:
> http://www.jamesholmes.com/struts/
>
> The thread you mention below explains what value to
> set based on what you name your properties file and
> what hierarchy it's in.
>
> -james
> [EMAIL PROTECTED]
>
>
> --- Barbara Post <[EMAIL PROTECTED]> wrote:
> > I have been reading (really...  lol) this thread :
> >
> http://www.mail-archive.com/struts-user@jakarta.apache.org/msg33807.html
> > but according to struts-config.xml's dtd dunno where
> > to put the tag, and
> > which tag, to indicate the location (class) of my
> > MessageResources
> > .properties file !
> >
> > The message told to do so :
> > 1. Define the Resource bundle in the
> > struts-config.xml file. If you have a
> > resource
> > bundle by name
> > FormErrorResources.properties, then define it as
> > follows:
> >  > parameter="com.myDomain.FormErrorResources" />
> >
> >
> >
> > Thanks for any clue.
> >
> > Barbara
> >
> >
> >
>

__
> > ifrance.com, l'email gratuit le plus complet de
> > l'Internet !
> > vos emails depuis un navigateur, en POP3, sur
> > Minitel, sur le WAP...
> > http://www.ifrance.com/_reloc/email.emailif
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
>
>
> __
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>

 
__
ifrance.com, l'email gratuit le plus complet de l'Internet !
vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
http://www.ifrance.com/_reloc/email.emailif



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: MessageResources configuration line to struts-config.xml ?

2002-06-14 Thread James Holmes

If you use the Struts Console to edit your config file
it will properly place the  tag in
your file to comply with the DTD.

Struts Console:
http://www.jamesholmes.com/struts/

The thread you mention below explains what value to
set based on what you name your properties file and
what hierarchy it's in.

-james
[EMAIL PROTECTED]


--- Barbara Post <[EMAIL PROTECTED]> wrote:
> I have been reading (really...  lol) this thread :
>
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg33807.html
> but according to struts-config.xml's dtd dunno where
> to put the tag, and
> which tag, to indicate the location (class) of my
> MessageResources
> .properties file !
> 
> The message told to do so :
> 1. Define the Resource bundle in the
> struts-config.xml file. If you have a
> resource
> bundle by name
> FormErrorResources.properties, then define it as
> follows:
>  parameter="com.myDomain.FormErrorResources" />
> 
> 
> 
> Thanks for any clue.
> 
> Barbara
> 
>  
>
__
> ifrance.com, l'email gratuit le plus complet de
> l'Internet !
> vos emails depuis un navigateur, en POP3, sur
> Minitel, sur le WAP...
> http://www.ifrance.com/_reloc/email.emailif
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: MessageResources

2002-06-10 Thread Tero P Paananen

> I agree, in fact, I wonder if it can be extended to load from 
> other means
> such as xml, rdbms, or call to a url (ftp/http/whatever)

We implemented XMLMessageResources.java on our current
project.

Interwoven had problems getting stuff into .properties
files, so we had to read XML files instead.

The implementation was so remarkably easy that it felt almost
like cheating :)

-TPP <- likes frameworks that make my life easier

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: MessageResources

2002-06-06 Thread James Mitchell

I agree, in fact, I wonder if it can be extended to load from other means
such as xml, rdbms, or call to a url (ftp/http/whatever)

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org
ICQ: 27651409
AOLIM: jmitchtx (and NO I don't use AOL;)


> -Original Message-
> From: Anthony Martin [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 12:36 PM
> To: Struts User List
> Subject: MessageResources
>
>
> Are there any plans to make the Struts MessageResources, in the utility
> package, part of Jakarta Commons?  I find myself using this feature in
> areas other than servlet development.  I also see a need to use it in
> applets so that the JSPs and applets use the same ApplicationResources.
> No luck with the applets due to security, but stand-alone GUI
> applications seem to work with it fine.  What are your thoughts about
> this?
>
>
> Anthony
>
> To decode this comment into a readable form, rot13 it twice.
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: MessageResources bean - application scope

2001-11-02 Thread Scott Watson

You can also look at 

http://www.onjava.com/lpt/a//onjava/2001/10/31/struts2.html

The fifth and sixth page to be precise.  It talks about exactly what you are looking 
for.

HTH
Scott.

-Original Message-
From: Justin Piper [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 11:42 AM
To: 'Struts Users Mailing List'
Subject: RE: MessageResources bean - application scope


Take a look at the section on internationalization in the User's Guide,
http://jakarta.apache.org/struts/userGuide/building_view.html#i18n

-Original Message-
From: Todd Fulton [mailto:[EMAIL PROTECTED]] 
Sent: Friday, November 02, 2001 10:38 AM
To: Struts Users Mailing List (E-mail)
Subject: MessageResources bean - application scope



Can anyone interpret this for me?  I'm really at a roadblock here:

Re the  tag . . .

" In order to use this tag successfully, you must have defined an
application scope MessageResources bean under the default attribute name,
with at least the following message keys:
errors.header - Text that will be rendered before the error messages
list.
Typically, this message text will end with  to start the error messages
list. . . ."

Where do I define this?  Any examples?


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: MessageResources bean - application scope

2001-11-02 Thread Justin Piper

Take a look at the section on internationalization in the User's Guide,
http://jakarta.apache.org/struts/userGuide/building_view.html#i18n

-Original Message-
From: Todd Fulton [mailto:[EMAIL PROTECTED]] 
Sent: Friday, November 02, 2001 10:38 AM
To: Struts Users Mailing List (E-mail)
Subject: MessageResources bean - application scope



Can anyone interpret this for me?  I'm really at a roadblock here:

Re the  tag . . .

" In order to use this tag successfully, you must have defined an
application scope MessageResources bean under the default attribute name,
with at least the following message keys:
errors.header - Text that will be rendered before the error messages
list.
Typically, this message text will end with  to start the error messages
list. . . ."

Where do I define this?  Any examples?


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: