reload application.properties

2004-03-25 Thread Janarthan Sathiamurthy
Hi ,

How can i programmatically reload the application.properties file without a server 
restart/redeploy ?
It happens as our clients may change the value of the keyes specified in the 
properties files.
Does Struts provide any readymade class for this ?

Thanks & Regards,

Janarthan S.

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



Re: accessing application.properties from JSP

2004-02-03 Thread James Mitchell
Serverside jsp processing knows nothing about embedded JavaScript or
anything else.

 works anywhere on your page (if you remember to put the
taglib declaration)


--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017 (cell)
AIM: jmitchtx
MSN: [EMAIL PROTECTED]



- Original Message -
From: "Marco Mistroni" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, February 03, 2004 12:01 PM
Subject: RE: accessing application.properties from JSP


> Hi,
> Actually my problem is that I have to make so that a javascript
> message can be internationalized, so I must get it from
> application.properties.
>
> But it looks like writing a  inside a javascript method
> Does not work.
>
> Any workarounds?
>
> I assume that message resources are stored in servlet context.. if so,
> under
> Which name?
>
> Thanx and regards
> marco
>
> -Original Message-
> From: James Mitchell [mailto:[EMAIL PROTECTED]
> Sent: 03 February 2004 15:09
> To: Struts Users Mailing List
> Subject: Re: accessing application.properties from JSP
>
> The same way it is done in the struts-example.
>
>
> --
> James Mitchell
> Software Engineer / Struts Evangelist
> http://www.struts-atlanta.org
> 678.910.8017 (cell)
> AIM: jmitchtx
> MSN: [EMAIL PROTECTED]
>
>
>
> - Original Message -
> From: "Marco Mistroni" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Tuesday, February 03, 2004 10:06 AM
> Subject: accessing application.properties from JSP
>
>
> > Hi all,
> > Does anyone know how to access application.resources from a JSP?
> > With best regards
> > Marco
> >
> >
> >
> >
> > -
> > 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]


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



RE: accessing application.properties from JSP

2004-02-03 Thread Saul Q Yuan
Using  inside a javascript should work, cause
 is processed first on the server. It works for me. It
may help if you post your code here.

Saul


-Original Message-
From: Marco Mistroni [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 03, 2004 12:02 PM
To: 'Struts Users Mailing List'
Subject: RE: accessing application.properties from JSP


Hi,
Actually my problem is that I have to make so that a javascript
message can be internationalized, so I must get it from
application.properties.

But it looks like writing a  inside a javascript method
Does not work.

Any workarounds?

I assume that message resources are stored in servlet context.. if so,
under Which name?

Thanx and regards
marco

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED] 
Sent: 03 February 2004 15:09
To: Struts Users Mailing List
Subject: Re: accessing application.properties from JSP

The same way it is done in the struts-example.


--
James Mitchell
Software Engineer / Struts Evangelist http://www.struts-atlanta.org
678.910.8017 (cell)
AIM: jmitchtx
MSN: [EMAIL PROTECTED]



- Original Message - 
From: "Marco Mistroni" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, February 03, 2004 10:06 AM
Subject: accessing application.properties from JSP


> Hi all,
> Does anyone know how to access application.resources from a JSP? With 
> best regards Marco
> 
> 
> 
> 
> -
> 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]


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



RE: accessing application.properties from JSP

2004-02-03 Thread Marco Mistroni
Hi,
Actually my problem is that I have to make so that a javascript
message can be internationalized, so I must get it from
application.properties.

But it looks like writing a  inside a javascript method
Does not work.

Any workarounds?

I assume that message resources are stored in servlet context.. if so,
under
Which name?

Thanx and regards
marco

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED] 
Sent: 03 February 2004 15:09
To: Struts Users Mailing List
Subject: Re: accessing application.properties from JSP

The same way it is done in the struts-example.


--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017 (cell)
AIM: jmitchtx
MSN: [EMAIL PROTECTED]



- Original Message - 
From: "Marco Mistroni" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, February 03, 2004 10:06 AM
Subject: accessing application.properties from JSP


> Hi all,
> Does anyone know how to access application.resources from a JSP?
> With best regards
> Marco
> 
> 
> 
> 
> -
> 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: accessing application.properties from JSP

2004-02-03 Thread James Mitchell
The same way it is done in the struts-example.


--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017 (cell)
AIM: jmitchtx
MSN: [EMAIL PROTECTED]



- Original Message - 
From: "Marco Mistroni" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, February 03, 2004 10:06 AM
Subject: accessing application.properties from JSP


> Hi all,
> Does anyone know how to access application.resources from a JSP?
> With best regards
> Marco
> 
> 
> 
> 
> -
> 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]



accessing application.properties from JSP

2004-02-03 Thread Marco Mistroni
Hi all,
Does anyone know how to access application.resources from a JSP?
With best regards
Marco




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



Re: application.properties

2003-12-29 Thread Brice Ruth
the last entry overrides any previous entries. I'm not sure how 
MessageProperties is implemented, but I always think of a hashmap, where 
identical entries will override previous ones.

Otávio Augusto wrote:

Hi all

The application.properties file, from which i retrieve my resouce messages, has given me a doubt: is it scanned from the top to the botton or from the botton to the top? the thing is I made a mistake and added three identical messages there (errors.login.ivalid), and it always reads the last message. Maybe it loads the las message that matches the pattern, and overrides the previous ones. Is that right ?

thanks a lot

Otávio Augusto

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

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: application.properties

2003-12-29 Thread Peng, Meimin
I think you need to iterate the message out or pass the argument to get the
error out. 
you might need to post more details about how you do the key in your
resource and how you try to get the key.

