File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

code to retrieve result from databse which are selected in the list box

 
anu rani
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are some locations dispalyed in a list box. I have select 3 locations. so I need to displayed the result i.e., (the data present in the databse corresponding to the locations) of all the 3 locations at a time. please help me how to do the code in jsp
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's not working in the code you have written?
 
anu rani
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have selected single location in a list box and pass the arg to the next jsp program using request.getParameter.
then i wrote a query "select * from search where location=selected location in the listbox" and it retrieved all the data from the databse pertaining to taht location.

If i select multiple locations how to pass the multiple locations to the next jsp program and how to retrieve data for the multiple locations from the databse using resultset. i need the code. please help urgent
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by anu rani:
i need the code. please help urgent

Then you will need to write it. JavaRanch is not the place to come to get others to do your work for you. It is a learning site where you will get help writing your own code. Please read this for more information.

Also, please read this.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Be sure to follow best practices and not put Java code in JSPs. Your database code especially should be segregated from the UI code.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic