• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What's not working in the code you have written?
 
anu rani
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic