Hi all,
At last I got solution

MessageResources messages =
MessageResources.getMessageResources("/config/messages_EN");
String message = messages.getMessage(request.getLocale(),
"message.delete.error");


Thanks & Regards,
Rajendar

2009/10/15 rajendar are <aare.rajen...@gmail.com>

> Hi,
> Instead of this I used below code in the Dispach Action add method
>
> 1 MessageResources msgRsrc=getResources(request,"fileName");
> 2 String msgProperty =msgRsrc.getMessage("msg.delete.error");
>
> But it will give me null pointer at 2 line.
>
> Regards,
> Rajendar
>
> 2009/10/15 Muthu Velappan <muthu.velap...@aspiresys.com>
>
>
>>
>> Try this one..
>>
>> You can load the properties file in servlet using this line
>>
>>        URL url = servletContext.getResource("/WEB-INF/option.properties");
>>        Properties props = new Properties().load(url.openStream());
>>
>> Now you have all the key value pair from properties files into your
>> properties object. Prepare a collection object from this one and set it to
>> the request and use in jsp.
>>
>> This is a quite a round about workaround but this will work for ur
>> requirement.
>>
>> Thanks,
>> Muthu
>>
>> -----Original Message-----
>> From: rajendar are [mailto:aare.rajen...@gmail.com]
>> Sent: Thursday, October 15, 2009 12:34 PM
>> To: user@struts.apache.org
>> Subject: How to populate drop down from propery file in Struts html
>>
>> Hi,
>>
>> I want to populate drop down in my jsp(struts html) from property
>> file.Still
>> I used property files for Action Fom properties and Messages.Please send
>> if
>> any source code is there other wise please give me idea
>> 1)how can i get the options list from property file to
>> HashMap/TreeMap/ArrayList in my Action
>>
>> After that I will set this to my request and will call in jsp
>>
>>
>>
>> Regards,
>> Rajendar
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>

Reply via email to