aspose file tools*
The moose likes JSP and the fly likes code to retrieve result from databse which are selected in the list box Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "code to retrieve result from databse which are selected in the list box" Watch "code to retrieve result from databse which are selected in the list box" New topic
Author

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

anu rani
Greenhorn

Joined: Aug 29, 2006
Posts: 14
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

Joined: Jan 10, 2002
Posts: 61747
    
  67

What's not working in the code you have written?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
anu rani
Greenhorn

Joined: Aug 29, 2006
Posts: 14
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

Joined: Jan 10, 2002
Posts: 61747
    
  67

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

Joined: Jan 10, 2002
Posts: 61747
    
  67

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
 
subject: code to retrieve result from databse which are selected in the list box