-Original Message-
From: Otávio Augusto [mailto:[EMAIL PROTECTED]
Sent: Monday, December 29, 2003 9:32 AM
To: [EMAIL PROTECTED]
Subject: application.properties



Hi all

The application.properties file, from which i retrieve my resouce messages,
has given me a doubt: is it scanned from the top to the botton or from the
botton to the top? the thing is I made a mistake and added three identical
messages there (errors.login.ivalid), and it always reads the last message.
Maybe it loads the las message that matches the pattern, and overrides the
previous ones. Is that right ?


thanks a lot

Otávio Augusto

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

CONFIDENTIALITY NOTICE:  The information in this e-mail is privileged and
confidential.  Any use, copying or dissemination of any portion of this
e-mail by or to anyone other than the intended recipient(s) is unauthorized.
If you have received this e-mail in error, please reply to sender and delete
it from your system immediately.

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



application.properties

2003-12-29 Thread Otávio Augusto

Hi all

The application.properties file, from which i retrieve my resouce messages, has given 
me a doubt: is it scanned from the top to the botton or from the botton to the top? 
the thing is I made a mistake and added three identical messages there 
(errors.login.ivalid), and it always reads the last message. Maybe it loads the las 
message that matches the pattern, and overrides the previous ones. Is that right ?


thanks a lot

Otávio Augusto

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



RE: retrieving values from application.properties file

2003-12-26 Thread Kalra, Ashwani
Yeah,I think this was it. I will try it 
Thanks

>-Original Message-
>From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, December 24, 2003 8:13 PM
>To: 'Struts Users Mailing List'
>Subject: RE: retrieving values from application.properties file
>
>
>
>This might be the wrapper you are looking for
>
>   protected MessageResources getMessageResources(){
>   return 
>MessageResources.getMessageResources("ApplicationResources");
>   }
>
>   //getMessageResources().getMessage( "key" );
>
>The API has lot of other methods.
>
>
>Mohan
>-Original Message-
>From: Kalra, Ashwani [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, December 23, 2003 4:03 PM
>To: Struts Users Mailing List
>Subject: RE: retrieving values from application.properties file
>
>
>Ok, Thanks. I thought that I could use some struts wrapper 
>class which will
>provide some fn which takes the key as input. I didnt wanted 
>to load  the
>bundle etc as its already done by struts.
>Any way thanks.
>
>
>>-Original Message-
>>From: Shishir K. Singh [mailto:[EMAIL PROTECTED]
>>Sent: Tuesday, December 23, 2003 1:01 PM
>>To: Struts Users Mailing List
>>Subject: RE: retrieving values from application.properties file
>>
>>
>>Use
>>
>>ResourceBundle resource =
>>ResourceBundle.getBundle("resources.application");
>>
>>Else :
>>If you are in Action/Lookup Dispatch Action class
>>
>>MessageResources resource = getResources(request);
>>
>>
>>
>>
>>
>>-Original Message-
>>From: Kalra, Ashwani [mailto:[EMAIL PROTECTED]
>>Sent: Tuesday, December 23, 2003 2:24 AM
>>To: Struts Users Mailing List
>>Subject: RE: retrieving values from application.properties file
>>
>>hi,
>>One more thing to add is that I dont have access to 
>request,pagecontext
>>etc.
>>I am writing a Servicelocator class and I want to access some 
>values in
>>that file. Is it possible.
>>Otherwise I have to use my own resource bundle.
>>
>>
>>
>>
>>
>>>-Original Message-
>>>From: [EMAIL PROTECTED]
>>>[mailto:[EMAIL PROTECTED]
>>>Sent: Tuesday, December 23, 2003 12:48 PM
>>>To: [EMAIL PROTECTED]
>>>Subject: RE: retrieving values from application.properties file
>>>
>>>
>>>Hi Ashwani
>>>
>>>In a jsp page use follwing code:
>>>
>>>
>>>org.apache.struts.util.PropertyMessageResources res =
>>>
>>>(org.apache.struts.util.PropertyMessageResources)application.ge
>>>tAttribut
>>>e(org.apache.struts.Globals.MESSAGES_KEY);
>>> out.println(res.getMessage("KEYNAME"));
>>>
>>>
>>>Dhiraj
>>>
>>>-Original Message-
>>>From: Kalra, Ashwani [mailto:[EMAIL PROTECTED]
>>>Sent: Tuesday, December 23, 2003 12:27 PM
>>>To: Struts (E-mail)
>>>Subject: retrieving values from application.properties file
>>>
>>>hi,
>>>I want to directly access the keys and its values in
>>>applcation.properties ( default resource bundle file in struts). Can
>>>any body tell me which is the class in struts(utility class) which
>>>helps me retrieve the values based on the keys from this file.
>>>
>>>/Ashwani
>>>
>>>
>>>This message contains information that may be privileged or
>>>confidential and is the property of the Cap Gemini Ernst &
>>Young Group.
>>
>>>It is intended only for the person to whom it is addressed.
>>If you are
>>>not the intended recipient, you are not authorised to read, print,
>>>retain, copy, disseminate, distribute, or use this message or
>>any part
>>>thereof. If you receive this message in error, please notify
>>the sender
>>
>>>immediately and delete all copies of this message.
>>>
>>>-
>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>>DISCLAIMER:
>>>This message contains privileged and confidential information and is
>>>intended only for the individual named.If you are not the intended
>>>recipient you should not disseminate,distribute,store,print, copy or
>>>deliver this message.Please notify the sender immediately by
>>e-m

RE: retrieving values from application.properties file

2003-12-24 Thread Mohan Radhakrishnan

This might be the wrapper you are looking for

protected MessageResources getMessageResources(){
return MessageResources.getMessageResources("ApplicationResources");
}

//getMessageResources().getMessage( "key" );

The API has lot of other methods.


Mohan
-Original Message-
From: Kalra, Ashwani [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 23, 2003 4:03 PM
To: Struts Users Mailing List
Subject: RE: retrieving values from application.properties file


Ok, Thanks. I thought that I could use some struts wrapper class which will
provide some fn which takes the key as input. I didnt wanted to load  the
bundle etc as its already done by struts.
Any way thanks.


>-Original Message-
>From: Shishir K. Singh [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, December 23, 2003 1:01 PM
>To: Struts Users Mailing List
>Subject: RE: retrieving values from application.properties file
>
>
>Use
>
>ResourceBundle resource =
>ResourceBundle.getBundle("resources.application");
>
>Else :
>If you are in Action/Lookup Dispatch Action class
>
>MessageResources resource = getResources(request);
>
>
>
>
>
>-Original Message-
>From: Kalra, Ashwani [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, December 23, 2003 2:24 AM
>To: Struts Users Mailing List
>Subject: RE: retrieving values from application.properties file
>
>hi,
>One more thing to add is that I dont have access to request,pagecontext
>etc.
>I am writing a Servicelocator class and I want to access some values in
>that file. Is it possible.
>Otherwise I have to use my own resource bundle.
>
>
>
>
>
>>-Original Message-
>>From: [EMAIL PROTECTED]
>>[mailto:[EMAIL PROTECTED]
>>Sent: Tuesday, December 23, 2003 12:48 PM
>>To: [EMAIL PROTECTED]
>>Subject: RE: retrieving values from application.properties file
>>
>>
>>Hi Ashwani
>>
>>In a jsp page use follwing code:
>>
>>
>>org.apache.struts.util.PropertyMessageResources res =
>>
>>(org.apache.struts.util.PropertyMessageResources)application.ge
>>tAttribut
>>e(org.apache.struts.Globals.MESSAGES_KEY);
>>  out.println(res.getMessage("KEYNAME"));
>>
>>
>>Dhiraj
>>
>>-Original Message-
>>From: Kalra, Ashwani [mailto:[EMAIL PROTECTED]
>>Sent: Tuesday, December 23, 2003 12:27 PM
>>To: Struts (E-mail)
>>Subject: retrieving values from application.properties file
>>
>>hi,
>>I want to directly access the keys and its values in
>>applcation.properties ( default resource bundle file in struts). Can
>>any body tell me which is the class in struts(utility class) which
>>helps me retrieve the values based on the keys from this file.
>>
>>/Ashwani
>>
>>
>>This message contains information that may be privileged or
>>confidential and is the property of the Cap Gemini Ernst &
>Young Group.
>
>>It is intended only for the person to whom it is addressed.
>If you are
>>not the intended recipient, you are not authorised to read, print,
>>retain, copy, disseminate, distribute, or use this message or
>any part
>>thereof. If you receive this message in error, please notify
>the sender
>
>>immediately and delete all copies of this message.
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>>DISCLAIMER:
>>This message contains privileged and confidential information and is
>>intended only for the individual named.If you are not the intended
>>recipient you should not disseminate,distribute,store,print, copy or
>>deliver this message.Please notify the sender immediately by
>e-mail if
>>you have received this e-mail by mistake and delete this e-mail from
>>your system.E-mail transmission cannot be guaranteed to be secure or
>>error-free as information could be
>>intercepted,corrupted,lost,destroyed,arrive late or incomplete or
>>contain viruses.The sender therefore does not accept
>liability for any
>>errors or omissions in the contents of this message which arise as a
>>result of e-mail transmission. If verification is required please
>>request a hard-copy version.
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>
>This message contai

Re: retrieving values from application.properties file

2003-12-23 Thread Martin Gainty
Yes
when constructing your war be sure to include in your web.xml the init-param
specification



application

ApplicationResources





config

/WEB-INF/struts-config.xml



(whereas param-value is the java classname which contains MessageResources)

*OR in your struts-config.xml*







Then to quote Stephan Wiesner
create a ApplicationResources.properties in /WEB-INF/classes folder with one
entry
'index.title=Struts Tutorial'

Then create a jsp which will call it
test.jsp created in the webapps/YourProject directory

<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tlf" prefix="logic" %>





 






-Martin

- Original Message - 
From: "Kalra, Ashwani" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, December 23, 2003 5:32 AM
Subject: RE: retrieving values from application.properties file


> Ok, Thanks. I thought that I could use some struts wrapper class which
will
> provide some fn which takes the key as input. I didnt wanted to load  the
> bundle etc as its already done by struts.
> Any way thanks.
>
>
> >-Original Message-
> >From: Shishir K. Singh [mailto:[EMAIL PROTECTED]
> >Sent: Tuesday, December 23, 2003 1:01 PM
> >To: Struts Users Mailing List
> >Subject: RE: retrieving values from application.properties file
> >
> >
> >Use
> >
> >ResourceBundle resource =
> >ResourceBundle.getBundle("resources.application");
> >
> >Else :
> >If you are in Action/Lookup Dispatch Action class
> >
> >MessageResources resource = getResources(request);
> >
> >
> >
> >
> >
> >-Original Message-
> >From: Kalra, Ashwani [mailto:[EMAIL PROTECTED]
> >Sent: Tuesday, December 23, 2003 2:24 AM
> >To: Struts Users Mailing List
> >Subject: RE: retrieving values from application.properties file
> >
> >hi,
> >One more thing to add is that I dont have access to request,pagecontext
> >etc.
> >I am writing a Servicelocator class and I want to access some values in
> >that file. Is it possible.
> >Otherwise I have to use my own resource bundle.
> >
> >
> >
> >
> >
> >>-Original Message-
> >>From: [EMAIL PROTECTED]
> >>[mailto:[EMAIL PROTECTED]
> >>Sent: Tuesday, December 23, 2003 12:48 PM
> >>To: [EMAIL PROTECTED]
> >>Subject: RE: retrieving values from application.properties file
> >>
> >>
> >>Hi Ashwani
> >>
> >>In a jsp page use follwing code:
> >>
> >>
> >>org.apache.struts.util.PropertyMessageResources res =
> >>
> >>(org.apache.struts.util.PropertyMessageResources)application.ge
> >>tAttribut
> >>e(org.apache.struts.Globals.MESSAGES_KEY);
> >> out.println(res.getMessage("KEYNAME"));
> >>
> >>
> >>Dhiraj
> >>
> >>-Original Message-
> >>From: Kalra, Ashwani [mailto:[EMAIL PROTECTED]
> >>Sent: Tuesday, December 23, 2003 12:27 PM
> >>To: Struts (E-mail)
> >>Subject: retrieving values from application.properties file
> >>
> >>hi,
> >>I want to directly access the keys and its values in
> >>applcation.properties ( default resource bundle file in struts). Can
> >>any body tell me which is the class in struts(utility class) which
> >>helps me retrieve the values based on the keys from this file.
> >>
> >>/Ashwani
> >>
> >>
> >>This message contains information that may be privileged or
> >>confidential and is the property of the Cap Gemini Ernst &
> >Young Group.
> >
> >>It is intended only for the person to whom it is addressed.
> >If you are
> >>not the intended recipient, you are not authorised to read, print,
> >>retain, copy, disseminate, distribute, or use this message or
> >any part
> >>thereof. If you receive this message in error, please notify
> >the sender
> >
> >>immediately and delete all copies of this message.
> >>
> >>-
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >>DISCLAIMER:
> >>This message co

RE: retrieving values from application.properties file

2003-12-23 Thread Kalra, Ashwani
Ok, Thanks. I thought that I could use some struts wrapper class which will
provide some fn which takes the key as input. I didnt wanted to load  the
bundle etc as its already done by struts.
Any way thanks.


>-Original Message-
>From: Shishir K. Singh [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, December 23, 2003 1:01 PM
>To: Struts Users Mailing List
>Subject: RE: retrieving values from application.properties file
>
>
>Use
>
>ResourceBundle resource =
>ResourceBundle.getBundle("resources.application");
>
>Else :
>If you are in Action/Lookup Dispatch Action class
>
>MessageResources resource = getResources(request);
>
>
>
> 
>
>-Original Message-
>From: Kalra, Ashwani [mailto:[EMAIL PROTECTED] 
>Sent: Tuesday, December 23, 2003 2:24 AM
>To: Struts Users Mailing List
>Subject: RE: retrieving values from application.properties file
>
>hi,
>One more thing to add is that I dont have access to request,pagecontext
>etc.
>I am writing a Servicelocator class and I want to access some values in
>that file. Is it possible.
>Otherwise I have to use my own resource bundle.
>
>
>
>
>
>>-Original Message-
>>From: [EMAIL PROTECTED]
>>[mailto:[EMAIL PROTECTED]
>>Sent: Tuesday, December 23, 2003 12:48 PM
>>To: [EMAIL PROTECTED]
>>Subject: RE: retrieving values from application.properties file
>>
>>
>>Hi Ashwani
>>
>>In a jsp page use follwing code:
>>
>>
>>org.apache.struts.util.PropertyMessageResources res =
>>  
>>(org.apache.struts.util.PropertyMessageResources)application.ge
>>tAttribut
>>e(org.apache.struts.Globals.MESSAGES_KEY);
>>  out.println(res.getMessage("KEYNAME"));
>>
>>
>>Dhiraj
>>
>>-Original Message-
>>From: Kalra, Ashwani [mailto:[EMAIL PROTECTED]
>>Sent: Tuesday, December 23, 2003 12:27 PM
>>To: Struts (E-mail)
>>Subject: retrieving values from application.properties file
>>
>>hi,
>>I want to directly access the keys and its values in 
>>applcation.properties ( default resource bundle file in struts). Can 
>>any body tell me which is the class in struts(utility class) which 
>>helps me retrieve the values based on the keys from this file.
>>
>>/Ashwani
>>
>>
>>This message contains information that may be privileged or 
>>confidential and is the property of the Cap Gemini Ernst & 
>Young Group.
>
>>It is intended only for the person to whom it is addressed. 
>If you are 
>>not the intended recipient, you are not authorised to read, print, 
>>retain, copy, disseminate, distribute, or use this message or 
>any part 
>>thereof. If you receive this message in error, please notify 
>the sender
>
>>immediately and delete all copies of this message.
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>>DISCLAIMER:
>>This message contains privileged and confidential information and is 
>>intended only for the individual named.If you are not the intended 
>>recipient you should not disseminate,distribute,store,print, copy or 
>>deliver this message.Please notify the sender immediately by 
>e-mail if 
>>you have received this e-mail by mistake and delete this e-mail from 
>>your system.E-mail transmission cannot be guaranteed to be secure or 
>>error-free as information could be 
>>intercepted,corrupted,lost,destroyed,arrive late or incomplete or 
>>contain viruses.The sender therefore does not accept 
>liability for any 
>>errors or omissions in the contents of this message which arise as a 
>>result of e-mail transmission. If verification is required please 
>>request a hard-copy version.
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>
>This message contains information that may be privileged or 
>confidential
>and is the property of the Cap Gemini Ernst & Young Group. It is
>intended only for the person to whom it is addressed. If you 
>are not the
>intended recipient, you are not authorised to read, print, 
>retain, copy,
>disseminate, distribute, or use this message or any part 
>thereof. If you
>receive this message in error, please notify the sender immediately and
>delete all copies of this message

RE: retrieving values from application.properties file

2003-12-23 Thread Shishir K. Singh
Use

ResourceBundle resource =
ResourceBundle.getBundle("resources.application");

Else :
If you are in Action/Lookup Dispatch Action class

MessageResources resource = getResources(request);



 

-Original Message-
From: Kalra, Ashwani [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 23, 2003 2:24 AM
To: Struts Users Mailing List
Subject: RE: retrieving values from application.properties file

hi,
One more thing to add is that I dont have access to request,pagecontext
etc.
I am writing a Servicelocator class and I want to access some values in
that file. Is it possible.
Otherwise I have to use my own resource bundle.





>-Original Message-
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED]
>Sent: Tuesday, December 23, 2003 12:48 PM
>To: [EMAIL PROTECTED]
>Subject: RE: retrieving values from application.properties file
>
>
>Hi Ashwani
>
>In a jsp page use follwing code:
>
>
>org.apache.struts.util.PropertyMessageResources res =
>   
>(org.apache.struts.util.PropertyMessageResources)application.ge
>tAttribut
>e(org.apache.struts.Globals.MESSAGES_KEY);
>   out.println(res.getMessage("KEYNAME"));
>
>
>Dhiraj
>
>-Original Message-
>From: Kalra, Ashwani [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, December 23, 2003 12:27 PM
>To: Struts (E-mail)
>Subject: retrieving values from application.properties file
>
>hi,
>I want to directly access the keys and its values in 
>applcation.properties ( default resource bundle file in struts). Can 
>any body tell me which is the class in struts(utility class) which 
>helps me retrieve the values based on the keys from this file.
>
>/Ashwani
>
>
>This message contains information that may be privileged or 
>confidential and is the property of the Cap Gemini Ernst & Young Group.

>It is intended only for the person to whom it is addressed. If you are 
>not the intended recipient, you are not authorised to read, print, 
>retain, copy, disseminate, distribute, or use this message or any part 
>thereof. If you receive this message in error, please notify the sender

>immediately and delete all copies of this message.
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>DISCLAIMER:
>This message contains privileged and confidential information and is 
>intended only for the individual named.If you are not the intended 
>recipient you should not disseminate,distribute,store,print, copy or 
>deliver this message.Please notify the sender immediately by e-mail if 
>you have received this e-mail by mistake and delete this e-mail from 
>your system.E-mail transmission cannot be guaranteed to be secure or 
>error-free as information could be 
>intercepted,corrupted,lost,destroyed,arrive late or incomplete or 
>contain viruses.The sender therefore does not accept liability for any 
>errors or omissions in the contents of this message which arise as a 
>result of e-mail transmission. If verification is required please 
>request a hard-copy version.
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>


This message contains information that may be privileged or confidential
and is the property of the Cap Gemini Ernst & Young Group. It is
intended only for the person to whom it is addressed. If you are not the
intended recipient, you are not authorised to read, print, retain, copy,
disseminate, distribute, or use this message or any part thereof. If you
receive this message in error, please notify the sender immediately and
delete all copies of this message.

-
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: retrieving values from application.properties file

2003-12-23 Thread Kalra, Ashwani
hi,
One more thing to add is that I dont have access to request,pagecontext etc.
I am writing a Servicelocator class and I want to access some values in that
file. Is it possible.
Otherwise I have to use my own resource bundle.





>-Original Message-
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED]
>Sent: Tuesday, December 23, 2003 12:48 PM
>To: [EMAIL PROTECTED]
>Subject: RE: retrieving values from application.properties file
>
>
>Hi Ashwani 
>
>In a jsp page use follwing code:
>
>
>org.apache.struts.util.PropertyMessageResources res = 
>   
>(org.apache.struts.util.PropertyMessageResources)application.ge
>tAttribut
>e(org.apache.struts.Globals.MESSAGES_KEY);
>   out.println(res.getMessage("KEYNAME"));
>
>
>Dhiraj
>
>-Original Message-
>From: Kalra, Ashwani [mailto:[EMAIL PROTECTED] 
>Sent: Tuesday, December 23, 2003 12:27 PM
>To: Struts (E-mail)
>Subject: retrieving values from application.properties file
>
>hi,
>I want to directly access the keys and its values in
>applcation.properties ( default resource bundle file in 
>struts). Can any
>body tell me which is the class in struts(utility class) which helps me
>retrieve the values based on the keys from this file.
>
>/Ashwani
>
>
>This message contains information that may be privileged or 
>confidential
>and is the property of the Cap Gemini Ernst & Young Group. It is
>intended only for the person to whom it is addressed. If you 
>are not the
>intended recipient, you are not authorised to read, print, 
>retain, copy,
>disseminate, distribute, or use this message or any part 
>thereof. If you
>receive this message in error, please notify the sender immediately and
>delete all copies of this message.
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>DISCLAIMER:
>This message contains privileged and confidential information 
>and is intended only for the individual named.If you are not 
>the intended recipient you should not 
>disseminate,distribute,store,print, copy or deliver this 
>message.Please notify the sender immediately by e-mail if you 
>have received this e-mail by mistake and delete this e-mail 
>from your system.E-mail transmission cannot be guaranteed to 
>be secure or error-free as information could be 
>intercepted,corrupted,lost,destroyed,arrive late or incomplete 
>or contain viruses.The sender therefore does not accept 
>liability for any errors or omissions in the contents of this 
>message which arise as a result of e-mail transmission. If 
>verification is required please request a hard-copy version.
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>


This message contains information that may be privileged or confidential and
is the property of the Cap Gemini Ernst & Young Group. It is intended only
for the person to whom it is addressed. If you are not the intended
recipient, you are not authorised to read, print, retain, copy, disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all copies
of this message.

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



RE: retrieving values from application.properties file

2003-12-23 Thread Dhiraj.Gupta
Hi Ashwani 

In a jsp page use follwing code:


org.apache.struts.util.PropertyMessageResources res = 

(org.apache.struts.util.PropertyMessageResources)application.getAttribut
e(org.apache.struts.Globals.MESSAGES_KEY);
out.println(res.getMessage("KEYNAME"));


Dhiraj

-Original Message-
From: Kalra, Ashwani [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 23, 2003 12:27 PM
To: Struts (E-mail)
Subject: retrieving values from application.properties file

hi,
I want to directly access the keys and its values in
applcation.properties ( default resource bundle file in struts). Can any
body tell me which is the class in struts(utility class) which helps me
retrieve the values based on the keys from this file.

/Ashwani


This message contains information that may be privileged or confidential
and is the property of the Cap Gemini Ernst & Young Group. It is
intended only for the person to whom it is addressed. If you are not the
intended recipient, you are not authorised to read, print, retain, copy,
disseminate, distribute, or use this message or any part thereof. If you
receive this message in error, please notify the sender immediately and
delete all copies of this message.

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



DISCLAIMER:
This message contains privileged and confidential information and is intended only for 
the individual named.If you are not the intended recipient you should not 
disseminate,distribute,store,print, copy or deliver this message.Please notify the 
sender immediately by e-mail if you have received this e-mail by mistake and delete 
this e-mail from your system.E-mail transmission cannot be guaranteed to be secure or 
error-free as information could be intercepted,corrupted,lost,destroyed,arrive late or 
incomplete or contain viruses.The sender therefore does not accept liability for any 
errors or omissions in the contents of this message which arise as a result of e-mail 
transmission. If verification is required please request a hard-copy version.

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



retrieving values from application.properties file

2003-12-23 Thread Kalra, Ashwani
hi,
I want to directly access the keys and its values in applcation.properties (
default resource bundle file in struts). Can any body tell me which is the
class in struts(utility class) which helps me retrieve the values based on
the keys from this file.

/Ashwani


This message contains information that may be privileged or confidential and
is the property of the Cap Gemini Ernst & Young Group. It is intended only
for the person to whom it is addressed. If you are not the intended
recipient, you are not authorised to read, print, retain, copy, disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all copies
of this message.

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



Re: application.properties

2003-10-28 Thread Ruth, Brice
nope

Nathan Maves wrote:

I use Sun's application server but when I do this all web applications 
reload when you deploy a new one out there.  Does Tomcat do this as well?

Nathan
On Oct 28, 2003, at 9:48 AM, Ruth, Brice wrote:
You can probably reload or stop/start the individual application, 
whilst leaving the application server running. At least, this is what 
I do with Tomcat all the time ...

Zhou, Qin (Eric) wrote:

Can website pick up the changes from application.properties using 
some way, but without bouncing the applicaiton server?

Eric Zhou

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

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


-
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]
--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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


RE: application.properties

2003-10-28 Thread Wiebe de Jong
There is a good article at JavaWorld which shows how to use a timer to
reload property files. Check it out at
http://www.javaworld.com/javaworld/javatips/jw-javatip125.html

Wiebe de Jong
http://frontierj.blogspot.com 

-Original Message-
From: Zhou, Qin (Eric) [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 28, 2003 8:45 AM
To: [EMAIL PROTECTED]
Subject: application.properties


Can website pick up the changes from application.properties using some way,
but without bouncing the applicaiton server?

Eric Zhou


-
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: application.properties

2003-10-28 Thread Paananen, Tero
> Can website pick up the changes from application.properties 
> using some way, but without bouncing the applicaiton server?

This is discussed on the list every other week.
The answer is in the list archives.

Summary: implement refreshing on your own. It's fairly
simple to do.

-TPP

-
This email may contain confidential and privileged material for the sole use of the 
intended recipient(s). Any review, use, retention, distribution or disclosure by 
others is strictly prohibited. If you are not the intended recipient (or authorized to 
receive for the recipient), please contact the sender by reply email and delete all 
copies of this message.  Also, email is susceptible to data corruption, interception, 
tampering, unauthorized amendment and viruses. We only send and receive emails on the 
basis that we are not liable for any such corruption, interception, tampering, 
amendment or viruses or any consequence thereof.


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



Re: application.properties

2003-10-28 Thread Nathan Maves
I use Sun's application server but when I do this all web applications 
reload when you deploy a new one out there.  Does Tomcat do this as 
well?

Nathan
On Oct 28, 2003, at 9:48 AM, Ruth, Brice wrote:
You can probably reload or stop/start the individual application, 
whilst leaving the application server running. At least, this is what 
I do with Tomcat all the time ...

Zhou, Qin (Eric) wrote:

Can website pick up the changes from application.properties using 
some way, but without bouncing the applicaiton server?

Eric Zhou

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

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


-
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: application.properties

2003-10-28 Thread Ruth, Brice
You can probably reload or stop/start the individual application, whilst 
leaving the application server running. At least, this is what I do with 
Tomcat all the time ...

Zhou, Qin (Eric) wrote:

Can website pick up the changes from application.properties using some way, but without bouncing the applicaiton server?

Eric Zhou

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

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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


application.properties

2003-10-28 Thread Zhou, Qin (Eric)

Can website pick up the changes from application.properties using some way, but 
without bouncing the applicaiton server?

Eric Zhou


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



RE: Application.properties

2003-09-17 Thread Paananen, Tero
> I have seen the Message-Resources DB application
> (using OJB) by James Mitchell using which we can put
> the properties in a database and retrieve them. But It
> also needs the container to be reloaded when a change
> has been made.

I tested the OBJMessageResources implementation
yesterday with a little bit of help from James.

I used MySQL, JBoss with standalone Tomcat 4.1.x
and the OJBMessageResources.war supplied by James
with the default settings (added the OJBMessageResources
jar and changed the struts-config.xml to use OJB).

There is NO caching in there. All changes to the
message resources stored in the database were
immediately reflected on the JSP pages.

If you're having problems with db changes not
being reflected on the user interface, I suspect
you have a configuration problem with either
the message resources, OJB or the db.

-TPP


-
This email may contain confidential and privileged material for the sole use of the 
intended recipient(s). Any review, use, retention, distribution or disclosure by 
others is strictly prohibited. If you are not the intended recipient (or authorized to 
receive for the recipient), please contact the sender by reply email and delete all 
copies of this message.  Also, email is susceptible to data corruption, interception, 
tampering, unauthorized amendment and viruses. We only send and receive emails on the 
basis that we are not liable for any such corruption, interception, tampering, 
amendment or viruses or any consequence thereof.


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



RE: [OT] RE: Application.properties

2003-09-16 Thread Andrew Hill
ooo A p** contest! Can I play? ;-)

Done 28 hours this week and its only Tuesday (well for another half hour it
is anyhow).
Did 79 Last week, but only because I was slack and took Sunday off. 

(Could be worse. Was doing 100+s this time last year)

-Original Message-
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 16 September 2003 22:58
To: Struts Users Mailing List
Subject: [OT] RE: Application.properties


That's all? I bet Mark does twice that in his lunch breaks! ;-)

I'd help, but I'm too busy drooling over the upgraded 15" Mac PowerBooks.

>-Original Message-
>From: James [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, September 16, 2003 9:42 AM
>To: 'Struts Users Mailing List'
>Subject: RE: Application.properties
>
>
>My time is very limited at the moment.  I'll try to find some time for
>this today or tomorrow.
>
>I apologize for putting you off so long.  I'm currently billing ~55
>hours at my current gig, coaching 2 of my 3 kids soccer teams, running
>the struts-atlanta users group, and tech editing 2 new books (a Struts
>book and a JSF book).
>
>If anyone else has a free minute so spare, that would be great.



-
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: Application.properties

2003-09-16 Thread James Mitchell
Yes, I believe that is the latest version.  

BTW. Thank you for the help.

--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017
AIM:jmitchtx




> -Original Message-
> From: Paananen, Tero [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, September 16, 2003 10:56 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Application.properties
> 
> 
> > If anyone else has a free minute so spare,
> > that would be great.
> 
> Since I already implemented similar things with
> PropertyMessageResources, I could probably do this
> one fairly quickly as well. Might even be able to
> reuse the old code for it.
> 
> James, could you point me to the right direction
> as to where's the latest version of the OJB
> Message Resources stuff?
> 
http://sourceforge.net/project/showfiles.php?group_id=49385

Is that it?

-TPP

-
This email may contain confidential and privileged material for the sole
use of the intended recipient(s). Any review, use, retention,
distribution or disclosure by others is strictly prohibited. If you are
not the intended recipient (or authorized to receive for the recipient),
please contact the sender by reply email and delete all copies of this
message.  Also, email is susceptible to data corruption, interception,
tampering, unauthorized amendment and viruses. We only send and receive
emails on the basis that we are not liable for any such corruption,
interception, tampering, amendment or viruses or any consequence
thereof.


-
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: Application.properties

2003-09-16 Thread Paananen, Tero
> If anyone else has a free minute so spare,
> that would be great.

Since I already implemented similar things with
PropertyMessageResources, I could probably do this
one fairly quickly as well. Might even be able to
reuse the old code for it.

James, could you point me to the right direction
as to where's the latest version of the OJB
Message Resources stuff?

http://sourceforge.net/project/showfiles.php?group_id=49385

Is that it?

-TPP

-
This email may contain confidential and privileged material for the sole use of the 
intended recipient(s). Any review, use, retention, distribution or disclosure by 
others is strictly prohibited. If you are not the intended recipient (or authorized to 
receive for the recipient), please contact the sender by reply email and delete all 
copies of this message.  Also, email is susceptible to data corruption, interception, 
tampering, unauthorized amendment and viruses. We only send and receive emails on the 
basis that we are not liable for any such corruption, interception, tampering, 
amendment or viruses or any consequence thereof.


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



[OT] RE: Application.properties

2003-09-16 Thread Chappell, Simon P
That's all? I bet Mark does twice that in his lunch breaks! ;-)

I'd help, but I'm too busy drooling over the upgraded 15" Mac PowerBooks.

>-Original Message-
>From: James [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, September 16, 2003 9:42 AM
>To: 'Struts Users Mailing List'
>Subject: RE: Application.properties
>
>
>My time is very limited at the moment.  I'll try to find some time for
>this today or tomorrow.  
>
>I apologize for putting you off so long.  I'm currently billing ~55
>hours at my current gig, coaching 2 of my 3 kids soccer teams, running
>the struts-atlanta users group, and tech editing 2 new books (a Struts
>book and a JSF book).
>
>If anyone else has a free minute so spare, that would be great.



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



RE: Application.properties

2003-09-16 Thread James
My time is very limited at the moment.  I'll try to find some time for
this today or tomorrow.  

I apologize for putting you off so long.  I'm currently billing ~55
hours at my current gig, coaching 2 of my 3 kids soccer teams, running
the struts-atlanta users group, and tech editing 2 new books (a Struts
book and a JSF book).

If anyone else has a free minute so spare, that would be great.


--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017
AIM:jmitchtx




> -Original Message-
> From: Srikanth Gubba [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, September 16, 2003 8:28 AM
> To: '[EMAIL PROTECTED]'
> Cc: '[EMAIL PROTECTED]'
> Subject: RE: Application.properties
> 
> 
> James,
> 
> Can you please help me with the changes that I can make to the
> DBMessageResources so that it would work without reloading 
> the appliation. I
> know that you were working on this earlier but not sure if 
> you had a chance
> to complete making the changes to new OJB version.
> 
> Thanks in adv
> srikanth
> 
> -Original Message-
> From: James [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 15, 2003 2:18 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Application.properties
> 
> 
> That's one way to do it.  Although doing so will create a compile-time
> dependency on using that class (whether you actually use it or not).
> 
> By default, the Struts MessageResources API does not allow 
> for reloading
> and given the nature of the implementation.  Since the 
> returned messages
> from your subclass are cached, you must clear the (cached) map of
> formatted messages with each call to your implementation's getMessage
> method or the MessageResources won't bother to call your method again
> (until you reload the app).
> 
> This was a very frustrating feature that I had to overcome with my
> DBMessageResources implementation and one of the reasons I 
> chose OJB for
> the underlying data access (configurable caching, etc).
> 
> 
> --
> James Mitchell
> Software Engineer / Struts Evangelist
> http://www.struts-atlanta.org
> 678.910.8017
> AIM:jmitchtx
> 
> 
> 
> 
> > -Original Message-
> > From: Paananen, Tero [mailto:[EMAIL PROTECTED] 
> > Sent: Monday, September 15, 2003 1:49 PM
> > To: 'Struts Users Mailing List'
> > Subject: RE: Application.properties
> > 
> > 
> > > Please suggest some ideas or code which will help in creating 
> > > an extension
> > > so that the properties can be loaded from database dynamically.
> > 
> > Extend the message resources class you're currently
> > using and implement a reload() (or whatever) method
> > in your extended class. Call the reload() method
> > when appropriate.
> > 
> > -TPP
> > 
> > -
> > This email may contain confidential and privileged material 
> > for the sole use of the intended recipient(s). Any review, 
> > use, retention, distribution or disclosure by others is 
> > strictly prohibited. If you are not the intended recipient 
> > (or authorized to receive for the recipient), please contact 
> > the sender by reply email and delete all copies of this 
> > message.  Also, email is susceptible to data corruption, 
> > interception, tampering, unauthorized amendment and viruses. 
> > We only send and receive emails on the basis that we are not 
> > liable for any such corruption, interception, tampering, 
> > amendment or viruses or any consequence thereof.
> > 
> > 
> > 
> -
> > 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: Application.properties

2003-09-16 Thread Srikanth Gubba
James,

Can you please help me with the changes that I can make to the
DBMessageResources so that it would work without reloading the appliation. I
know that you were working on this earlier but not sure if you had a chance
to complete making the changes to new OJB version.

Thanks in adv
srikanth

-Original Message-
From: James [mailto:[EMAIL PROTECTED]
Sent: Monday, September 15, 2003 2:18 PM
To: 'Struts Users Mailing List'
Subject: RE: Application.properties


That's one way to do it.  Although doing so will create a compile-time
dependency on using that class (whether you actually use it or not).

By default, the Struts MessageResources API does not allow for reloading
and given the nature of the implementation.  Since the returned messages
from your subclass are cached, you must clear the (cached) map of
formatted messages with each call to your implementation's getMessage
method or the MessageResources won't bother to call your method again
(until you reload the app).

This was a very frustrating feature that I had to overcome with my
DBMessageResources implementation and one of the reasons I chose OJB for
the underlying data access (configurable caching, etc).


--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017
AIM:jmitchtx




> -Original Message-
> From: Paananen, Tero [mailto:[EMAIL PROTECTED] 
> Sent: Monday, September 15, 2003 1:49 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Application.properties
> 
> 
> > Please suggest some ideas or code which will help in creating 
> > an extension
> > so that the properties can be loaded from database dynamically.
> 
> Extend the message resources class you're currently
> using and implement a reload() (or whatever) method
> in your extended class. Call the reload() method
> when appropriate.
> 
>   -TPP
> 
> -
> This email may contain confidential and privileged material 
> for the sole use of the intended recipient(s). Any review, 
> use, retention, distribution or disclosure by others is 
> strictly prohibited. If you are not the intended recipient 
> (or authorized to receive for the recipient), please contact 
> the sender by reply email and delete all copies of this 
> message.  Also, email is susceptible to data corruption, 
> interception, tampering, unauthorized amendment and viruses. 
> We only send and receive emails on the basis that we are not 
> liable for any such corruption, interception, tampering, 
> amendment or viruses or any consequence thereof.
> 
> 
> -
> 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: Application.properties

2003-09-15 Thread James
That's one way to do it.  Although doing so will create a compile-time
dependency on using that class (whether you actually use it or not).

By default, the Struts MessageResources API does not allow for reloading
and given the nature of the implementation.  Since the returned messages
from your subclass are cached, you must clear the (cached) map of
formatted messages with each call to your implementation's getMessage
method or the MessageResources won't bother to call your method again
(until you reload the app).

This was a very frustrating feature that I had to overcome with my
DBMessageResources implementation and one of the reasons I chose OJB for
the underlying data access (configurable caching, etc).


--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017
AIM:jmitchtx




> -Original Message-
> From: Paananen, Tero [mailto:[EMAIL PROTECTED] 
> Sent: Monday, September 15, 2003 1:49 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Application.properties
> 
> 
> > Please suggest some ideas or code which will help in creating 
> > an extension
> > so that the properties can be loaded from database dynamically.
> 
> Extend the message resources class you're currently
> using and implement a reload() (or whatever) method
> in your extended class. Call the reload() method
> when appropriate.
> 
>   -TPP
> 
> -
> This email may contain confidential and privileged material 
> for the sole use of the intended recipient(s). Any review, 
> use, retention, distribution or disclosure by others is 
> strictly prohibited. If you are not the intended recipient 
> (or authorized to receive for the recipient), please contact 
> the sender by reply email and delete all copies of this 
> message.  Also, email is susceptible to data corruption, 
> interception, tampering, unauthorized amendment and viruses. 
> We only send and receive emails on the basis that we are not 
> liable for any such corruption, interception, tampering, 
> amendment or viruses or any consequence thereof.
> 
> 
> -
> 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: Application.properties

2003-09-15 Thread Paananen, Tero
> Please suggest some ideas or code which will help in creating 
> an extension
> so that the properties can be loaded from database dynamically.

Extend the message resources class you're currently
using and implement a reload() (or whatever) method
in your extended class. Call the reload() method
when appropriate.

-TPP

-
This email may contain confidential and privileged material for the sole use of the 
intended recipient(s). Any review, use, retention, distribution or disclosure by 
others is strictly prohibited. If you are not the intended recipient (or authorized to 
receive for the recipient), please contact the sender by reply email and delete all 
copies of this message.  Also, email is susceptible to data corruption, interception, 
tampering, unauthorized amendment and viruses. We only send and receive emails on the 
basis that we are not liable for any such corruption, interception, tampering, 
amendment or viruses or any consequence thereof.


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



Application.properties

2003-09-15 Thread Srikanth Gubba
Hi,

Does anyone know ways to dynamically load application properties file so
that we donot have to reload container when a change has been made in the
properties file.

I have seen the Message-Resources DB application (using OJB) by James
Mitchell using which we can put the properties in a database and retrieve
them . But It also needs the container to be reloaded when a change has been
made.

Please suggest some ideas or code which will help in creating an extension
so that the properties can be loaded from database dynamically.

Thanks
Srikanth.

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



Re: changes in application.properties does not vent itself ...

2003-08-21 Thread Jiri Chaloupka
Huh ..
now I see that it is in classes/resources ...
now it is works
Cezar Nasui wrote:

Hi

Usualy restarting Tomcat or reloading the app from Tomcat Maanger should do
the trick,
Maybe try clearing the cache of the browser,
HTH,
Cezar
Hallo,
i want to try to change some value in application.properties file :
welcome.title=myTest Application
but browser shows still the old value.
I was tied to restart application (unzipped war), application server
(JBoss) and all computer too, but there is stil old value.
Where can be mistake?
my konfiguration:
Struts 1.1, JBoss 3.2.1 with Tomcat container, JDK SUN 1.4.2, OS Linux
and Win too
Thanks, Jiri

 



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


Re: changes in application.properties does not vent itself ...

2003-08-21 Thread Jiri Chaloupka
Hmmm ...
I was stop all JBoss, clear temps in disk, clear cache in browser, but 
it sis still dzsplazs old value.

in deploy/test.war/WEB-INF/src/java/resources/application.properties is 
new value but server still displays old :(
in struts-config is default:


What can I find ?

Cezar Nasui wrote:

Hi

Usualy restarting Tomcat or reloading the app from Tomcat Maanger should do
the trick,
Maybe try clearing the cache of the browser,
HTH,
Cezar
Hallo,
i want to try to change some value in application.properties file :
welcome.title=myTest Application
but browser shows still the old value.
I was tied to restart application (unzipped war), application server
(JBoss) and all computer too, but there is stil old value.
Where can be mistake?
my konfiguration:
Struts 1.1, JBoss 3.2.1 with Tomcat container, JDK SUN 1.4.2, OS Linux
and Win too
Thanks, Jiri

 



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


RE: changes in application.properties does not vent itself ...

2003-08-21 Thread Cezar Nasui
Hi

Usualy restarting Tomcat or reloading the app from Tomcat Maanger should do
the trick,
Maybe try clearing the cache of the browser,
HTH,
Cezar

Hallo,
i want to try to change some value in application.properties file :
welcome.title=myTest Application

but browser shows still the old value.
I was tied to restart application (unzipped war), application server
(JBoss) and all computer too, but there is stil old value.

Where can be mistake?
my konfiguration:
Struts 1.1, JBoss 3.2.1 with Tomcat container, JDK SUN 1.4.2, OS Linux
and Win too

Thanks, Jiri


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.509 / Virus Database: 306 - Release Date: 8/12/2003


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



changes in application.properties does not vent itself ...

2003-08-21 Thread Jiri Chaloupka
Hallo,
i want to try to change some value in application.properties file :
welcome.title=myTest Application
but browser shows still the old value.
I was tied to restart application (unzipped war), application server 
(JBoss) and all computer too, but there is stil old value.

Where can be mistake?
my konfiguration:
Struts 1.1, JBoss 3.2.1 with Tomcat container, JDK SUN 1.4.2, OS Linux 
and Win too

Thanks, Jiri

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


application.properties question

2003-08-14 Thread David Thielen
Hi;

The application.properties file that comes with the blank struts sample has a bunch of 
strings already in it. Are these strings needed by struts or are they just suggested 
strings for sample errors I might have in my pages?

Also, are these sample files available in languages other than english? And if so, 
where do I get them?

thanks - dave

RE: application.properties question

2003-08-14 Thread Bailey, Shane C.


They are suggested strings.  For instance if you don't have the error
prefix, suffix, header and footer specified then you won't get an exception
thrown or anything you just won't get anything printed.  You can change the
value if you don't like the error display formatting.

In general, I haven't seen the Validator blow up if a message didn't exist
(it just prints blank).  If you use tags that reference messages that don't
exist I think you get an exception thrown on the page.

As far as other languages go, I would say do a find in the Struts directory
for *.properties and see.  I don't have specs to implement
internationalization.

What do you call someone who knows 3 languages?
Trilingual.

What do you call someone who knows 2 languages?
Bilingual.

What do you call someone who knows 1 language?
An American.

:)



-Original Message-
From: David Thielen [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 12, 2003 1:11 PM
To: Struts-Users
Subject: application.properties question

Hi;

The application.properties file that comes with the blank struts sample has
a bunch of strings already in it. Are these strings needed by struts or are
they just suggested strings for sample errors I might have in my pages?

Also, are these sample files available in languages other than english? And
if so, where do I get them?

thanks - dave

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



application.properties file location

2003-08-14 Thread Samanth Athrey
Hi,

I have my application.properties file stored in the classes directory. But
the application is unable to locate and load this file. Any tips would be of
great help.

Thanks,
Samanth Athrey




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



Re: application.properties file location

2003-08-14 Thread Florent LOTHON
Are you sure of you declaration in your struts-config.xml ?

For example if your Ressources file is in classes/packageName/ directory you
must declare as this :

blablabla...




Florent

-Message d'origine-
De : Samanth Athrey <[EMAIL PROTECTED]>
À : [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date : mercredi 13 août 2003 16:57
Objet : application.properties file location


>Hi,
>
>I have my application.properties file stored in the classes directory. But
>the application is unable to locate and load this file. Any tips would be
of
>great help.
>
>Thanks,
>Samanth Athrey
>
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>


--
Ce message est protege par les regles relatives au secret des correspondances ; il 
peut en outre contenir des informations a caractere confidentiel ou protegees par 
differentes regles et notamment le secret des affaires ; il est etabli a destination 
exclusive de son destinataire. Toute divulgation, utilisation, diffusion ou 
reproduction (totale ou partielle) de ce message, ou des informations qu'il contient, 
doit etre prealablement autorisee. 
Tout message electronique est susceptible d'alteration et son integrite ne peut etre 
assuree. Les AGF declinent toute responsabilite au titre de ce message s'il a ete 
modifie ou falsifie. 
Si vous n'etes pas destinataire de ce message, merci de le detruire immediatement et 
d'avertir l'expediteur de l'erreur de distribution et de la destruction du message.
This message is protected by the secrecy of correspondence rules ; furthermore it may 
contain privileged or confidential information that is protected by law, notably by 
the secrecy of business relations rule ; it is intended solely for the attention of   
the addressee . Any disclosure, use, dissemination or reproduction (either whole or  
partial) of this message or the information contained herein is strictly prohibited 
without prior consent.
Any electronic message  is susceptible to alteration  and  its integrity can not be 
assured.  AGF declines any  responsibility for  this message in the event of  
alteration  or falsification..
If you are not the intended  recipient, please destroy it immediately and  notify the 
sender of the wrong delivery and the mail deletion. 
--



RE: application.properties file location

2003-08-14 Thread Kommana, Sridhar
1.you can specify application.properties file in struts-config.xml as follows:

  

2.you can specify application.properties file in web.xml as follows:

  
action
org.apache.struts.action.ActionServlet

  config
  /WEB-INF/struts-config.xml


application
/ApplicationResources

  

just i want to curious about which one is better approach,ofcourse both will work fine.

Thanks,

-Original Message-
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 13, 2003 12:13 PM
To: 'Struts Users Mailing List'
Subject: RE: application.properties file location



IMO, struts config.  I didn't know you could do it in the web.xml, never had
to, works great in the struts config.


-Original Message-
From: Kommana, Sridhar [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2003 12:58 PM
To: Struts Users Mailing List
Subject: RE: application.properties file location

what is the best place to specify application.properties file in either
web.xml or struts-config.xml ?

-
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: application.properties file location

2003-08-14 Thread Bailey, Shane C.

IMO, struts config.  I didn't know you could do it in the web.xml, never had
to, works great in the struts config.


-Original Message-
From: Kommana, Sridhar [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2003 12:58 PM
To: Struts Users Mailing List
Subject: RE: application.properties file location

what is the best place to specify application.properties file in either
web.xml or struts-config.xml ?

-
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: application.properties file location

2003-08-14 Thread Bailey, Shane C.

>From what you are saying I think you should try:

 
in your struts config file.  Since you specifically say
"application.properties" as the name of your file.

For instance my file is also called "application.properties" as opposed to
"aApplicationResources.properties" or something.  But since mine in a
resources directory off of the classes directory I declare mine as:



So I am assuming struts takes the last name in the parameter as the file
name and anything before it as directory structure.



-Message d'origine-
De : Samanth Athrey <[EMAIL PROTECTED]>
À : [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date : mercredi 13 août 2003 16:57
Objet : application.properties file location


>Hi,
>
>I have my application.properties file stored in the classes directory. But
>the application is unable to locate and load this file. Any tips would be
of
>great help.
>
>Thanks,
>Samanth Athrey
>
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>


--
Ce message est protege par les regles relatives au secret des
correspondances ; il peut en outre contenir des informations a caractere
confidentiel ou protegees par differentes regles et notamment le secret des
affaires ; il est etabli a destination exclusive de son destinataire. Toute
divulgation, utilisation, diffusion ou reproduction (totale ou partielle) de
ce message, ou des informations qu'il contient, doit etre prealablement
autorisee. 
Tout message electronique est susceptible d'alteration et son integrite ne
peut etre assuree. Les AGF declinent toute responsabilite au titre de ce
message s'il a ete modifie ou falsifie. 
Si vous n'etes pas destinataire de ce message, merci de le detruire
immediatement et d'avertir l'expediteur de l'erreur de distribution et de la
destruction du message.
This message is protected by the secrecy of correspondence rules ;
furthermore it may contain privileged or confidential information that is
protected by law, notably by the secrecy of business relations rule ; it is
intended solely for the attention of   the addressee . Any disclosure, use,
dissemination or reproduction (either whole or  partial) of this message or
the information contained herein is strictly prohibited without prior
consent.
Any electronic message  is susceptible to alteration  and  its integrity can
not be assured.  AGF declines any  responsibility for  this message in the
event of  alteration  or falsification..
If you are not the intended  recipient, please destroy it immediately and
notify the sender of the wrong delivery and the mail deletion. 
--


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



RE: application.properties file location

2003-08-14 Thread Kommana, Sridhar
what is the best place to specify application.properties file in either web.xml or 
struts-config.xml ?

-Original Message-
From: Micael [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 13, 2003 10:19 AM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Re: application.properties file location


Do you have the application param specified for the action servlet in your 
web.xml?  If not, I would suggest you look at a standard setup in the 
examples and see how they reference the application.properties file.

Here is how I do it in one instance:


   

   
 action
 org.apache.struts.action.ActionServlet
 
   application
   resources.properties.messages
 
 
   config
   /WEB-INF/struts-config.xml
 
 
   debug
   2
 
 
   detail
   2
 
 1
   

This means I have the messages.properties (which is the same as your 
application.properties with a different name) file in a directory/folder 
called "resources" in classes.

'Hope this helps.

Micael

At 08:27 PM 8/13/2003 +0530, Samanth Athrey wrote:
>Hi,
>
>I have my application.properties file stored in the classes directory. But
>the application is unable to locate and load this file. Any tips would be of
>great help.
>
>Thanks,
>Samanth Athrey
>
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]



LEGAL NOTICE

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank 
you  



-
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: application.properties file location - Internationalisation

2003-08-14 Thread message message
If I get hold of a sample file with Arabic type text, as described below,
then I guess we would be sure of what happens   <:(
So many people logged on this line there must be one person !


From: "Bailey, Shane C." <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
Subject: RE: application.properties file location - Internationalisation
Date: Wed, 13 Aug 2003 13:52:44 -0400


I think everything is supported except diagonal right to left (or is it
diagonal left to right).  Sorry, I'm not sure.  :)
-Original Message-
From: message message [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 13, 2003 1:50 PM
To: [EMAIL PROTECTED]
Subject: RE: application.properties file location - Internationalisation


Also I was curious about languages ( i.e.Arabic based) which are written
from right to left.
Can I have a sample file with right to left text
which says the following
welcome.title=Welcome title
welcome.heading=Welcome heading
welcome.message=To get started on your own application
I want to rename this right to left file to application.properties
and try it out.
Thanks

>From: "Bailey, Shane C." <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
>Subject: RE: application.properties file location - Internationalisation
>Date: Wed, 13 Aug 2003 13:21:23 -0400
>
>
>
>It is built-in to the properties file framework.
>http://java.sun.com/docs/books/tutorial/i18n/intro/steps.html
>
>I believe Struts will get the correct properties file based on the locale
>set for each remote user.
>
>Create files like:
>application.properties
>application_en_US.properties
>application_fr_FR.properties
>application_de_DE.properties
>
>The first one is the default and all the rest should be selected
>automatically depending on the remote user's locale.  I don't have an
>Internationalization specification on my project so this is what I 
beilieve
>to be true.
>
>Someone else can verify.
>
>
>
>
>-Original Message-
>From: message message [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, August 13, 2003 12:35 PM
>To: [EMAIL PROTECTED]
>Subject: RE: application.properties file location - Internationalisation
>
>
>In theory if you have a file called application_fr.properties in your
>/WEB-INF/classes/resources directory then all the text will be
>replaced with French.
>Based on the assumption that the browser is configured to French.
>Therefore no coding is required.
>
>However what happens if the browser is configured to spanish when you 
only
>have a file for French and English ?
>Is there a default or will this an error  ?
>
> >From: "Bailey, Shane C." <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> >Subject: RE: application.properties file location
> >Date: Wed, 13 Aug 2003 11:51:53 -0400
> >
> >
> >From what you are saying I think you should try:
> >
> >
> >in your struts config file.  Since you specifically say
> >"application.properties" as the name of your file.
> >
> >For instance my file is also called "application.properties" as opposed
>to
> >"aApplicationResources.properties" or something.  But since mine in a
> >resources directory off of the classes directory I declare mine as:
> >
> >
> >
> >So I am assuming struts takes the last name in the parameter as the 
file
> >name and anything before it as directory structure.
> >
> >
> >
> >-Message d'origine-
> >De : Samanth Athrey <[EMAIL PROTECTED]>
> >À : [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> >Date : mercredi 13 août 2003 16:57
> >Objet : application.properties file location
> >
> >
> > >Hi,
> > >
> > >I have my application.properties file stored in the classes 
directory.
> >But
> > >the application is unable to locate and load this file. Any tips 
would
>be
> >of
> > >great help.
> > >
> > >Thanks,
> > >Samanth Athrey
> > >
> > >
> > >
> > >
> > >-
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> >
> >
> >--
> >Ce message est protege par les regles r

RE: application.properties file location - Internationalisation

2003-08-14 Thread message message
In theory if you have a file called application_fr.properties in your
/WEB-INF/classes/resources directory then all the text will be 
replaced with French.
Based on the assumption that the browser is configured to French.
Therefore no coding is required.

However what happens if the browser is configured to spanish when you only 
have a file for French and English ?
Is there a default or will this an error  ?

From: "Bailey, Shane C." <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
Subject: RE: application.properties file location
Date: Wed, 13 Aug 2003 11:51:53 -0400
From what you are saying I think you should try:


in your struts config file.  Since you specifically say
"application.properties" as the name of your file.
For instance my file is also called "application.properties" as opposed to
"aApplicationResources.properties" or something.  But since mine in a
resources directory off of the classes directory I declare mine as:


So I am assuming struts takes the last name in the parameter as the file
name and anything before it as directory structure.


-Message d'origine-
De : Samanth Athrey <[EMAIL PROTECTED]>
À : [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date : mercredi 13 août 2003 16:57
Objet : application.properties file location
>Hi,
>
>I have my application.properties file stored in the classes directory. 
But
>the application is unable to locate and load this file. Any tips would be
of
>great help.
>
>Thanks,
>Samanth Athrey
>
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

--
Ce message est protege par les regles relatives au secret des
correspondances ; il peut en outre contenir des informations a caractere
confidentiel ou protegees par differentes regles et notamment le secret des
affaires ; il est etabli a destination exclusive de son destinataire. Toute
divulgation, utilisation, diffusion ou reproduction (totale ou partielle) 
de
ce message, ou des informations qu'il contient, doit etre prealablement
autorisee.
Tout message electronique est susceptible d'alteration et son integrite ne
peut etre assuree. Les AGF declinent toute responsabilite au titre de ce
message s'il a ete modifie ou falsifie.
Si vous n'etes pas destinataire de ce message, merci de le detruire
immediatement et d'avertir l'expediteur de l'erreur de distribution et de 
la
destruction du message.
This message is protected by the secrecy of correspondence rules ;
furthermore it may contain privileged or confidential information that is
protected by law, notably by the secrecy of business relations rule ; it is
intended solely for the attention of   the addressee . Any disclosure, use,
dissemination or reproduction (either whole or  partial) of this message or
the information contained herein is strictly prohibited without prior
consent.
Any electronic message  is susceptible to alteration  and  its integrity 
can
not be assured.  AGF declines any  responsibility for  this message in the
event of  alteration  or falsification..
If you are not the intended  recipient, please destroy it immediately and
notify the sender of the wrong delivery and the mail deletion.
--

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
http://join.msn.com/?page=features/virus

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


RE: application.properties file location

2003-08-14 Thread Kommana, Sridhar
what is the best place to specify application.properties file in either web.xml or 
struts-config.xml ?

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



RE: application.properties file location - Internationalisation

2003-08-14 Thread Bailey, Shane C.


I think everything is supported except diagonal right to left (or is it
diagonal left to right).  Sorry, I'm not sure.  :)

-Original Message-
From: message message [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2003 1:50 PM
To: [EMAIL PROTECTED]
Subject: RE: application.properties file location - Internationalisation



Also I was curious about languages ( i.e.Arabic based) which are written 
from right to left.
Can I have a sample file with right to left text
which says the following

welcome.title=Welcome title
welcome.heading=Welcome heading
welcome.message=To get started on your own application

I want to rename this right to left file to application.properties
and try it out.

Thanks

>From: "Bailey, Shane C." <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
>Subject: RE: application.properties file location - Internationalisation
>Date: Wed, 13 Aug 2003 13:21:23 -0400
>
>
>
>It is built-in to the properties file framework.
>http://java.sun.com/docs/books/tutorial/i18n/intro/steps.html
>
>I believe Struts will get the correct properties file based on the locale
>set for each remote user.
>
>Create files like:
>application.properties
>application_en_US.properties
>application_fr_FR.properties
>application_de_DE.properties
>
>The first one is the default and all the rest should be selected
>automatically depending on the remote user's locale.  I don't have an
>Internationalization specification on my project so this is what I beilieve
>to be true.
>
>Someone else can verify.
>
>
>
>
>-Original Message-
>From: message message [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, August 13, 2003 12:35 PM
>To: [EMAIL PROTECTED]
>Subject: RE: application.properties file location - Internationalisation
>
>
>In theory if you have a file called application_fr.properties in your
>/WEB-INF/classes/resources directory then all the text will be
>replaced with French.
>Based on the assumption that the browser is configured to French.
>Therefore no coding is required.
>
>However what happens if the browser is configured to spanish when you only
>have a file for French and English ?
>Is there a default or will this an error  ?
>
> >From: "Bailey, Shane C." <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> >Subject: RE: application.properties file location
> >Date: Wed, 13 Aug 2003 11:51:53 -0400
> >
> >
> >From what you are saying I think you should try:
> >
> >
> >in your struts config file.  Since you specifically say
> >"application.properties" as the name of your file.
> >
> >For instance my file is also called "application.properties" as opposed 
>to
> >"aApplicationResources.properties" or something.  But since mine in a
> >resources directory off of the classes directory I declare mine as:
> >
> >
> >
> >So I am assuming struts takes the last name in the parameter as the file
> >name and anything before it as directory structure.
> >
> >
> >
> >-Message d'origine-
> >De : Samanth Athrey <[EMAIL PROTECTED]>
> >À : [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> >Date : mercredi 13 août 2003 16:57
> >Objet : application.properties file location
> >
> >
> > >Hi,
> > >
> > >I have my application.properties file stored in the classes directory.
> >But
> > >the application is unable to locate and load this file. Any tips would 
>be
> >of
> > >great help.
> > >
> > >Thanks,
> > >Samanth Athrey
> > >
> > >
> > >
> > >
> > >-
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> >
> >
> >--
> >Ce message est protege par les regles relatives au secret des
> >correspondances ; il peut en outre contenir des informations a caractere
> >confidentiel ou protegees par differentes regles et notamment le secret 
>des
> >affaires ; il est etabli a destination exclusive de son destinataire. 
>Toute
> >divulgation, utilisation, diffusion ou reproduction (totale ou partielle)
> >de
> >ce message, ou des informations qu'il contient, doit etre prealablement
> >autorisee.
> >Tout 

RE: application.properties file location

2003-08-14 Thread John Cavacas
Would specifying the properties file in both struts-config.xml and web.xml 
allow you to use the  tags in JSTL?

John

At 12:34 PM 13/08/2003 -0500, you wrote:
1.you can specify application.properties file in struts-config.xml as follows:

  

2.you can specify application.properties file in web.xml as follows:

  
action
org.apache.struts.action.ActionServlet

  config
  /WEB-INF/struts-config.xml


application
/ApplicationResources

  
just i want to curious about which one is better approach,ofcourse both 
will work fine.

Thanks,

-Original Message-
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 13, 2003 12:13 PM
To: 'Struts Users Mailing List'
Subject: RE: application.properties file location


IMO, struts config.  I didn't know you could do it in the web.xml, never had
to, works great in the struts config.
-Original Message-
From: Kommana, Sridhar [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 13, 2003 12:58 PM
To: Struts Users Mailing List
Subject: RE: application.properties file location
what is the best place to specify application.properties file in either
web.xml or struts-config.xml ?
-
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]


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


RE: application.properties file location - Internationalisation

2003-08-14 Thread message message


Also I was curious about languages ( i.e.Arabic based) which are written 
from right to left.
Can I have a sample file with right to left text
which says the following

welcome.title=Welcome title
welcome.heading=Welcome heading
welcome.message=To get started on your own application
I want to rename this right to left file to application.properties
and try it out.
Thanks

From: "Bailey, Shane C." <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
Subject: RE: application.properties file location - Internationalisation
Date: Wed, 13 Aug 2003 13:21:23 -0400


It is built-in to the properties file framework.
http://java.sun.com/docs/books/tutorial/i18n/intro/steps.html
I believe Struts will get the correct properties file based on the locale
set for each remote user.
Create files like:
application.properties
application_en_US.properties
application_fr_FR.properties
application_de_DE.properties
The first one is the default and all the rest should be selected
automatically depending on the remote user's locale.  I don't have an
Internationalization specification on my project so this is what I beilieve
to be true.
Someone else can verify.



-Original Message-
From: message message [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 13, 2003 12:35 PM
To: [EMAIL PROTECTED]
Subject: RE: application.properties file location - Internationalisation
In theory if you have a file called application_fr.properties in your
/WEB-INF/classes/resources directory then all the text will be
replaced with French.
Based on the assumption that the browser is configured to French.
Therefore no coding is required.
However what happens if the browser is configured to spanish when you only
have a file for French and English ?
Is there a default or will this an error  ?
>From: "Bailey, Shane C." <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
>Subject: RE: application.properties file location
>Date: Wed, 13 Aug 2003 11:51:53 -0400
>
>
>From what you are saying I think you should try:
>
>
>in your struts config file.  Since you specifically say
>"application.properties" as the name of your file.
>
>For instance my file is also called "application.properties" as opposed 
to
>"aApplicationResources.properties" or something.  But since mine in a
>resources directory off of the classes directory I declare mine as:
>
>
>
>So I am assuming struts takes the last name in the parameter as the file
>name and anything before it as directory structure.
>
>
>
>-Message d'origine-
>De : Samanth Athrey <[EMAIL PROTECTED]>
>À : [EMAIL PROTECTED] <[EMAIL PROTECTED]>
>Date : mercredi 13 août 2003 16:57
>Objet : application.properties file location
>
>
> >Hi,
> >
> >I have my application.properties file stored in the classes directory.
>But
> >the application is unable to locate and load this file. Any tips would 
be
>of
> >great help.
> >
> >Thanks,
> >Samanth Athrey
> >
> >
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
>--
>Ce message est protege par les regles relatives au secret des
>correspondances ; il peut en outre contenir des informations a caractere
>confidentiel ou protegees par differentes regles et notamment le secret 
des
>affaires ; il est etabli a destination exclusive de son destinataire. 
Toute
>divulgation, utilisation, diffusion ou reproduction (totale ou partielle)
>de
>ce message, ou des informations qu'il contient, doit etre prealablement
>autorisee.
>Tout message electronique est susceptible d'alteration et son integrite 
ne
>peut etre assuree. Les AGF declinent toute responsabilite au titre de ce
>message s'il a ete modifie ou falsifie.
>Si vous n'etes pas destinataire de ce message, merci de le detruire
>immediatement et d'avertir l'expediteur de l'erreur de distribution et de
>la
>destruction du message.
>This message is protected by the secrecy of correspondence rules ;
>furthermore it may contain privileged or confidential information that is
>protected by law, notably by the secrecy of business relations rule ; it 
is
>intended solely for the attention of   the addressee . Any disclosure, 
use,
>dissemination or reproduction (either who

RE: application.properties file location - Internationalisation

2003-08-14 Thread Bailey, Shane C.


It is built-in to the properties file framework.
http://java.sun.com/docs/books/tutorial/i18n/intro/steps.html

I believe Struts will get the correct properties file based on the locale
set for each remote user.

Create files like:
application.properties
application_en_US.properties
application_fr_FR.properties
application_de_DE.properties

The first one is the default and all the rest should be selected
automatically depending on the remote user's locale.  I don't have an
Internationalization specification on my project so this is what I beilieve
to be true.

Someone else can verify.




-Original Message-
From: message message [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2003 12:35 PM
To: [EMAIL PROTECTED]
Subject: RE: application.properties file location - Internationalisation


In theory if you have a file called application_fr.properties in your
/WEB-INF/classes/resources directory then all the text will be 
replaced with French.
Based on the assumption that the browser is configured to French.
Therefore no coding is required.

However what happens if the browser is configured to spanish when you only 
have a file for French and English ?
Is there a default or will this an error  ?

>From: "Bailey, Shane C." <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
>Subject: RE: application.properties file location
>Date: Wed, 13 Aug 2003 11:51:53 -0400
>
>
>From what you are saying I think you should try:
>
>
>in your struts config file.  Since you specifically say
>"application.properties" as the name of your file.
>
>For instance my file is also called "application.properties" as opposed to
>"aApplicationResources.properties" or something.  But since mine in a
>resources directory off of the classes directory I declare mine as:
>
>
>
>So I am assuming struts takes the last name in the parameter as the file
>name and anything before it as directory structure.
>
>
>
>-Message d'origine-
>De : Samanth Athrey <[EMAIL PROTECTED]>
>À : [EMAIL PROTECTED] <[EMAIL PROTECTED]>
>Date : mercredi 13 août 2003 16:57
>Objet : application.properties file location
>
>
> >Hi,
> >
> >I have my application.properties file stored in the classes directory. 
>But
> >the application is unable to locate and load this file. Any tips would be
>of
> >great help.
> >
> >Thanks,
> >Samanth Athrey
> >
> >
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
>--
>Ce message est protege par les regles relatives au secret des
>correspondances ; il peut en outre contenir des informations a caractere
>confidentiel ou protegees par differentes regles et notamment le secret des
>affaires ; il est etabli a destination exclusive de son destinataire. Toute
>divulgation, utilisation, diffusion ou reproduction (totale ou partielle) 
>de
>ce message, ou des informations qu'il contient, doit etre prealablement
>autorisee.
>Tout message electronique est susceptible d'alteration et son integrite ne
>peut etre assuree. Les AGF declinent toute responsabilite au titre de ce
>message s'il a ete modifie ou falsifie.
>Si vous n'etes pas destinataire de ce message, merci de le detruire
>immediatement et d'avertir l'expediteur de l'erreur de distribution et de 
>la
>destruction du message.
>This message is protected by the secrecy of correspondence rules ;
>furthermore it may contain privileged or confidential information that is
>protected by law, notably by the secrecy of business relations rule ; it is
>intended solely for the attention of   the addressee . Any disclosure, use,
>dissemination or reproduction (either whole or  partial) of this message or
>the information contained herein is strictly prohibited without prior
>consent.
>Any electronic message  is susceptible to alteration  and  its integrity 
>can
>not be assured.  AGF declines any  responsibility for  this message in the
>event of  alteration  or falsification..
>If you are not the intended  recipient, please destroy it immediately and
>notify the sender of the wrong delivery and the mail deletion.
>--
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

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


-
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: application.properties file location

2003-08-14 Thread message message
Play about with it until it works.

From: "Samanth Athrey" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: application.properties file location
Date: Wed, 13 Aug 2003 20:27:23 +0530
Hi,

I have my application.properties file stored in the classes directory. But
the application is unable to locate and load this file. Any tips would be 
of
great help.

Thanks,
Samanth Athrey


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail

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


RE: application.properties file location - Internationalisation

2003-08-14 Thread Rohit Aeron
It will take default one 

Regards
Rohit

-Original Message-
From: message message [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2003 11:01 PM
To: [EMAIL PROTECTED]
Subject: RE: application.properties file location - Internationalisation


In theory if you have a file called application_fr.properties in
your /WEB-INF/classes/resources directory then all the text will
be replaced with French.
Based on the assumption that the browser is configured to French.
Therefore no coding is required.

However what happens if the browser is configured to spanish when
you only have a file for French and English ?
Is there a default or will this cause an error  ?

>>From: "Bailey, Shane C." <[EMAIL PROTECTED]>
>>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
>>Subject: RE: application.properties file location
>>Date: Wed, 13 Aug 2003 11:51:53 -0400
>>
>>
>>From what you are saying I think you should try:
>>
>>
>>in your struts config file.  Since you specifically say
>>"application.properties" as the name of your file.
>>
>>For instance my file is also called "application.properties" as opposed to
>>"aApplicationResources.properties" or something.  But since mine in a
>>resources directory off of the classes directory I declare mine as:
>>
>>
>>
>>So I am assuming struts takes the last name in the parameter as the file
>>name and anything before it as directory structure.
>>
>>
>>
>>-----Message d'origine-
>>De : Samanth Athrey <[EMAIL PROTECTED]>
>>À : [EMAIL PROTECTED] <[EMAIL PROTECTED]>
>>Date : mercredi 13 août 2003 16:57
>>Objet : application.properties file location
>>
>>
>> >Hi,
>> >
>> >I have my application.properties file stored in the classes directory. >>But
>> >the application is unable to locate and load this file. Any tips would >>be
>>of
>> >great help.
>> >
>> >Thanks,
>> >Samanth Athrey
>> >
>> >
>> >
>> >
>> >-
>> >To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>>
>>
>>--
>>Ce message est protege par les regles relatives au secret des
>>correspondances ; il peut en outre contenir des informations a caractere
>>confidentiel ou protegees par differentes regles et notamment le secret >>des
>>affaires ; il est etabli a destination exclusive de son destinataire. 
>>Toute
>>divulgation, utilisation, diffusion ou reproduction (totale ou partielle) >>de
>>ce message, ou des informations qu'il contient, doit etre prealablement
>>autorisee.
>>Tout message electronique est susceptible d'alteration et son integrite ne
>>peut etre assuree. Les AGF declinent toute responsabilite au titre de ce
>>message s'il a ete modifie ou falsifie.
>>Si vous n'etes pas destinataire de ce message, merci de le detruire
>>immediatement et d'avertir l'expediteur de l'erreur de distribution et de >>la
>>destruction du message.
>>This message is protected by the secrecy of correspondence rules ;
>>furthermore it may contain privileged or confidential information that is
>>protected by law, notably by the secrecy of business relations rule ; it >>is
>>intended solely for the attention of   the addressee . Any disclosure, 
>>use,
>>dissemination or reproduction (either whole or  partial) of this message >>or
>>the information contained herein is strictly prohibited without prior
>>consent.
>>Any electronic message  is susceptible to alteration  and  its integrity >>can
>>not be assured.  AGF declines any  responsibility for  this message in the
>>event of  alteration  or falsification..
>>If you are not the intended  recipient, please destroy it immediately and
>>notify the sender of the wrong delivery and the mail deletion.
>>--
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>_
>MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
>http://join.msn.com/?page=features/virus
>
>
>--

Re: application.properties file location

2003-08-14 Thread Micael
Do you have the application param specified for the action servlet in your 
web.xml?  If not, I would suggest you look at a standard setup in the 
examples and see how they reference the application.properties file.

Here is how I do it in one instance:

  
  
action
org.apache.struts.action.ActionServlet

  application
  resources.properties.messages


  config
  /WEB-INF/struts-config.xml


  debug
  2


  detail
  2

1
  
This means I have the messages.properties (which is the same as your 
application.properties with a different name) file in a directory/folder 
called "resources" in classes.

'Hope this helps.

Micael

At 08:27 PM 8/13/2003 +0530, Samanth Athrey wrote:
Hi,

I have my application.properties file stored in the classes directory. But
the application is unable to locate and load this file. Any tips would be of
great help.
Thanks,
Samanth Athrey


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


LEGAL NOTICE

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank 
you  



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


RE: application.properties file location - Internationalisation

2003-08-14 Thread message message
In theory if you have a file called application_fr.properties in
your /WEB-INF/classes/resources directory then all the text will
be replaced with French.
Based on the assumption that the browser is configured to French.
Therefore no coding is required.
However what happens if the browser is configured to spanish when
you only have a file for French and English ?
Is there a default or will this cause an error  ?
From: "Bailey, Shane C." <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
Subject: RE: application.properties file location
Date: Wed, 13 Aug 2003 11:51:53 -0400
From what you are saying I think you should try:


in your struts config file.  Since you specifically say
"application.properties" as the name of your file.
For instance my file is also called "application.properties" as opposed to
"aApplicationResources.properties" or something.  But since mine in a
resources directory off of the classes directory I declare mine as:


So I am assuming struts takes the last name in the parameter as the file
name and anything before it as directory structure.


-Message d'origine-
De : Samanth Athrey <[EMAIL PROTECTED]>
À : [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date : mercredi 13 août 2003 16:57
Objet : application.properties file location
>Hi,
>
>I have my application.properties file stored in the classes directory. 
But
>the application is unable to locate and load this file. Any tips would 
be
of
>great help.
>
>Thanks,
>Samanth Athrey
>
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

--
Ce message est protege par les regles relatives au secret des
correspondances ; il peut en outre contenir des informations a caractere
confidentiel ou protegees par differentes regles et notamment le secret 
des
affaires ; il est etabli a destination exclusive de son destinataire. 
Toute
divulgation, utilisation, diffusion ou reproduction (totale ou partielle) 
de
ce message, ou des informations qu'il contient, doit etre prealablement
autorisee.
Tout message electronique est susceptible d'alteration et son integrite ne
peut etre assuree. Les AGF declinent toute responsabilite au titre de ce
message s'il a ete modifie ou falsifie.
Si vous n'etes pas destinataire de ce message, merci de le detruire
immediatement et d'avertir l'expediteur de l'erreur de distribution et de 
la
destruction du message.
This message is protected by the secrecy of correspondence rules ;
furthermore it may contain privileged or confidential information that is
protected by law, notably by the secrecy of business relations rule ; it 
is
intended solely for the attention of   the addressee . Any disclosure, 
use,
dissemination or reproduction (either whole or  partial) of this message 
or
the information contained herein is strictly prohibited without prior
consent.
Any electronic message  is susceptible to alteration  and  its integrity 
can
not be assured.  AGF declines any  responsibility for  this message in the
event of  alteration  or falsification..
If you are not the intended  recipient, please destroy it immediately and
notify the sender of the wrong delivery and the mail deletion.
--

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
http://join.msn.com/?page=features/virus

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus

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


RE: application.properties file location - Internationalisation

2003-08-14 Thread Paananen, Tero
> However what happens if the browser is configured to
> spanish when you only have a file for French and English ?
> Is there a default or will this cause an error  ?

It will fall back to using the default resources
defined in "application.properties".

If you do not have a default properties file, there
will be an exception (unless you surpress that in
the message tag).

-TPP

-
This email may contain confidential and privileged material for the sole use of the 
intended recipient(s). Any review, use, retention, distribution or disclosure by 
others is strictly prohibited. If you are not the intended recipient (or authorized to 
receive for the recipient), please contact the sender by reply email and delete all 
copies of this message.  Also, email is susceptible to data corruption, interception, 
tampering, unauthorized amendment and viruses. We only send and receive emails on the 
basis that we are not liable for any such corruption, interception, tampering, 
amendment or viruses or any consequence thereof.


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



Re: application.properties file location

2003-08-14 Thread Julie . Huang
did you put it your struts-config file?

i have the following in my struts-config.xml file:

 
( I put it into my resources directory) 




"Samanth Athrey" <[EMAIL PROTECTED]>
08/13/03 10:57 AM
Please respond to "Struts Users Mailing List"

 
To: [EMAIL PROTECTED]
cc: 
Subject:application.properties file location


Hi,

I have my application.properties file stored in the classes directory. But
the application is unable to locate and load this file. Any tips would be 
of
great help.

Thanks,
Samanth Athrey




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





= = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = = 
This transmittal and any attachments may contain confidential, privileged or sensitive 
information and is solely for the use of the intended recipient. If you are not 
intended recipient, you are hereby notified that you have received this transmittal 
and any such attachments in error and any review, dissemination, distribution or 
copying thereof is strictly prohibited. If you have received this transmittal and any 
attachments in error please notify the sender and immediately destroy the message and 
all its attachments. Any opinions herein expressed may be those of the author and not 
necessarily of Mizuho Corporate Bank, Ltd (the "Bank"). The Bank accepts no 
responsibility for the accuracy or completeness of any information herein contained.
= = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = = 



RE: How do you access an application.properties value directly fr om within a class?

2003-07-15 Thread Chen, Gin
yuk how about a much cleaner way using jstl?






Where ApplicationResources is the the name without .properties suffix.
-Tim

-Original Message-
From: Raible, Matt [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 15, 2003 2:53 PM
To: 'Struts Users Mailing List'
Subject: RE: How do you access an application.properties value directly
fr om within a class?


Or how about an ugly way? ;-)

<%@ page import="org.apache.struts.util.MessageResources,
 org.apache.struts.action.Action"%>

<% 
MessageResources resources = 
(MessageResources) request.getAttribute(Action.MESSAGES_KEY); 
%>

<%=resources.getMessage("userForm.userId")%>

Matt

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 15, 2003 12:04 PM
To: Struts Users Mailing List
Subject: Re: How do you access an application.properties value directly
from within a class?


You mean like this?


 




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


- Original Message -
From: "Mike Deegan" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, July 15, 2003 1:53 PM
Subject: Re: How do you access an application.properties value directly from
within a class?


> Hey Matt / All,
>
> Do you have an elegant way -  in scriptlet form - at the JSP level to grab
> an application.properties value to then use as a JSP expression (
<%=...%>)
> in the "value" attribute of a tag.
>
> I had tried to use the bean:message tag to get the "value" to populate
into
> the "value" attribute of another tag - that is when trying to combine two
> tags - but the page fails to compile. Can't remember the exact error msg
but
> it was along the lines of " = expected ..."
>
> I know you can use JSP expressions ( <%=...%>) in the "value" attribute of
> tags - but JSP compile fails when I try to use bean:message tag to
directly
> populate a tag's "value" attribute.
>
> So do you have an elegant way -  in scriptlet form - at the JSP level to
> grab an application.properties value to then use as a JSP expression (
> <%=...%>) in the "value" attribute of a tag.
>
> I searched for some time for an answer on this but got lost in the maze.
> Maybe the wording of my searches let me down.
>
> Or should I be attempting to do this in another way ... without scriptlets
> ... to get an application.properties value to populate into the "value"
> attribute of another tag.
>
> Any help appreciated ...
> Mike
>
> - Original Message -
> From: "Raible, Matt" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Tuesday, July 15, 2003 10:53 AM
> Subject: RE: How do you access an application.properties value directly fr
> om within a class?
>
>
> > I forgot to add the simplest way in an Action class:
> >
> > MessageResources resources = getResources(request);
> >
> > resources.getMessage("keyName");
> >
> >
> > -Original Message-
> > From: Raible, Matt
> > Sent: Tuesday, July 15, 2003 10:51 AM
> > To: 'Struts Users Mailing List'
> > Subject: RE: How do you access an application.properties value directly
> > fr om within a class?
> >
> >
> > If you're just looking for the values, grab it as a resource bundle.
> Here's
> > how I grab it in a Business Delegate:
> >
> > // Get the application's messages resources
> > ResourceBundle resources =
> > ResourceBundle.getBundle("ApplicationResources");
> > String appDBVersion = resources.getString("webapp.db_version");
> >
> > And then of course, there's errors and messages - where it grabs it
> > automagically:
> >
> > errors.add(ActionErrors.GLOBAL_ERROR,
> >new ActionError("errors.existing.user",
> >userForm.getUsername(),
> >userForm.getEmail()));
> >
> > messages.add(ActionMessages.GLOBAL_MESSAGE,
> >  new ActionMessage("user.deleted",
> > userForm.getEmail()));
> >
> > And lastly, you can get it from the servlet context in a servlet outside
> of
> > struts:
> >
> > MessageResources resources =
> > ((MessageResources)
> > getServletContext().getAttribute(Globals.MESSAGES_KEY));
> >
> > resources.getMessage(

RE: How do you access an application.properties value directly from within a class?

2003-07-15 Thread Raible, Matt
Or how about an ugly way? ;-)

<%@ page import="org.apache.struts.util.MessageResources,
 org.apache.struts.action.Action"%>

<% 
MessageResources resources = 
(MessageResources) request.getAttribute(Action.MESSAGES_KEY); 
%>

<%=resources.getMessage("userForm.userId")%>

Matt

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 15, 2003 12:04 PM
To: Struts Users Mailing List
Subject: Re: How do you access an application.properties value directly
from within a class?


You mean like this?


 




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


- Original Message -
From: "Mike Deegan" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, July 15, 2003 1:53 PM
Subject: Re: How do you access an application.properties value directly from
within a class?


> Hey Matt / All,
>
> Do you have an elegant way -  in scriptlet form - at the JSP level to grab
> an application.properties value to then use as a JSP expression (
<%=...%>)
> in the "value" attribute of a tag.
>
> I had tried to use the bean:message tag to get the "value" to populate
into
> the "value" attribute of another tag - that is when trying to combine two
> tags - but the page fails to compile. Can't remember the exact error msg
but
> it was along the lines of " = expected ..."
>
> I know you can use JSP expressions ( <%=...%>) in the "value" attribute of
> tags - but JSP compile fails when I try to use bean:message tag to
directly
> populate a tag's "value" attribute.
>
> So do you have an elegant way -  in scriptlet form - at the JSP level to
> grab an application.properties value to then use as a JSP expression (
> <%=...%>) in the "value" attribute of a tag.
>
> I searched for some time for an answer on this but got lost in the maze.
> Maybe the wording of my searches let me down.
>
> Or should I be attempting to do this in another way ... without scriptlets
> ... to get an application.properties value to populate into the "value"
> attribute of another tag.
>
> Any help appreciated ...
> Mike
>
> - Original Message -
> From: "Raible, Matt" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Tuesday, July 15, 2003 10:53 AM
> Subject: RE: How do you access an application.properties value directly fr
> om within a class?
>
>
> > I forgot to add the simplest way in an Action class:
> >
> > MessageResources resources = getResources(request);
> >
> > resources.getMessage("keyName");
> >
> >
> > -Original Message-
> > From: Raible, Matt
> > Sent: Tuesday, July 15, 2003 10:51 AM
> > To: 'Struts Users Mailing List'
> > Subject: RE: How do you access an application.properties value directly
> > fr om within a class?
> >
> >
> > If you're just looking for the values, grab it as a resource bundle.
> Here's
> > how I grab it in a Business Delegate:
> >
> > // Get the application's messages resources
> > ResourceBundle resources =
> > ResourceBundle.getBundle("ApplicationResources");
> > String appDBVersion = resources.getString("webapp.db_version");
> >
> > And then of course, there's errors and messages - where it grabs it
> > automagically:
> >
> > errors.add(ActionErrors.GLOBAL_ERROR,
> >new ActionError("errors.existing.user",
> >userForm.getUsername(),
> >userForm.getEmail()));
> >
> > messages.add(ActionMessages.GLOBAL_MESSAGE,
> >  new ActionMessage("user.deleted",
> > userForm.getEmail()));
> >
> > And lastly, you can get it from the servlet context in a servlet outside
> of
> > struts:
> >
> >     MessageResources resources =
> > ((MessageResources)
> > getServletContext().getAttribute(Globals.MESSAGES_KEY));
> >
> > resources.getMessage("userFormEx.username");
> >
> >
> > HTH,
> >
> > Matt
> >
> > -Original Message-
> > From: Mark Galbreath [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, July 15, 2003 10:28 AM
> > To: 'Struts Users Mailing List'
> > Subject: How do you access an application.properties value directly f

Re[2]: How do you access an application.properties value directly fr om within a class?

2003-07-15 Thread Martin Naskovski
Can you also somehow check from a JSP whether a certain message resource
key is set to a certain value and then render certain HTML based on that
value, or not? Thanks

Martin

Tuesday, July 15, 2003, 9:53:51 AM, you wrote:

RM> I forgot to add the simplest way in an Action class:

RM> MessageResources resources = getResources(request);

RM> resources.getMessage("keyName");


RM> -Original Message-
RM> From: Raible, Matt 
RM> Sent: Tuesday, July 15, 2003 10:51 AM
RM> To: 'Struts Users Mailing List'
RM> Subject: RE: How do you access an application.properties value directly
RM> fr om within a class?


RM> If you're just looking for the values, grab it as a resource bundle. Here's
RM> how I grab it in a Business Delegate:

RM> // Get the application's messages resources
RM> ResourceBundle resources =
RM> ResourceBundle.getBundle("ApplicationResources");
RM> String appDBVersion = resources.getString("webapp.db_version");

RM> And then of course, there's errors and messages - where it grabs it
RM> automagically:

RM> errors.add(ActionErrors.GLOBAL_ERROR,
RM>new ActionError("errors.existing.user",
RM>userForm.getUsername(),
RM>userForm.getEmail()));

RM> messages.add(ActionMessages.GLOBAL_MESSAGE,
RM>  new ActionMessage("user.deleted",
RM> userForm.getEmail()));

RM> And lastly, you can get it from the servlet context in a servlet outside of
RM> struts:

RM> MessageResources resources =
RM> ((MessageResources)
RM> getServletContext().getAttribute(Globals.MESSAGES_KEY));

RM> resources.getMessage("userFormEx.username");


RM> HTH,

RM> Matt


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



Re: How do you access an application.properties value directly from within a class?

2003-07-15 Thread Mike Deegan
Thanks Konstadinis and James !
Appreciate the help - had a mental block after a week long Stampede party
here in Calgary.

Mike

- Original Message - 
From: "Konstadinis Euaggelos" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Saturday, February 15, 2003 1:00 PM
Subject: Re: How do you access an application.properties value directly from
within a class?


> You can use this,
> 
>
> You can use the key as a scriplet   <% =key%>
>
>
> This solution works also in the following case ,
> if you want to display a title in your button if your write title =
> ""
> it willn 't work ,
>
> Following the above solution it works,
>
>  title="<%="["+key+"]"%>" >
>  key="button.previous"/>
> 
>
>
>
>
>
> - Original Message -
> From: "Mike Deegan" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Tuesday, July 15, 2003 7:53 PM
> Subject: Re: How do you access an application.properties value directly
from
> within a class?
>
>
> > Hey Matt / All,
> >
> > Do you have an elegant way -  in scriptlet form - at the JSP level to
grab
> > an application.properties value to then use as a JSP expression (
> <%=...%>)
> > in the "value" attribute of a tag.
> >
> > I had tried to use the bean:message tag to get the "value" to populate
> into
> > the "value" attribute of another tag - that is when trying to combine
two
> > tags - but the page fails to compile. Can't remember the exact error msg
> but
> > it was along the lines of " = expected ..."
> >
> > I know you can use JSP expressions ( <%=...%>) in the "value" attribute
of
> > tags - but JSP compile fails when I try to use bean:message tag to
> directly
> > populate a tag's "value" attribute.
> >
> > So do you have an elegant way -  in scriptlet form - at the JSP level to
> > grab an application.properties value to then use as a JSP expression (
> > <%=...%>) in the "value" attribute of a tag.
> >
> > I searched for some time for an answer on this but got lost in the maze.
> > Maybe the wording of my searches let me down.
> >
> > Or should I be attempting to do this in another way ... without
scriptlets
> > ... to get an application.properties value to populate into the "value"
> > attribute of another tag.
> >
> > Any help appreciated ...
> > Mike
> >
> > - Original Message -
> > From: "Raible, Matt" <[EMAIL PROTECTED]>
> > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> > Sent: Tuesday, July 15, 2003 10:53 AM
> > Subject: RE: How do you access an application.properties value directly
fr
> > om within a class?
> >
> >
> > > I forgot to add the simplest way in an Action class:
> > >
> > > MessageResources resources = getResources(request);
> > >
> > > resources.getMessage("keyName");
> > >
> > >
> > > -Original Message-
> > > From: Raible, Matt
> > > Sent: Tuesday, July 15, 2003 10:51 AM
> > > To: 'Struts Users Mailing List'
> > > Subject: RE: How do you access an application.properties value
directly
> > > fr om within a class?
> > >
> > >
> > > If you're just looking for the values, grab it as a resource bundle.
> > Here's
> > > how I grab it in a Business Delegate:
> > >
> > > // Get the application's messages resources
> > > ResourceBundle resources =
> > > ResourceBundle.getBundle("ApplicationResources");
> > > String appDBVersion = resources.getString("webapp.db_version");
> > >
> > > And then of course, there's errors and messages - where it grabs it
> > > automagically:
> > >
> > > errors.add(ActionErrors.GLOBAL_ERROR,
> > >    new ActionError("errors.existing.user",
> > >    userForm.getUsername(),
> > >userForm.getEmail()));
> > >
> > > messages.add(ActionMessages.GLOBAL_MESSAGE,
> > >  new ActionMessage("user.deleted",
> > > userForm.getEmail()));
> > >
> > > And lastly, you can get it from the servlet context in a servle

Re: How do you access an application.properties value directly from within a class?

2003-07-15 Thread James Mitchell
You mean like this?


 




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


- Original Message -
From: "Mike Deegan" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, July 15, 2003 1:53 PM
Subject: Re: How do you access an application.properties value directly from
within a class?


> Hey Matt / All,
>
> Do you have an elegant way -  in scriptlet form - at the JSP level to grab
> an application.properties value to then use as a JSP expression (
<%=...%>)
> in the "value" attribute of a tag.
>
> I had tried to use the bean:message tag to get the "value" to populate
into
> the "value" attribute of another tag - that is when trying to combine two
> tags - but the page fails to compile. Can't remember the exact error msg
but
> it was along the lines of " = expected ..."
>
> I know you can use JSP expressions ( <%=...%>) in the "value" attribute of
> tags - but JSP compile fails when I try to use bean:message tag to
directly
> populate a tag's "value" attribute.
>
> So do you have an elegant way -  in scriptlet form - at the JSP level to
> grab an application.properties value to then use as a JSP expression (
> <%=...%>) in the "value" attribute of a tag.
>
> I searched for some time for an answer on this but got lost in the maze.
> Maybe the wording of my searches let me down.
>
> Or should I be attempting to do this in another way ... without scriptlets
> ... to get an application.properties value to populate into the "value"
> attribute of another tag.
>
> Any help appreciated ...
> Mike
>
> - Original Message -
> From: "Raible, Matt" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Tuesday, July 15, 2003 10:53 AM
> Subject: RE: How do you access an application.properties value directly fr
> om within a class?
>
>
> > I forgot to add the simplest way in an Action class:
> >
> > MessageResources resources = getResources(request);
> >
> > resources.getMessage("keyName");
> >
> >
> > -Original Message-
> > From: Raible, Matt
> > Sent: Tuesday, July 15, 2003 10:51 AM
> > To: 'Struts Users Mailing List'
> > Subject: RE: How do you access an application.properties value directly
> > fr om within a class?
> >
> >
> > If you're just looking for the values, grab it as a resource bundle.
> Here's
> > how I grab it in a Business Delegate:
> >
> > // Get the application's messages resources
> > ResourceBundle resources =
> > ResourceBundle.getBundle("ApplicationResources");
> > String appDBVersion = resources.getString("webapp.db_version");
> >
> > And then of course, there's errors and messages - where it grabs it
> > automagically:
> >
> > errors.add(ActionErrors.GLOBAL_ERROR,
> >new ActionError("errors.existing.user",
> >userForm.getUsername(),
> >userForm.getEmail()));
> >
> > messages.add(ActionMessages.GLOBAL_MESSAGE,
> >  new ActionMessage("user.deleted",
> > userForm.getEmail()));
> >
> > And lastly, you can get it from the servlet context in a servlet outside
> of
> > struts:
> >
> > MessageResources resources =
> > ((MessageResources)
> > getServletContext().getAttribute(Globals.MESSAGES_KEY));
> >
> > resources.getMessage("userFormEx.username");
> >
> >
> > HTH,
> >
> > Matt
> >
> > -Original Message-
> > From: Mark Galbreath [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, July 15, 2003 10:28 AM
> > To: 'Struts Users Mailing List'
> > Subject: How do you access an application.properties value directly from
> > within a class?
> >
> >
> > When Struts load, it grabs application.properties and stores it's keys
and
> > values somewhere.  From within an action class I need to access a value
in
> > application.properties.  How could one do this?
> >
> > tia,
> > mark
> >
> >
> >
> > -
> > 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]
> >
> >
>
> -
> 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: How do you access an application.properties value directly from within a class?

2003-07-15 Thread Konstadinis Euaggelos
You can use this,


You can use the key as a scriplet   <% =key%>


This solution works also in the following case ,
if you want to display a title in your button if your write title =
""
it willn 't work ,

Following the above solution it works,

" >







- Original Message -
From: "Mike Deegan" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, July 15, 2003 7:53 PM
Subject: Re: How do you access an application.properties value directly from
within a class?


> Hey Matt / All,
>
> Do you have an elegant way -  in scriptlet form - at the JSP level to grab
> an application.properties value to then use as a JSP expression (
<%=...%>)
> in the "value" attribute of a tag.
>
> I had tried to use the bean:message tag to get the "value" to populate
into
> the "value" attribute of another tag - that is when trying to combine two
> tags - but the page fails to compile. Can't remember the exact error msg
but
> it was along the lines of " = expected ..."
>
> I know you can use JSP expressions ( <%=...%>) in the "value" attribute of
> tags - but JSP compile fails when I try to use bean:message tag to
directly
> populate a tag's "value" attribute.
>
> So do you have an elegant way -  in scriptlet form - at the JSP level to
> grab an application.properties value to then use as a JSP expression (
> <%=...%>) in the "value" attribute of a tag.
>
> I searched for some time for an answer on this but got lost in the maze.
> Maybe the wording of my searches let me down.
>
> Or should I be attempting to do this in another way ... without scriptlets
> ... to get an application.properties value to populate into the "value"
> attribute of another tag.
>
> Any help appreciated ...
> Mike
>
> - Original Message -
> From: "Raible, Matt" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Tuesday, July 15, 2003 10:53 AM
> Subject: RE: How do you access an application.properties value directly fr
> om within a class?
>
>
> > I forgot to add the simplest way in an Action class:
> >
> > MessageResources resources = getResources(request);
> >
> > resources.getMessage("keyName");
> >
> >
> > -Original Message-
> > From: Raible, Matt
> > Sent: Tuesday, July 15, 2003 10:51 AM
> > To: 'Struts Users Mailing List'
> > Subject: RE: How do you access an application.properties value directly
> > fr om within a class?
> >
> >
> > If you're just looking for the values, grab it as a resource bundle.
> Here's
> > how I grab it in a Business Delegate:
> >
> > // Get the application's messages resources
> > ResourceBundle resources =
> > ResourceBundle.getBundle("ApplicationResources");
> > String appDBVersion = resources.getString("webapp.db_version");
> >
> > And then of course, there's errors and messages - where it grabs it
> > automagically:
> >
> > errors.add(ActionErrors.GLOBAL_ERROR,
> >new ActionError("errors.existing.user",
> >userForm.getUsername(),
> >userForm.getEmail()));
> >
> > messages.add(ActionMessages.GLOBAL_MESSAGE,
> >      new ActionMessage("user.deleted",
> > userForm.getEmail()));
> >
> > And lastly, you can get it from the servlet context in a servlet outside
> of
> > struts:
> >
> > MessageResources resources =
> > ((MessageResources)
> > getServletContext().getAttribute(Globals.MESSAGES_KEY));
> >
> > resources.getMessage("userFormEx.username");
> >
> >
> > HTH,
> >
> > Matt
> >
> > -Original Message-
> > From: Mark Galbreath [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, July 15, 2003 10:28 AM
> > To: 'Struts Users Mailing List'
> > Subject: How do you access an application.properties value directly from
> > within a class?
> >
> >
> > When Struts load, it grabs application.properties and stores it's keys
and
> > values somewhere.  From within an action class I need to access a value
in
> > application.properties.  How could one do this?
> >
> > tia,
> > mark
> >
> >
> >
> > -
> > 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]
> >
> >
>
> -
> 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: How do you access an application.properties value directly from within a class?

2003-07-15 Thread Mike Deegan
Hey Matt / All,

Do you have an elegant way -  in scriptlet form - at the JSP level to grab
an application.properties value to then use as a JSP expression ( <%=...%>)
in the "value" attribute of a tag.

I had tried to use the bean:message tag to get the "value" to populate into
the "value" attribute of another tag - that is when trying to combine two
tags - but the page fails to compile. Can't remember the exact error msg but
it was along the lines of " = expected ..."

I know you can use JSP expressions ( <%=...%>) in the "value" attribute of
tags - but JSP compile fails when I try to use bean:message tag to directly
populate a tag's "value" attribute.

So do you have an elegant way -  in scriptlet form - at the JSP level to
grab an application.properties value to then use as a JSP expression (
<%=...%>) in the "value" attribute of a tag.

I searched for some time for an answer on this but got lost in the maze.
Maybe the wording of my searches let me down.

Or should I be attempting to do this in another way ... without scriptlets
... to get an application.properties value to populate into the "value"
attribute of another tag.

Any help appreciated ...
Mike

- Original Message - 
From: "Raible, Matt" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, July 15, 2003 10:53 AM
Subject: RE: How do you access an application.properties value directly fr
om within a class?


> I forgot to add the simplest way in an Action class:
>
> MessageResources resources = getResources(request);
>
> resources.getMessage("keyName");
>
>
> -Original Message-
> From: Raible, Matt
> Sent: Tuesday, July 15, 2003 10:51 AM
> To: 'Struts Users Mailing List'
> Subject: RE: How do you access an application.properties value directly
> fr om within a class?
>
>
> If you're just looking for the values, grab it as a resource bundle.
Here's
> how I grab it in a Business Delegate:
>
> // Get the application's messages resources
> ResourceBundle resources =
> ResourceBundle.getBundle("ApplicationResources");
> String appDBVersion = resources.getString("webapp.db_version");
>
> And then of course, there's errors and messages - where it grabs it
> automagically:
>
> errors.add(ActionErrors.GLOBAL_ERROR,
>new ActionError("errors.existing.user",
>userForm.getUsername(),
>userForm.getEmail()));
>
> messages.add(ActionMessages.GLOBAL_MESSAGE,
>  new ActionMessage("user.deleted",
> userForm.getEmail()));
>
> And lastly, you can get it from the servlet context in a servlet outside
of
> struts:
>
> MessageResources resources =
> ((MessageResources)
> getServletContext().getAttribute(Globals.MESSAGES_KEY));
>
> resources.getMessage("userFormEx.username");
>
>
> HTH,
>
> Matt
>
> -Original Message-
> From: Mark Galbreath [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 15, 2003 10:28 AM
> To: 'Struts Users Mailing List'
> Subject: How do you access an application.properties value directly from
> within a class?
>
>
> When Struts load, it grabs application.properties and stores it's keys and
> values somewhere.  From within an action class I need to access a value in
> application.properties.  How could one do this?
>
> tia,
> mark
>
>
>
> -
> 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]
>
>

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



RE: How do you access an application.properties value directly fr om within a class?

2003-07-15 Thread Mark Galbreath
Nice, clean, elegant solution - thanks a lot, Matt!

-Original Message-
From: Raible, Matt [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 15, 2003 12:54 PM
To: 'Struts Users Mailing List'
Subject: RE: How do you access an application.properties value directly fr
om within a class?


I forgot to add the simplest way in an Action class:

MessageResources resources = getResources(request);

resources.getMessage("keyName");


-Original Message-
From: Raible, Matt 
Sent: Tuesday, July 15, 2003 10:51 AM
To: 'Struts Users Mailing List'
Subject: RE: How do you access an application.properties value directly fr
om within a class?


If you're just looking for the values, grab it as a resource bundle. Here's
how I grab it in a Business Delegate:

// Get the application's messages resources
ResourceBundle resources =
ResourceBundle.getBundle("ApplicationResources");
String appDBVersion = resources.getString("webapp.db_version");

And then of course, there's errors and messages - where it grabs it
automagically:

errors.add(ActionErrors.GLOBAL_ERROR,
   new ActionError("errors.existing.user",
   userForm.getUsername(),
   userForm.getEmail()));

messages.add(ActionMessages.GLOBAL_MESSAGE,
 new ActionMessage("user.deleted",
userForm.getEmail()));

And lastly, you can get it from the servlet context in a servlet outside of
struts:

MessageResources resources =
((MessageResources)
getServletContext().getAttribute(Globals.MESSAGES_KEY));

resources.getMessage("userFormEx.username");


HTH,

Matt

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 15, 2003 10:28 AM
To: 'Struts Users Mailing List'
Subject: How do you access an application.properties value directly from
within a class?


When Struts load, it grabs application.properties and stores it's keys and
values somewhere.  From within an action class I need to access a value in
application.properties.  How could one do this?

tia,
mark



-
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]



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



RE: How do you access an application.properties value directly fr om within a class?

2003-07-15 Thread Raible, Matt
I forgot to add the simplest way in an Action class:

MessageResources resources = getResources(request);

resources.getMessage("keyName");


-Original Message-
From: Raible, Matt 
Sent: Tuesday, July 15, 2003 10:51 AM
To: 'Struts Users Mailing List'
Subject: RE: How do you access an application.properties value directly
fr om within a class?


If you're just looking for the values, grab it as a resource bundle. Here's
how I grab it in a Business Delegate:

// Get the application's messages resources
ResourceBundle resources =
ResourceBundle.getBundle("ApplicationResources");
String appDBVersion = resources.getString("webapp.db_version");

And then of course, there's errors and messages - where it grabs it
automagically:

errors.add(ActionErrors.GLOBAL_ERROR,
   new ActionError("errors.existing.user",
   userForm.getUsername(),
   userForm.getEmail()));

messages.add(ActionMessages.GLOBAL_MESSAGE,
 new ActionMessage("user.deleted",
userForm.getEmail()));

And lastly, you can get it from the servlet context in a servlet outside of
struts:

MessageResources resources =
((MessageResources)
getServletContext().getAttribute(Globals.MESSAGES_KEY));

resources.getMessage("userFormEx.username");


HTH,

Matt

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 15, 2003 10:28 AM
To: 'Struts Users Mailing List'
Subject: How do you access an application.properties value directly from
within a class?


When Struts load, it grabs application.properties and stores it's keys and
values somewhere.  From within an action class I need to access a value in
application.properties.  How could one do this?

tia,
mark



-
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: How do you access an application.properties value directly from within a class?

2003-07-15 Thread Raible, Matt
If you're just looking for the values, grab it as a resource bundle. Here's
how I grab it in a Business Delegate:

// Get the application's messages resources
ResourceBundle resources =
ResourceBundle.getBundle("ApplicationResources");
String appDBVersion = resources.getString("webapp.db_version");

And then of course, there's errors and messages - where it grabs it
automagically:

errors.add(ActionErrors.GLOBAL_ERROR,
   new ActionError("errors.existing.user",
   userForm.getUsername(),
   userForm.getEmail()));

messages.add(ActionMessages.GLOBAL_MESSAGE,
 new ActionMessage("user.deleted",
userForm.getEmail()));

And lastly, you can get it from the servlet context in a servlet outside of
struts:

MessageResources resources =
((MessageResources)
getServletContext().getAttribute(Globals.MESSAGES_KEY));

resources.getMessage("userFormEx.username");


HTH,

Matt

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 15, 2003 10:28 AM
To: 'Struts Users Mailing List'
Subject: How do you access an application.properties value directly from
within a class?


When Struts load, it grabs application.properties and stores it's keys and
values somewhere.  From within an action class I need to access a value in
application.properties.  How could one do this?

tia,
mark



-
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: How do you access an application.properties value directly from within a class?

2003-07-15 Thread Jarnot Voytek Contr AU HQ/SC
getResources()

--
Voytek Jarnot
Quidquid latine dictum sit, altum viditur.


> -Original Message-
> From: Mark Galbreath [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 15, 2003 11:28 AM
> To: 'Struts Users Mailing List'
> Subject: How do you access an application.properties value 
> directly from
> within a class?
> 
> 
> When Struts load, it grabs application.properties and stores 
> it's keys and
> values somewhere.  From within an action class I need to 
> access a value in
> application.properties.  How could one do this?
> 
> tia,
> mark
> 
> 
> 
> -
> 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: How do you access an application.properties value directly fromwithin a class?

2003-07-15 Thread Dichotomy
Hi Mark,

This bit of code should help (from Ted Husted's book! ;-) )

Locale locale = (Locale) session.getAttribute(Action.LOCALE_KEY);
MessageResources messages = servlet.getResources();
String message = messages.getMessage(locale, "important.message");

And if there are replacements ({0}..), eg:
String message = messages.getMessage(locale, "important.message", new Date());

-- 
If education is too expensive, try ignorance.

On Tue, 15 Jul 2003 12:27:51 -0400
"Mark Galbreath" <[EMAIL PROTECTED]> wrote:

> When Struts load, it grabs application.properties and stores it's keys and
> values somewhere.  From within an action class I need to access a value in
> application.properties.  How could one do this?
> 
> tia,
> mark
> 
> 
> 
> -
> 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]



How do you access an application.properties value directly from within a class?

2003-07-15 Thread Mark Galbreath
When Struts load, it grabs application.properties and stores it's keys and
values somewhere.  From within an action class I need to access a value in
application.properties.  How could one do this?

tia,
mark



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



Multiple Application.properties files?

2003-03-20 Thread Mick . Knutson
Is it possible to have 1 global Application.properties for my whole APP, then 1 
specialized Application.properties per  within that APP?



=
Thank You

Mick Knutson

Sr. Designer - Project Trust
aUBS AG, Financial - Zürich
Office: +41 (0)1/234.42.75
Internal: 48194
Mobile: 079.726.14.26

Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.


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



RE: reading data from application.properties (Struts 1.1 RC 1)

2003-03-03 Thread Karr, David
Yes, Struts 1.1 changes (wrt Struts 1.0.2) where you specify the
application properties file.  After your "action-mappings" element, put
something like the following:

  

> -Original Message-
> From: k [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 03, 2003 10:29 AM
> To: struts-user
> Subject: reading data from application.properties (Struts 1.1 RC 1)
> 
> Hi, I am having problem reading data in application.properties.
> 
> Here is the structure of my struts folder inside tomcat4.1.8
> 
> %CATALINA_BASE%/webapps/myproject
> |
> -> Some jsp files.
> -> META-INF
> -> WEB-INF
> |
> ->some struts files as well as web.xml
> ->lib
> ->src
> ->classes
> |
> ->mypackage(named "sung" just in case)
> ->resources
> |
> ->application.properties.
> 
> Whenever my jsp files try to access data(e.g.
> error.login.authenticate=Not Authenticated or userName=defaultName)
> in application.properties, I get an exception as below.
> 
> org.apache.jasper.JasperException: Cannot find message resources under
key
> org.apache.struts.action.MESSAGE
> 
> and it tells me that to root cause is
> 
> javax.servlet.ServletException: Cannot find message resources under
key
> org.apache.struts.action.MESSAGE
> 
> 
> Is it because application.properties file should be located somewhere
> else? or should I specify the location
> of the application.properties file in struts-config.xml?
> 
> I am having no problem starting up Tomcat 4.1.8 though and it does not
> throw any exceptions when I start tomcat.
> But it just
> 
> 
> To get that kind of exception, i used this on my JSP file
> 
> 
> 
> inside application.properties file, i assigned login.title=Login Title
> 
> But when my servlet that extends Action class accesses
> application.properties data, there seems to be no problem though.
> 
> I would really appreciate your help
> Thank you in advance.
> 
> 
>  >> sung <<
> 
> 
> -
> 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]



reading data from application.properties (Struts 1.1 RC 1)

2003-03-03 Thread k
Hi, I am having problem reading data in application.properties.

Here is the structure of my struts folder inside tomcat4.1.8

%CATALINA_BASE%/webapps/myproject
|
-> Some jsp files.
-> META-INF
-> WEB-INF
   |
   ->some struts files as well as web.xml
   ->lib
   ->src
   ->classes
   |
   ->mypackage(named "sung" just in case)
   ->resources
   |
   ->application.properties.
Whenever my jsp files try to access data(e.g. 
error.login.authenticate=Not Authenticated or userName=defaultName)
in application.properties, I get an exception as below.

org.apache.jasper.JasperException: Cannot find message resources under key org.apache.struts.action.MESSAGE

and it tells me that to root cause is

javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE

Is it because application.properties file should be located somewhere else? or 
should I specify the location
of the application.properties file in struts-config.xml?
I am having no problem starting up Tomcat 4.1.8 though and it does not throw any exceptions when I start tomcat.
But it just 

To get that kind of exception, i used this on my JSP file

   

inside application.properties file, i assigned login.title=Login Title

But when my servlet that extends Action class accesses 
application.properties data, there seems to be no problem though.

I would really appreciate your help
Thank you in advance.
>> sung <<

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


Re: How do you let your client edit Application.properties?

2003-02-10 Thread Davor Cengija
Marc Guillemot wrote:

> Hi,
> 
> has someone a great way to suggest to allow non developers to edit the
> different localisations of Application.properties in a "nice" form? I had
> the idea to developp something (Excel macro or java program) to generate
> my different Application.properties files from an excel spreadsheet
> allowing the people making the translations to edit this file.
> Has someone already done something like this? Or do you have a good, safe
> way to let non developers edit the translations?

Well, I have a way which you should not follow: don't just copy properties 
file and handle it to the translators. For some reason, people tend to 
ignore 'do not touch anything on the left side of the equals sign' advice 
and finally you end up with a bunch of missing keys. Obviously, translating 
(and even lectoring keys) is a kind of a challenge for them :-)

It would be elegant if you could provide a simple application which would 
read a property file, display each key with the existing value and a text 
box below it. On submit, generate another properties file and that's it. 
4-5 hours, I'd say.

-- 
[EMAIL PROTECTED]


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




How do you let your client edit Application.properties?

2003-02-10 Thread Marc Guillemot
Hi,

has someone a great way to suggest to allow non developers to edit the
different localisations of Application.properties in a "nice" form? I had
the idea to developp something (Excel macro or java program) to generate my
different Application.properties files from an excel spreadsheet allowing
the people making the translations to edit this file.
Has someone already done something like this? Or do you have a good, safe
way to let non developers edit the translations?

Marc.




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




Re: URGENT: Weblogic Application.properties issue

2002-06-27 Thread @Basebeans.com

Subject: Re: URGENT: Weblogic Application.properties issue
From: "Wayne" <[EMAIL PROTECTED]>
 ===
I am fighting this same issue. I am using struts 1.1b1 with WL 5.1 SP12 with
an exploded WAR. (I tried a while in the WAR)

Here's the error message I receive... any ideas?

java.lang.ClassNotFoundException:
org.apache.struts.util.PropertyMessageResourcesFactory
at
weblogic.boot.ServerClassLoader.findLocalClass(ServerClassLoader.java:372)
at
weblogic.boot.ServerClassLoader.loadClass(ServerClassLoader.java:112)
at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
at
org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:190)
at
org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResource
sFactory.java:169)
at
org.apache.struts.util.MessageResources.getMessageResources(MessageResources
.java:557)
at
org.apache.struts.util.RequestUtils.(RequestUtils.java:137)
at
org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResource
sFactory.java:169)
at
org.apache.struts.util.MessageResources.getMessageResources(MessageResources
.java:557)
at com.mslv.webapp.help.Searcher.(Searcher.java:49)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:232)
at
weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java
:469)
at
weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.ja
va:453)
at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.jav
a:442)
at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.jav
a:361)
at
weblogic.servlet.internal.ServletContextImpl.preloadServlet(ServletContextIm
pl.java:752)
at
weblogic.servlet.internal.ServletContextImpl.preloadServlets(ServletContextI
mpl.java:726)
at
weblogic.t3.srvr.HttpServer.initServletContexts(HttpServer.java:683)
at weblogic.t3.srvr.HttpServer.start(HttpServer.java:479)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:1393)
at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:879)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.Server.startServerDynamically(Server.java:140)
at weblogic.Server.main(Server.java:97)
at weblogic.Server.main(Server.java:58)
[ERROR] MessageResourcesFactory - -MessageResourcesFactory.createFactory

java.lang.ExceptionInInitializerError: java.lang.NullPointerException
at
org.apache.struts.util.MessageResources.getMessageResources(MessageResources
.java:558)
at
org.apache.struts.util.RequestUtils.(RequestUtils.java:137)
at
org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResource
sFactory.java:169)
at
org.apache.struts.util.MessageResources.getMessageResources(MessageResources
.java:557)
at com.mslv.webapp.help.Searcher.(Searcher.java:49)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:232)
at
weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java
:469)
at
weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.ja
va:453)
at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.jav
a:442)
at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.jav
a:361)
at
weblogic.servlet.internal.ServletContextImpl.preloadServlet(ServletContextIm
pl.java:752)
at
weblogic.servlet.internal.ServletContextImpl.preloadServlets(ServletContextI
mpl.java:726)
at
weblogic.t3.srvr.HttpServer.initServletContexts(HttpServer.java:683)
at weblogic.t3.srvr.HttpServer.start(HttpServer.java:479)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:1393)
at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:879)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.Server.startServerDynamically(Server.java:140)
at weblogic.Server.main(Server.java:97)
at weblogic.Server.main(Server.java:58)
[ERROR] MessageResourcesFactory - -MessageResourcesFactory.createFactory

Thu Jun 27 07:36:09 CDT 2002:  Error
instantiating servlet: com.mslv.webapp.help.Searcher
java.lang.ExceptionInInitializerError: java.lang.NullPointerException
at
org.apache.struts.util.MessageResources.getMessageResources(MessageResources
.java:558)

"Chen, Dean (Zhun)" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Hi,
> I have tried deploying the application as either WAR for exploded format.
I
> checked my WAR file and it has the ApplicationResources.properties in it,
> but WebLogic doesn't load that into the working directory and then
complains
> about NullPointerException. When I exploded the WAR file, it appears in
> /WEB-INF/class/com/youcompany/yourapplication pac

URGENT: Weblogic Application.properties issue

2002-06-25 Thread Chen, Dean (Zhun)

Hi,
I have tried deploying the application as either WAR for exploded format. I
checked my WAR file and it has the ApplicationResources.properties in it,
but WebLogic doesn't load that into the working directory and then complains
about NullPointerException. When I exploded the WAR file, it appears in
/WEB-INF/class/com/youcompany/yourapplication package, but WebLogic still
doesn't pick it up. This has been an issue for WebLogic 5.1 for some time
now, however, the solutions posted on the web was to copy them manually to
the working directory. Are there any other ways around it? I'm using Struts
1.1b.

Thanks,

Dean Chen

-Original Message-
From: Anand Raman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 25, 2002 9:04 AM
To: 'Struts Users Mailing List'
Subject: RE: Weblogic Application.properties issue


hi chen

I am not sure how you are deploying your web application. If you are
deploying it the "war" way you need to 
1. place the application resources under the
/WEB-INF/class/com/youcompany/yourapplication package
2. restart the application server 

If you are deploying the application in a exploded war format, then just
place the applicationresources file in the classpath/

Things should start working now. You might have the root proviliges but I am
assuming that you have priviliges to change the application war 

hope this helps
anand

-Original Message-
From: Chen, Dean (Zhun) [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 25, 2002 12:05 AM
To: 'Struts Users Mailing List'
Subject: RE: Weblogic Application.properties issue


I tried copying the ApplicationResources.properties to the correct folder in
_tmp_xxx, however, since I'm not root, I don't have permission to do that?
Are there any work arounds? I saw something for SP8, but I'm not using SP8.
Thanks,

Dean Chen


-Original Message-
From: Chen, Dean (Zhun) 
Sent: Monday, June 24, 2002 2:11 PM
To: 'Struts Users Mailing List'
Subject: RE: Weblogic Application.properties issue


Thanks

Dean Chen


-Original Message-
From: Dan Cancro [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 2:13 PM
To: 'Struts Users Mailing List'
Subject: RE: Weblogic Application.properties issue


Here you go.

http://jakarta.apache.org/struts/doc-1.0.2/installation-wls.html

> -Original Message-
> From: Chen, Dean (Zhun) [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 24, 2002 11:08 AM
> To: 'Struts Users Mailing List'
> Subject: Weblogic Application.properties issue
> Importance: High
> 
> 
> Hi,
> 
> I have a question, for my application, it works fine under 
> Tomcat, however,
> when I try to port it to WebLogic 5.1 SP10, I get this issue: 
> 
> java.lang.NullPointerException
> at
> org.apache.struts.util.MessageResources.getMessageResources(Me
> ssageResources
> .java:558)
> at
> org.apache.struts.action.ActionServlet.initInternal(ActionServ
> let.java:989)
> at
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:411)
> 
> I looked in the _tmp_ folder than WebLogic generates and 
> do not find the
> ApplicationResources.properties file. Is this a WebLogic 
> issue? Is there a
> way to get that file in there? I see the files are created as 
> root but I
> don't have root access. 
> 
> PS> I deployed the application un-war'ed.
> 
> Thanks,
> 
> Dean
> 
> --
> 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]>

--
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: Weblogic Application.properties issue

2002-06-25 Thread Anand Raman

hi chen

I am not sure how you are deploying your web application. If you are
deploying it the "war" way you need to 
1. place the application resources under the
/WEB-INF/class/com/youcompany/yourapplication package
2. restart the application server 

If you are deploying the application in a exploded war format, then just
place the applicationresources file in the classpath/

Things should start working now. You might have the root proviliges but I am
assuming that you have priviliges to change the application war 

hope this helps
anand

-Original Message-
From: Chen, Dean (Zhun) [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 25, 2002 12:05 AM
To: 'Struts Users Mailing List'
Subject: RE: Weblogic Application.properties issue


I tried copying the ApplicationResources.properties to the correct folder in
_tmp_xxx, however, since I'm not root, I don't have permission to do that?
Are there any work arounds? I saw something for SP8, but I'm not using SP8.
Thanks,

Dean Chen


-Original Message-
From: Chen, Dean (Zhun) 
Sent: Monday, June 24, 2002 2:11 PM
To: 'Struts Users Mailing List'
Subject: RE: Weblogic Application.properties issue


Thanks

Dean Chen


-Original Message-
From: Dan Cancro [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 2:13 PM
To: 'Struts Users Mailing List'
Subject: RE: Weblogic Application.properties issue


Here you go.

http://jakarta.apache.org/struts/doc-1.0.2/installation-wls.html

> -Original Message-
> From: Chen, Dean (Zhun) [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 24, 2002 11:08 AM
> To: 'Struts Users Mailing List'
> Subject: Weblogic Application.properties issue
> Importance: High
> 
> 
> Hi,
> 
> I have a question, for my application, it works fine under 
> Tomcat, however,
> when I try to port it to WebLogic 5.1 SP10, I get this issue: 
> 
> java.lang.NullPointerException
> at
> org.apache.struts.util.MessageResources.getMessageResources(Me
> ssageResources
> .java:558)
> at
> org.apache.struts.action.ActionServlet.initInternal(ActionServ
> let.java:989)
> at
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:411)
> 
> I looked in the _tmp_ folder than WebLogic generates and 
> do not find the
> ApplicationResources.properties file. Is this a WebLogic 
> issue? Is there a
> way to get that file in there? I see the files are created as 
> root but I
> don't have root access. 
> 
> PS> I deployed the application un-war'ed.
> 
> Thanks,
> 
> Dean
> 
> --
> 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]>

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



RE: Weblogic Application.properties issue

2002-06-24 Thread Chen, Dean (Zhun)

I tried copying the ApplicationResources.properties to the correct folder in
_tmp_xxx, however, since I'm not root, I don't have permission to do that?
Are there any work arounds? I saw something for SP8, but I'm not using SP8.
Thanks,

Dean Chen


-Original Message-
From: Chen, Dean (Zhun) 
Sent: Monday, June 24, 2002 2:11 PM
To: 'Struts Users Mailing List'
Subject: RE: Weblogic Application.properties issue


Thanks

Dean Chen


-Original Message-
From: Dan Cancro [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 2:13 PM
To: 'Struts Users Mailing List'
Subject: RE: Weblogic Application.properties issue


Here you go.

http://jakarta.apache.org/struts/doc-1.0.2/installation-wls.html

> -Original Message-
> From: Chen, Dean (Zhun) [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 24, 2002 11:08 AM
> To: 'Struts Users Mailing List'
> Subject: Weblogic Application.properties issue
> Importance: High
> 
> 
> Hi,
> 
> I have a question, for my application, it works fine under 
> Tomcat, however,
> when I try to port it to WebLogic 5.1 SP10, I get this issue: 
> 
> java.lang.NullPointerException
> at
> org.apache.struts.util.MessageResources.getMessageResources(Me
> ssageResources
> .java:558)
> at
> org.apache.struts.action.ActionServlet.initInternal(ActionServ
> let.java:989)
> at
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:411)
> 
> I looked in the _tmp_ folder than WebLogic generates and 
> do not find the
> ApplicationResources.properties file. Is this a WebLogic 
> issue? Is there a
> way to get that file in there? I see the files are created as 
> root but I
> don't have root access. 
> 
> PS> I deployed the application un-war'ed.
> 
> Thanks,
> 
> Dean
> 
> --
> 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]>

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




RE: Weblogic Application.properties issue

2002-06-24 Thread Chen, Dean (Zhun)

Thanks

Dean Chen


-Original Message-
From: Dan Cancro [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 2:13 PM
To: 'Struts Users Mailing List'
Subject: RE: Weblogic Application.properties issue


Here you go.

http://jakarta.apache.org/struts/doc-1.0.2/installation-wls.html

> -Original Message-
> From: Chen, Dean (Zhun) [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 24, 2002 11:08 AM
> To: 'Struts Users Mailing List'
> Subject: Weblogic Application.properties issue
> Importance: High
> 
> 
> Hi,
> 
> I have a question, for my application, it works fine under 
> Tomcat, however,
> when I try to port it to WebLogic 5.1 SP10, I get this issue: 
> 
> java.lang.NullPointerException
> at
> org.apache.struts.util.MessageResources.getMessageResources(Me
> ssageResources
> .java:558)
> at
> org.apache.struts.action.ActionServlet.initInternal(ActionServ
> let.java:989)
> at
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:411)
> 
> I looked in the _tmp_ folder than WebLogic generates and 
> do not find the
> ApplicationResources.properties file. Is this a WebLogic 
> issue? Is there a
> way to get that file in there? I see the files are created as 
> root but I
> don't have root access. 
> 
> PS> I deployed the application un-war'ed.
> 
> Thanks,
> 
> Dean
> 
> --
> 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: Weblogic Application.properties issue

2002-06-24 Thread Dan Cancro

Here you go.

http://jakarta.apache.org/struts/doc-1.0.2/installation-wls.html

> -Original Message-
> From: Chen, Dean (Zhun) [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 24, 2002 11:08 AM
> To: 'Struts Users Mailing List'
> Subject: Weblogic Application.properties issue
> Importance: High
> 
> 
> Hi,
> 
> I have a question, for my application, it works fine under 
> Tomcat, however,
> when I try to port it to WebLogic 5.1 SP10, I get this issue: 
> 
> java.lang.NullPointerException
> at
> org.apache.struts.util.MessageResources.getMessageResources(Me
> ssageResources
> .java:558)
> at
> org.apache.struts.action.ActionServlet.initInternal(ActionServ
> let.java:989)
> at
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:411)
> 
> I looked in the _tmp_ folder than WebLogic generates and 
> do not find the
> ApplicationResources.properties file. Is this a WebLogic 
> issue? Is there a
> way to get that file in there? I see the files are created as 
> root but I
> don't have root access. 
> 
> PS> I deployed the application un-war'ed.
> 
> Thanks,
> 
> Dean
> 
> --
> 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]>




Weblogic Application.properties issue

2002-06-24 Thread Chen, Dean (Zhun)

Hi,

I have a question, for my application, it works fine under Tomcat, however,
when I try to port it to WebLogic 5.1 SP10, I get this issue: 

java.lang.NullPointerException
at
org.apache.struts.util.MessageResources.getMessageResources(MessageResources
.java:558)
at
org.apache.struts.action.ActionServlet.initInternal(ActionServlet.java:989)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:411)

I looked in the _tmp_ folder than WebLogic generates and do not find the
ApplicationResources.properties file. Is this a WebLogic issue? Is there a
way to get that file in there? I see the files are created as root but I
don't have root access. 

PS> I deployed the application un-war'ed.

Thanks,

Dean

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