i am able to readthe data in a file(which contains some list of devices) through the following code.
But i need to show this data in a dropdown list after clicking a button in a HTML page.
How can i do that?
Use a java class (not a JSP) to access the File, and store all the items you need to show up in a List or an array. Set that list/array as a request-score attribute when dispatching to the JSP. In your JSP, you can use JSTL for:each tag to iterate over that list/array and display each element as an item in your drop down list.
As we already discuss regarding loading of a file into a dropdown list.
Now in my application i need to load a file according to some option displayed in the dropdown list (contract list). and by clicking some button besides it.
Actually i am extracting contract name and filename from xml using DOM parser and doing viceversa.