java project

Ads
 

java project

Connecting to MySQL database and retrieving and displaying data in JSP page by using netbeans

View Answers

April 1, 2011 at 12:18 PM

Connect Netbeans with Database

<%@page import="java.sql.*"%>
<table border=1>
<tr><th>Name</th><th>Address</th><th>Contact No</th><th>Email</th></tr>
<%
Class.forName("com.mysql.jdbc.Driver").newInstance();  
 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()){
    int id=rs.getInt("id");
%>
<tr><td><%=rs.getString("name")%></td><td><%=rs.getString("address")%></td><td><%=rs.getString("contactNo")%></td><td><%=rs.getString("contactNo")%></td></tr>
<%
}
%>
</table>

Ads









Related Tutorials/Questions & Answers:
Java Project
Java Project  Java project using with collection and generic with observer design pattern
java project
java project  how many tables are required in backend for online examination system project in jsp If backend is SQL
Advertisements
JAVA project
JAVA project  How to extract tags and their corresponding properties of a "cascading style sheet" file using JAVA
java project
java project  Connecting to MySQL database and retrieving and displaying data in JSP page by using netbeans
Java Project
Java Project  how to write a program for competitive exams(for student practice purpose)? for example: first student have to login after login then he has to select the particular exam what he want to write i.e the exam may
Java Project - Java Beginners
Java Project  Hello Sir I want Mini Student Admission System project in java with Source Code and Back end Database is MS Access. plz Give That Sir its Very Very Urgent
java project question
java project question  how to calculate bill extracting quantity n price from one database table and inserting the result into another in java   Hi Friend, Visit Here Thanks
java project topics
java project topics  Hello everyone, Can you please give me ideas on new projects in java(belonging to any part of java ), read the topics related to it and then i will make it. Please give me inventory ideas
Java project ideas
Java project ideas  Hi, Can anyone tell me the java project ideas? I want to develop the project to learn java programming concepts in depth. Thanks   Hi, You can develop following types of applications: a) Hotel
minor project in core java
minor project in core java  I am a student of BE IT branch 6sem ,i have to prepare a minor project in core java please sujest some topics other then management topics
Java project in Servlet
Java project in Servlet  Hi, I have one java (Servlet) project... have private network (LAN). So i want to run that project from any pc. Access to project should be from any syatem. Means can i access post 2 problems
java project question
java project question  hi!!! I am doing a web related project in java.. And i am new to jsp. I am getting the following wargings. Pls help me.../displayer/sms line 79 Java Problem Class is a raw type. References to generic type
JAVA Web project deployment
JAVA Web project deployment  Hi friends, I have created a website using servlet and JSP with SQL server on the backend. Now I have to deploy the project so that I can open the project and someone can work on it without installing
java project question
java project question  how to calculate bill extracting quantity n price from one database table and inserting the result into another in java   Hi Friend, Try the following code: import java.sql.*; import java.util.
Java Project Deployment
Java Project Deployment  Hi I have created a website using servlet and JSP. There are three type of users on the website namely administrator, student and teacher. Now I need to install this website on all the systems
Help With My Java Project?
Help With My Java Project?  Write a console program that repeatedly prompts the user to enter data until they type done (any case, Upper, Lower, or Mixed). As they enter the data, assign it to a two-dimension array where
My name, java project
My name, java project  Write a class that displays your first name vertically down the screen ?? where each letter uses up to 5 rows by 5 columns of a character input by you with a blank line between each letter. Note: each
My name, java project
My name, java project  Write a class that displays your first name vertically down the screen ?? where each letter uses up to 5 rows by 5 columns of a character input by you with a blank line between each letter. Note: each
abt java project - Java Beginners
abt java project  How to make the home page that contain four tabbedPane like additem, deleteitem ,update etc, so plz help me thanx  Hi.../java/example/java/swing/add_edit_and_delete_employee_inf.shtml If you want
Java project in online examination system
Java project in online examination system  how many and which tables are required at backend as SQL for online examination system project in jsp
Java Project Training
Java Project Training     Roseindia Technologies, a renowned name in Java world since last half decades is offering an encompassing project based training in JAVA Technology. Since the origin
core java project by using databse
core java project by using databse  hello sir, i'm a b.tech final year student.... i wantto make a project on java with database... can u plzz suggest me how i can start for it.... means on which topic i can make project
project
project  i need a project in java backend sql
project
project  suggest a network security project based on core java with explanation
Oracle Launches Project Valhalla for Java
Oracle Launches Project Valhalla for Java with an aim to evolve new features..., the Oracle have announced its much awaited Project Valhalla for Java. Certainly a long... of project Java by Oracle, now it has open an experimental OpenJDK project
project
project  sir i want a java major project in railway reservation plz help me and give a project source code with entire validation thank you
Project
Project  Hi, Am starting a new project to draw a 2d graph using java swing and opengl,where in the input for X-axis and Y-axis co=ordinates should be accepted from user... As am very new to this am seeking help so pls help
project
project   hi , we r working on one project related to our results. we using java and for back end sqlserver 2005. In dis we are trying to retrieve result from some site and store it in our data base so that we can perform
project
project  i have to do my final year project project topic:Weekly Automatic College Timetable Generation System BRIEF EXPLANATION ABOUT PROJECT This project takes various inputs from the user such as Teacher List, Course List
Project
Project  How to show Questions randomly so that no two student get the same questions in online examination system project in Java Server Pages  
project...
project...   enter 10 integers, store it using array then display them from highest to lowest. 2.enter 10 integers, store it using array then display them from lowest to highest number to words conversion create a java program

Ads