Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

How to display the retrive data in select drop down list.

 
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Dear Sir/Madam,
The DATA IS SUCCESFULLY RETRIVE FROM data.txt (data.txt contains: Sumanta,Harish,Jiban).Sir my doubt is i want to display the same data in
select drop list.Could you please help me how to write it.

Please look my code mentioned in the below.


<tr>
<td>Subject of Issue
<select name="selName">
<option value="" selected>---Select the Issue---</option>

<%
try{
String theBR;
String txtValue = "";
File fin=new File("C:/TestData/data.txt");
FileReader fr=new FileReader(fin);
BufferedReader br=new BufferedReader(fr);
theBR=br.readLine();
String[] theSplit=theBR.split(",");
for(int i=0;i<theSplit.length;i++)
out.write(" - "+theSplit[i]);
}catch(Exception Ex){
System.out.println("exception in getting connection"+Ex.getMessage());
}
%>


</select>


Thanks and Regards,
Sumanta Panda
 
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Your other post wasn't closed. It was just moved to a more appropriate forum. Follow the link in big letters at the top of it.
 
Sheriff
Posts: 22819
132
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
But this one is closed now. Here is the moved thread Joanne was talking about.
 
What kind of corn soldier are you? And don't say "kernel" - that's only for this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
    Bookmark Topic Watch Topic
  • New Topic