| | |
displaying data from oracle database in drop down menu using jsp
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Apr 2008
Posts: 1
Reputation:
Solved Threads: 0
Hi,
I am developing one website in which i have around 21 table in my database out of which 8 are master tables and rest are secondry tables. I want the data stored in some columns of master table to be displayed as drop down menu in my secondry table. few Column names are same in secondry table and master table. how do i do that???
I am developing one website in which i have around 21 table in my database out of which 8 are master tables and rest are secondry tables. I want the data stored in some columns of master table to be displayed as drop down menu in my secondry table. few Column names are same in secondry table and master table. how do i do that???
•
•
Join Date: Apr 2008
Posts: 1
Reputation:
Solved Threads: 0
•
•
•
•
Hi,
I am developing one website in which i have around 21 table in my database out of which 8 are master tables and rest are secondry tables. I want the data stored in some columns of master table to be displayed as drop down menu in my secondry table. few Column names are same in secondry table and master table. how do i do that???
http://www.adp-gmbh.ch/ora/sql/outer_join.html
•
•
Join Date: May 2006
Posts: 60
Reputation:
Solved Threads: 0
I think he is asking how to display the column names in dropdown..
If thats the case use java code in your jsp(Though not the best practice).
Create a set with all the values and then parse it to display in the dropdown.. So as you told you dont want repeated data you can use something like this...
so if my value repeats also i wont get repeated value in the result set.. and at the end the set will have only two values.. kaushik and 1234..
Hope that help..
Also remember if you are doing in jsp itself then generic type wont work and throw exceptions afterwards while accessing..
If thats the case use java code in your jsp(Though not the best practice).
Create a set with all the values and then parse it to display in the dropdown.. So as you told you dont want repeated data you can use something like this...
•
•
•
•
Set abcd = new Hashset();
abcd.add("kaushik"); / / these values you can fetch from db
abcd.add("1234");
abcd.add("kaushik");
Hope that help..
Also remember if you are doing in jsp itself then generic type wont work and throw exceptions afterwards while accessing..
Last edited by kaushik259106; Apr 10th, 2008 at 3:00 am.
![]() |
Other Threads in the JSP Forum
- Previous Thread: I want to get my current URL in JSP
- Next Thread: i am stuck up
| Thread Tools | Search this Thread |
apache backbutton combobox connection database development directorystructure dynamicpagetitles eclipse frames glassfish imagetodatabse imageupload internet java javaee javascript jsf jsp jsppagetitles levels mvc2 mvcmodel2 network parameters passing ping printinserverinsteadofclient redirect request.getparameter response servlet servletdopost()readxml sessions software ssl state_saving_method stocks sun tomcat tutorial video web






