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