473,396 Members | 2,113 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to load database values on a JSP page

250 100+
I'm developing web application using jsp,struts and hibernate. I want to load data base values to dropdownlist. I'm new to struts and hibernet. so i have no idea about how to do that. I have java class and get data using that. Now I want to load that data to dropdown list in another page. How can I do that? please help me.. This is my code in java class.
Expand|Select|Wrap|Line Numbers
  1.  public ArrayList getdataList (){
  2.  
  3.         try {
  4.             session.beginTransaction();
  5.  
  6.  
  7.             Query q = session.createQuery("from xxx where xxx='" + xxx + "'");
  8.             ArrayList con_list = (ArrayList)q.list();
  9.             return con_list;
  10.         } catch (HibernateException hex) {
  11.             hex.printStackTrace();
  12.             return null;
  13.         }
  14.  
  15.     }
  16.  
May 10 '10 #1
0 1589

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Ray in HK | last post by:
What are the differences between LOAD DATA INFILE and LOAD DATA LOCAL INFILE ? I found some web hosting company do not allow using LOAD DATA INFILE but allow LOAD DATA LOCAL INFILE. The reason...
2
by: Vicente Nicolau | last post by:
Hello I'm making a PDA project that uses a data base. That data base is saved in a xml file. When the application starts up, I load the xml file in memory. The application makes changes in the...
7
by: David Bear | last post by:
I have a dictionary that contains a row of data intended for a data base. The dictionary keys are the field names. The values are the values to be inserted. I am looking for a good pythonic...
6
by: acord | last post by:
Hi, In a html page, I don't know how to load in a php page from javascript. I've already defined a <div id="treemenu"> in the html page. The executed content from the php script is supposed...
6
by: stefaan.lhermitte | last post by:
Dear mysql-ians, I am using mysql 5.0 and I want to load a huge txt-file in my database. My text file (file.txt) looks like: col1 col2 col3 ... col200 col1 col2 col3 ... col200 .... col1...
4
by: Joe101 | last post by:
Question: How to put access data base onto a web page?
1
by: Megi | last post by:
welcome, I input data form file to mysql with command: load data local infile.. The efect is that the data are duplicated or trippled..etc with every re-loading the script, but I need to load...
2
by: ghjk | last post by:
I'm developing web based system using php and my sql. In there user can see database values in a table and when he select edit button all text box values should be filled using the database values....
13
by: deepunarayan | last post by:
Hi I have Problem in ASP. I have created a Multi choice Question page in ASP with Submit button. When I submit my page the User Selected values will be taken to the other page where validation...
24
by: joeldault | last post by:
Question For Microsoft Access Data Base -------------------------------------------------------------------------------- I am Trying to create a single formula that would do the following: If...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.