Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Regarding reading a file in a jsp  RSS feed

 
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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?



Thanks for your suggestion.

regards,
rama krishna.y
 
Sheriff
Posts: 5961
904
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
yekkala krishna
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Devaka,

Thanks for your suggestion.
Now i am able to see the list in dropdown list in html.

regards,
rama krishna.y
 
yekkala krishna
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Devaka,

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.





regards,
rama krishna.y
 
Devaka Cooray
Sheriff
Posts: 5961
904
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure if I understand your requirement and the question. Is that viewMapTool.html a static html file? Also I can see a submit button outside your form - was that intentional?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!