Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

DropDown List Problem : file system  RSS feed

 
Ramesh Sunkara
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi..

1) I have a Drop Down List in my JSP page. [ Here, I select the file name. I populated this list from a text file in which I stored a list of file names]

2) I have another drop-down list whose contents are to be retrieved from the file which i selected in the above list.


Can Any one please Help Me.

Thanks,
Ramesh S
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66205
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use Java File I/O. Where's your code? What problems are you having with it?
 
Ramesh Sunkara
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since the value which i selected from Drop Down List is an JavaScript variable , i can't use it in the JSP code. [ I need that variable name to open that particular file ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66205
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like a good use case for Ajax. Upon changing the dropdown, issue an Ajax request a servlet that fetches and returns the file contents (perhaps with the help of a JSP to do formatting).
 
praneel shah
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
kindly use the collection property of combo box to carry forward your list and can you be more specific with your flow?
 
Ramesh Sunkara
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You Praneel!!

Can you please elaborate it.
I dont know collection property.
Am beginner in JSP?
 
praneel shah
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
are you using hibernate?
 
Ramesh Sunkara
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear Bibeault

What you said is 100% correct.

Thanks a lot.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66205
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
praneel shah wrote:kindly use the collection property of combo box ...
Please use correct terminology. There is no "combo box" in HTML. Please read: HtmlHasNoComboBox
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!