to upload a table from DB to the same html page

Ads

 
 

Share on Google+Share on Google+

lakshmi
to upload a table from DB to the same html page
1 Answer(s)      6 years and 7 months ago
Posted in : JSP-Interview Questions

how to make this booklist table to be opened in the same html page itself using a third frame?

Ads
View Answers

February 9, 2011 at 2:48 PM


JSP Retrieve data from database table

<[email protected] import="java.sql.*"%>
<table border=1>
<tr><th>Name</th><th>Address</th></tr>
<%
try{
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "root", "root");
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select * from data");
while(rs.next()){
%>
    <tr><td><%=rs.getString("name")%></td><td><%=rs.getString("address")%></td></tr>
<%
}
rs.close();
st.close();
con.close();
}
catch(Exception e){}
%>
</table>

Ads









Related Tutorials/Questions & Answers:
to upload a table from DB to the same html page
to upload a table from DB to the same html page  how to make this booklist table to be opened in the same html page itself using a third frame
display data from a table in Access Database in a HTML page
display data from a table in Access Database in a HTML page  how to display data from a table in Access Database in a HTML page in a Java Program
Advertisements
same thing i want but from db..
same thing i want but from db..  http://www.roseindia.net/tutorial/javascript/dynamicCombo.html same thing i want but from db
how to upload an image from a jsp page to a mysql database table using jsp
how to upload an image from a jsp page to a mysql database table using jsp  how to upload an image from a jsp page to a mysql database table using jspstrong text
Hi how to transfer table data from html page to excel sheet by using javascript .
Hi how to transfer table data from html page to excel sheet by using javascript .  html page to excel sheet by using javascript and i dont want to transfer all rows in table, i want to hide some rows in excel sheet. Please send
How to add two calendars on the same html page
use single calendar for a single html page.but while implementing two calendars on same html page it doesn't work..The first calendar works but the second...How to add two calendars on the same html page  I have used the same
How to browse and upload the file in same page using jsp.
How to browse and upload the file in same page using jsp.  Hi, I am doing a project and i want to browse and upload the file in same page inside grid view of table,post the answer as soon as possible, thanks in advance
How to browse and upload the file in same page using jsp.
How to browse and upload the file in same page using jsp.  Hi Sir, I am doing a project in jsp servlets and i want to browse and upload the file in cell if a table in same page, post answer as soon as possible.thanks
upload the text file through html and insert those data into the table
upload the text file through html and insert those data into the table  i want to take input form a text file.there is a table in database oracle... into table.now i want to upload the text file through html and insert those data
take data from one table and insert same in another
take data from one table and insert same in another  I want to know when a new field update in table and the same data has to update in another table
Store image from html img tag into mysql db using java
Store image from html img tag into mysql db using java  Hi. How to get the image displayed in the < img > tag of HTML and store it in the mysql database using java? Thanks in advance
upload csv to mysql db using jsp upload
upload csv to mysql db using jsp upload  Hello all, Please give me the code to uplad .csv from jsp page and insert values into MySQl db. I have a table with 8 cloumns.(MDN--varchar(30),Otafdate date,crt varchar(30),dmdn
HTML & MYSQL - retrieve record from table
HTML & MYSQL - retrieve record from table  Hi. I have a field...,trichy,kanchipuram for a single record. I have to retrieve these data from the field table. Actually they are separated by comma. I want to take the values as single
retrieve record from table and show it in HTML
retrieve record from table and show it in HTML  Hi. I have a field...,trichy,kanchipuram for a single record. I have to retrieve these data from the field table. Actually they are separated by comma. I want to take the values
HTML Upload
HTML Upload  Hi, I want to upload a word / excel document using the html code (web interface)need to get displayed on another webpage. Please let me the coding to display on another webpage using
How to redirect from a HTML page?
How to redirect from a HTML page?  Hi, Is it possible to redirect from HTML page to another page on the net? I have one page and I want to redirect... to redirect to another page using HTML code. You can use the following code: <meta
Tag Inside Table in HTML
in HTML.In this code we define a HTML page and show you to create a tag inside a Table...;td> :The <td> tag is used to create a table cell in HTML page. <... Tag Inside Table in HTML     
How to use next and previous button(or href) for database table that is retrieved from MySQL DB using jsp,jstl,javascript
that is retrieved from MySQL DB using jsp,jstl,javascript  when click on the next button/link then it must display next 10 record from database and same for previous to display previous 10records. Database Query like this: Select * from table
How to use next and previous button(or href) for database table that is retrieved from MySQL DB.
How to use next and previous button(or href) for database table that is retrieved from MySQL DB.  Initially,display 7or10 records on a jsp pageand when click on the NEXT button(or href link) then display next 7 records
Inserting data from the HTML page to the database
Inserting data from the HTML page to the database... program in which we are going to insert the values in the database table from the html form. To make our program working we need to make one html form
Imp-HTML Table Sorting
Imp-HTML Table Sorting   Hi, I am working on a project and as per requirement from client i have to sort a table based on the ID Column. I want... of HTML table sorting where sorting happenes whenever user clicks on column header
Upload csv or .xlsx file from JSP form to Database Table using servlet
Upload csv or .xlsx file from JSP form to Database Table using servlet ... and stores it into the oracle database table. Sir Its very Urgent I have... { response.setContentType("text/html"); PrintWriter out
open pdf file in same jsp page and the pdf file should retrieved from database
open pdf file in same jsp page and the pdf file should retrieved from database  Hai all, I need code to open a pdf file in same jsp page(browser) while click on hyperlink And the file was located in database table. Can any
How to pass parametes from JSP page to HTML page? - JSP-Servlet
How to pass parametes from JSP page to HTML page?  Hi all, In my project I have one JSP page and one HTML page. In JSP page I have created HTML... to pass the values from my JSP page to HTML page. Pls help me out. Hitendra 
how to pass form values from javascript of html page to jsp page
how to pass form values from javascript of html page to jsp page   This is my sample html page which contains inline javascript which calculates... to submit all the form values with lattitude and longitude returned from
Fetched Record from database show into text field of html page
, and also have html page with all above mentioned field i have submit 20 record from...Fetched Record from database show into text field of html page  hi, i... is that if i have a report page with same four above filed and i type any letter
struts2 upload image public_html
struts2 upload image public_html  How to upload images in public_html file in Struts 2 application. Thanks in advance
How to create d db for upload files using bolb i m followin dat upload file in db tutorial
How to create d db for upload files using bolb i m followin dat upload file in db tutorial  How to create d db for upload files using bolb i m followin dat upload file in db tutorial   Create a table named 'file
HTML File Upload
an example from HTML File Upload. In this code, we create a html page which show you... HTML File Upload       HTML File Upload is used to show the list of all file, when a user click
HTML table layout
HTML table layout  i have table layout in that i have menu in td(column) ,when i click menu item ,the page will be open in that table right side td... requirement is layout using table
SEARCHING THE DATA FROM DATABASE AND DISPLAY THE SEARCHED DATA IN HTML PAGE
SEARCHING THE DATA FROM DATABASE AND DISPLAY THE SEARCHED DATA IN HTML PAGE  pls help me....in this i want to search books from the database...\htdocs\project\opac1.php on line 10 HERE IS MY CODE my html page is <