473,395 Members | 1,474 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,395 software developers and data experts.

retrieving data from the resultset and displaying it int the servlet

283 100+
hi frnds,
im new to this forum,and i have a problem...here is the situation----
i have a project which has servlets, wat the servlet does is connect to a database and display the result using the resultset inside the same servlet using the htmlstart and htmlend methods.wat i have to do is to seperate the html from the servlet and create a jsp....my problem is how to start doing it? how to display the result into a jsp page??wat all am i supposed to use...im using tomcat 5.5.23 and eclipse 3.2. can aybody guide me regarding....any help regarding this will be appreciated
Aug 28 '07 #1
5 3154
madhoriya22
252 100+
hi frnds,
im new to this forum,and i have a problem...here is the situation----
i have a project which has servlets, wat the servlet does is connect to a database and display the result using the resultset inside the same servlet using the htmlstart and htmlend methods.wat i have to do is to seperate the html from the servlet and create a jsp....my problem is how to start doing it? how to display the result into a jsp page??wat all am i supposed to use...im using tomcat 5.5.23 and eclipse 3.2. can aybody guide me regarding....any help regarding this will be appreciated
Hi,
U can store ur result set data in any collection(e.g. Vector, Hastable. whichever suited to u or ur application). Then use HttpServletRequest's getParameter() and setParameter() methods to pass this collection to ur jsp....... and display there as u want.
Aug 28 '07 #2
r035198x
13,262 8TB
Hi,
U can store ur result set data in any collection(e.g. Vector, Hastable. whichever suited to u or ur application). Then use HttpServletRequest's getParameter() and setParameter() methods to pass this collection to ur jsp....... and display there as u want.
Topass the data from the servlet to the JSP, you use setAttribute in the servlet and get it using getAttribute in the JSP.
You can't use setParameter in a servlet.
Aug 28 '07 #3
madhoriya22
252 100+
Topass the data from the servlet to the JSP, you use setAttribute in the servlet and get it using getAttribute in the JSP.
You can't use setParameter in a servlet.
Hi,
U r definitely correct.... Sorry I was in hurry... didn't check it... :)

@OP sorry I provide u wrong information(never intended).
Aug 28 '07 #4
dmjpro
2,476 2GB
hi frnds,
im new to this forum,and i have a problem...here is the situation----
i have a project which has servlets, wat the servlet does is connect to a database and display the result using the resultset inside the same servlet using the htmlstart and htmlend methods.wat i have to do is to seperate the html from the servlet and create a jsp....my problem is how to start doing it? how to display the result into a jsp page??wat all am i supposed to use...im using tomcat 5.5.23 and eclipse 3.2. can aybody guide me regarding....any help regarding this will be appreciated
Welcome to TSDN.
Actually here nobody is here to guide you from the first means with the Code.
Anyway!

Make a Connection and all the Database Related Operations then store the Results to request.setAttribute() then forward a Jsp page.
There you will extract the results and simply print those.
Now you try to write some code then come here with specific problem with your code.
Best of luck with your try.

Kind regards,
Dmjpro.
Aug 28 '07 #5
ajos
283 100+
Welcome to TSDN.
Actually here nobody is here to guide you from the first means with the Code.
Anyway!

Make a Connection and all the Database Related Operations then store the Results to request.setAttribute() then forward a Jsp page.
There you will extract the results and simply print those.
Now you try to write some code then come here with specific problem with your code.
Best of luck with your try.

Kind regards,
Dmjpro.

thank u everbdy for their valuable inputs...i'll get bak to u guys when im stuck....thanx again
Aug 30 '07 #6

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

Similar topics

5
by: aniket_sp | last post by:
i am using a data adapter and a dataset for filling and retrieving data into .mdb database. following is the code..... for the form load event Dim dc(0) As DataColumn Try If...
3
by: Jakob Petersen | last post by:
Hi, I need to increase the speed when retrieving data from a hosted SQL Server into VBA. I'm using simple SELECT statements. How important is the speed of my Internet connection? (I have...
0
by: DC01 | last post by:
I have added a new measure successfully into the normal cube. I then add it to the virtual cube and reprocess all cubes. I can browse the normal cube successfully. Then when I try and browse the...
1
by: hanusoft | last post by:
This is an example of Inserting and Retrieving data from xml file. private void Page_Load(object sender, System.EventArgs e) { // Put user code to initialize the page here ...
1
by: hanusoft | last post by:
This is an example of Inserting and Retrieving data from xml file. private void Page_Load(object sender, System.EventArgs e) { // Put user code to initialize the page here ...
4
by: smartin | last post by:
Hi, I'm having problem retrieving data from an SQL stored procedure. I tried debugging but it wont give a the reason for the error. it just throws an exception after executing cmd.ExecuteNonQuery...
4
by: devnewbie | last post by:
Hi, I was wondering if someone would be so kind to point me in the right direction. I would like to retrieve address from a database (could be as simple as a excel spreadsheet) and display them on...
3
ADezii
by: ADezii | last post by:
Last Tip, we demonstrated the technique for retrieving data from a DAO Recordset, and placing it into a 2-dimensional Array using the GetRows() Method. This week, we will cover the same exact Method...
10
vikas1111
by: vikas1111 | last post by:
Hi All Can anyone give me an idea to solve the problem.. My Problem is ,, I want to Retrieving data from database and displaying in textbox... If anybody have link of some good tutorial on...
7
by: splendid9 | last post by:
Problem in retrieving data from a XML file.......this is my code- protected void Page_Load(object sender, EventArgs e) { DataSet ds = new DataSet(); ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.