Home Tutorialhelp Comment jsp program

 
 

Comment

ujwala
jsp program,
November 16, 2007 at 10:20 AM

<%@ page language="java" import="java.sql.*" errorPage="" %>
<%@ page import="java.sql.*" %>
<%@ page import="java.io.*" %>
<%! Connection con=null; %>
<%! Statement st= null; %>
<%! ResultSet rs= null; %>
<%! boolean found =false; %>
<%
Class.forName("com.mysql.jdbc.Driver").newInstance();
try
{
con = DriverManager.getConnection("jdbc:mysql://localhost/test","root","mysql");
out.println("System connected\n");
st = con.createStatement();
String s1=request.getParameter("uname");
//out.println(s1);
rs=st.executeQuery("select * from user where name='"+s1+"'");
session.setAttribute("name",s1);
String s2=request.getParameter("pswd");
//out.println("After Executing the Query" + rs);
while(rs.next())
{
out.println(rs.getString(s1));
String rs1=rs.getString(1);
//session.setAttribute("user");
String rs2=rs.getString(2);
if(s2.equalsIgnoreCase(rs2))
{
int id=rs.getInt("userid");
//out.println("After Executing the Query" );
int userid=rs.getInt("userid");
out.println(userid);
}
}
}
catch(Exception e)
{
System.out.println("validation failure"+e);
}
finally
{
st.close();
rs.close();
con.close();
}
%>

THE ERROR IS

System connected After Executing the Querycom.mysql.jdbc.ResultSet@13c4c09

View All Comments | View Tutorial
Advertisement
Related Tutorial and Articles
SQL Question

mysql
you need to download the mysql-connector jar file for connecting java program from mysql database.......   Hi friend, MySQL is open source database... is the link for the page from where you can understand how to Download and Install MySQL 

JSP Servlet Questions

connecting jsp to mysql - JSP-Servlet
connecting jsp to mysql  Hi, i am working on 'Web application development' project that uses JSP, MySQL and tomcat.i am not able to connect to the mysql database through jsp. After downloading the mysql-connector-java-5.0   

JSP Servlet Questions

JSP &MYSQL
JSP &MYSQL  Develop a web page for the telephone directory using jsp and mysql 

Development process Questions

JSP with Mysql
JSP with Mysql  Hi sir, I trying to several time but i am not get an answer. My questions are 1. How to inserting same field data to different mysql table using jsp. That is creating a form with 5 fields,data's are same 

SQL Question

jsp mysql
........... like that all requests nd comments should be display through jsp and mysql...jsp mysql  actually i want a page that has two frames nd in 1 frame i'l add a textarea to post some help nd nw when he clicks on post button it has 

JSP Tutorials

Connect JSP with mysql
Connect JSP with mysql   ...; This query creates database 'usermaster' in Mysql. Connect JSP with mysql : Now in the following jsp code, you will see how to connect 

JSP Servlet Questions

jsp_mysql
jsp_mysql  hi,, plz help me by providing the code for displaying SELECTED columns from mysql table which are given dynamically through checkboxes...; <html> <head><title>Read from mySQL Database</title> 

JSP Servlet Questions

jsp and mysql
jsp and mysql  i have a form which contains dropdown list. i have to take the values to another jsp page and perform the calculation on the database... as it is and the new function value in the new jsp page.. im in the middle of the project 

JSP Servlet Questions

JSP-Mysql - JSP-Servlet
JSP-Mysql  Hello friends, Anyone send me the way how to store image in mysql database from a jsp page.  Hi friend, Code to insert image in mysql Using Jsp : For more information on JSP 

JSP Servlet Questions

problem connect jsp and mysql - JSP-Servlet
problem connect jsp and mysql  hello, im getting an error while connecting jsp and mysql. I have downloaded the driver mysql-connector...\WEB-INF\lib. I have also added the driver to my classpath C:\Program Files\Apache 

JSP Servlet Questions

jsp/mysql connection
jsp/mysql connection  I am puttng the following files in the lib folder of jdk to connect jsp and mysql and in the lib folder of tomacat and in the lib folder of project of netbeans but I am unable to to connect jsp and mysql 

JSP Servlet Questions

jsp/mysql connection
jsp/mysql connection  I am puttng the following files in the lib folder of jdk to connect jsp and mysql and in the lib folder of tomacat and in the lib folder of project of netbeans but I am unable to to connect jsp and mysql 

JSP Servlet Questions

How to connect mysql with jsp
How to connect mysql with jsp  how to connect jsp with mysql while using apache tomcat 

SQL Question

MYSQL
MYSQL  How to create time and date based trigger in mysql   MySQL Time Trigger 

Java Beginners

connection to mysql in jsp
connection to mysql in jsp  please i got this error message when trying to connect to mysql database in jsp. Unknown character set: 'utf8mb4 

SQL Question

mysql
mysql  how to open\import table in .dbf format in mysql 

Java Beginners

Image in mysql
Image in mysql  Hi. How to insert and retrieve images in mysql db using JSP or JAVA Servlet? Thanks in advance 

SQL Question

MySql
MySql  what is default password of mySql, and how i configure mySql.   Hi, If you are installing MySQL on windows then you will have to provide the Password for the user root at the installation time. You may try 

Java Beginners

jsp, mysql - Java Beginners
jsp, mysql  i want to store / insert the selected value in the combo box (jsp), into the mysql. how to do it?... pls help me in urgent 

JSP Tutorials

Connect JSP with mysql
Connect JSP with mysql   ... you how to connect to MySQL database from your JSP code. First, you need... database in my sql command prompt) 2. Connect JSP with mysql:  

PHP Questions

mysql
mysql  want the code for mysql nested select query with single where condition.want to select data from more than one table 

JSP Interview Questions

JSP - MySQL - Connection
JSP - MySQL - Connection  I can't connect mysql using jsp in my... to resolve this problem.I set classpath for the mysql connector jar (/home/aghiltu/apache-tomcat-6.0.26/lib/mysql-connector-java-5.1.8-bin.jar)..... And i also tried 

Java Beginners

mysql jsp - Java Beginners
mysql jsp  how to insert values to mysql? i want to insert values from a combo box to mysql... how to perform that. pls help me in urgent.  Hi friend, Plz give full source code where you having the problem 

JDBC Questions

Java and Mysql
Java and Mysql  Sir, I want to connect my java program with mysql server (mysql server is situated on another windows machine ) ??? ???? ?????   Put mysql jar file in your jdk lib and set the classpath. After 

Java Beginners

mysql with jsp - Java Beginners
mysql with jsp  i wanted to insert a combo box value to mysql table usgin jsp. how to perform that. can anybody help me in urgent.  Hi... For more information on JSP visit to : http 

JSP Servlet Questions

MySql - JSP-Servlet
MySql  Hello friends, I am developing a JSP project with back end MYSQL and i am using SQLYOG editor enterprise 7.11. I got the serial number also...; Hi friend, http://www.roseindia.net/mysql/mysql-front.shtml Thanks 

JSP Servlet Questions

jsp with mysql bolb - JSP-Servlet
jsp with mysql bolb  how to display images from mysql bolb in jsp?(in my selected area)  Hi friend.... http://www.roseindia.net/jsp/retrieve-image.shtml Thanks 

JSP Servlet Questions

jsp & mysql - JSP-Servlet
jsp & mysql  can anybody tell me hoe to overcome from following error i am facing this problem...plz help me... org.apache.jasper.JasperException: Communication failure during handshake. Is there a server running on localhost 

JSP Servlet Questions

connection of jsp with mysql - JSP-Servlet
Example of connection between JSP and MYSQL  Need an example of connection between JSP and MYSQL 

JSP Servlet Questions

jsp,mysql - JSP-Servlet
jsp,mysql  hi i need a code to retrieve data to text boxes and move the records and also allow the user to change/delete the record SEMINARS THEME 

JSP Servlet Questions

interface to mysql - JSP-Servlet
interface to mysql  i am creating an easy accces to mysql through jsp-sevlets,when ever user enters the query through the interface how to retrieve the result from the database where the developer has to generally develope 

JSP Servlet Questions

js,,mysql - JSP-Servlet
js,,mysql  Hi, I want a jsp code for editing,deleting data retrieved from from the mysql database and displayed in a html page .Can anybody... link: http://www.roseindia.net/jsp/user-search.shtml Hope that the above 

JSP Servlet Questions

connection of jsp with mysql - JSP-Servlet
connection of jsp with mysql  can anybody tell me about connection of JSP with MYSQL? and also tell me which version is compatible with tomcat 4.1 i am using tomcat 4.1, MYSQL 5.0 but i have problem with connection 

SQL Question

MySQL
 

Date Calendar

mysql
 

JSP Servlet Questions

jsp using include & with mysql
jsp using include & with mysql  Sir, I am creating a login application using jsp & Mysql. The Codes are--- Html File...... <...; Jsp file....... <%@ page import="java.sql.*" %> <% String 

JSP Servlet Questions

mysql - JSP-Servlet
mysql  code to add photo in mysql database ... i want page from which i can upload photo which will store in mysql database and display in one page in jsp...  Hi Friend, Try the following code: 1)page.jsp 

JSP Servlet Questions

connection with MySQL to java.
connection with MySQL to java.   how to connect MySQL database with jsp 

JSP Servlet Questions

login page with mysql using jsp
login page with mysql using jsp  pls i need a sample of login page to check username and password in mysql database. thanks 

JSP Servlet Questions

Backup MySQL Database - JSP-Servlet
Backup MySQL Database  Database Sir I have been reading Rose's india tutorial "Using MySQL Database with JSP/Servlet". In the Tutorial you have shown an example of backing up the database. When I tried to backup database 

General

Welcome to the MySQL Tutorials
; MySQL From JSP In this section you will learn retrieving the data from MySQL database in JSP page.  .... This program consists of a JSP page and a Servlet to authenticate the user against 

JSP Servlet Questions

Unable to Insert Arabic words in mysql table
Unable to Insert Arabic words in mysql table  I have I java program that I want to insert arabic letters in mysql. Do you have any idea about the configuration of mysql that accepts arabic charcters.   in jsp use 

Java Server Faces Questions

excel report fro jsp mysql
excel report fro jsp mysql  Dear Sir, I am facing some problem while generating excel report form mysql database using jsp code. With the help from... data. But I need your help for generating a excel file from mysql DB for blob 

Java Magazine Questions

Program
... can any body help for me.using servlet,html   Here is a jsp test...(ques,op1,op2,op3,op4,op5,ans) in the mysql database. 1)radio.jsp: <%@page import="java.sql.*"%>... =DriverManager.getConnection("jdbc:mysql://localhost:3306/register","root","root";;); Statement st 

Java Beginners

how to fetch image from mysql using jsp
how to fetch image from mysql using jsp  how to fetch image from mysql using jsp 

JDBC Questions

MySql ClassNotFoundException - JDBC
MySql ClassNotFoundException  Dear sir, i am working in Linux platform with MySQL database , actually i finished all installation in MySQL but while i am executing java program i am getting ClassNotFoundException. Can i 

JDBC Questions

JAVA & MYSQL - JDBC
JAVA & MYSQL  How can we take backup of MySQL 5.0 database by using JSP programs. Please give any code for this. Thankyou in advance.  Hi Friend, Please visit the following page for working example of MySQL backup 

JSP Servlet Questions

connection with mysql with jstl - JSP-Servlet
connection with mysql with jstl  hi, i m working on jstl . i hv done connection in MS -Access with JSTL . The code is working well. but when i am trying to connect database with mysql 5.0 it is creating problem. Plz tell me 

MySQL

MySQL Configuration
in the installation directory for the MySQL server.  --defaults-file="C:\Program Files\MySQL\MySQL Server 5.0\my.ini" Path "C:\Program Files... MySQL Configuration       

Java Beginners

netbeans with mysql and tomcat
netbeans with mysql and tomcat  Hi. I have to run a JSP or JAVA file in netbeans with mysql database and tomcat server 7.0. But while the page loading itself it say error. ClassNotFoundException: com.mysql.jdbc.Driver. How 

MySQL

Introduction to MySQL
Introduction to MySQL       MySQL is supported, distributed and developed by MySQL AB. It is most popular open source SQL database management system. Our MySQL tutorial is available 

MySQL

What is MySQL
. MySQL is available as a separate program for use in a client/server network... What is MySQL       MySQL is a open source Relational Database Management System. MySQL is very fast 

MySQL

MySQL Front
MySQL Front       In this page you will find many tools that you can use as MySQL Front to work with the MySQL Database. These MySQL Front tools actually helps you in working fast and easily 

Java-Tutorials

MYSQL Java Connector Library
program. Java command is as given below: java -cp myapp.jar;D:\classpath\mysql...Where to download the MYSQL Java Connector Library and get the jar file This article discuss 'how to connect Java and MYSQL using MYSQL connector' 

MySQL

MySQL For Window
2005 development environment. As part of the VSIP program, MySQL AB is developing... MySQL For Window       MySQL Installing on Windows A native Windows distribution of MySQL has been 

MySQL

MySQL Download
; Access to the MySQL 1.5 Access to MySQL - is a program to move MS... - is a program to convert MS Excel spreadsheets into MySQL databases. Depending... MySQL Download       

JDBC Questions

how to connect j2me program with mysql using servlet?
how to connect j2me program with mysql using servlet?  my program...(a); } }; } servlet program is: import java.io.*; import java.util.... = DriverManager.getConnection("jdbc:mysql://localhost:3306/"+db,username,password 

JSP Servlet Questions

JSP Radio Button MySQL insert - JSP-Servlet
JSP Radio Button MySQL insert  Hi, I have an HTML form which has... with select lists. I have created a servlet to connect to MySQL database... with the code to store radio button data and checkbox data to MySQL table. For example 

JDBC Questions

MYSQL and SERVLETS - JDBC
MYSQL and SERVLETS  I did addition ,deletion of data in mysql using servlets .I do not know that how to combine these two programs into a single program .When I click this add menu it has to be added the data in table .when i 

JSP Servlet Questions

Image upload in mysql database using jsp servlet
Image upload in mysql database using jsp servlet  Hello, I need code to insert image in mysql database, I have seen the code which is already in your... located inside the application, but i need to upload in mysql and also for inserting 

PHP Questions

PHP MYSQL Interview Questions
PHP MYSQL Interview Questions  What kind of questions can be asked in an PHP, MYSQL interview? Can anyone post the PHP interviews questions with well explained answers?   PHP, MYSQL Interview Questions Please tell me 

JDBC Questions

mysql tables - JDBC
mysql tables  hi, I have a table in MySql, having fields, emp_id,emp_name,emp_vertical,emp_supervisor. i need a JDBC program with driver mangager for MySQL, statements, preparedstatements,resultset. Please can you 

MySQL

MySQL Network
Network Partner Program Partnering with MySQL expands your addressable... MySQL Network       MySQL Network Support Software MySQL Network? provides a comprehensive set of enterprise 

MySQL

MySQL
MySQL In this section we will read about what is MySQL, MySQL distribution, MySQL features, MySQL architecture etc. MySQL unofficially, pronounced as My... the database. The development, distribution, and support of MySQL is done 

Development process Questions

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 

JSP Servlet Questions

updations on data in mysql
and update the data into mysql using jsp   hi friend, Try the following sample...updations on data in mysql  sir ,i want to retreive data from mysql... con = null; String url = "jdbc:mysql://localhost:3306/"; String db = "record 

MySQL

MySQL Client
. The program makes working with MySQL easy without hiding the language from the user... MySQL Client       My Sql Clint Engle This all-in-one tool will help you create, manage and edit MySQL databases 

MySQL

MySQL Client
gurus. The program makes working with MySQL easy without hiding... program This chapter discusses general principles that are common to most MySQL... MySQL Client       My 

JSP Servlet Questions

login page using jsp servlrt with mysql database?
login page using jsp servlrt with mysql database?  Description: example:total users are 3.each use have username and password save in mysql database table login. After successfully login user1 see only index page,if user2 login 

JSP Servlet Questions

java and sql server NOT Mysql - JSP-Servlet
was not properly answered. What I wanted was JSP CODE that can insert and retrieve image from MS SQL server NOT MySQL. Or is it not possible to do it in MS SQL server other than Mysql? Please let me know. Thank you all one again 

JSP Servlet Questions

insert excel sheet into mysql as a table
insert excel sheet into mysql as a table  sir, i want to import an excel sheet into mysql5.0 database as in the table format using tomcat 6.0 by jsp 

JDBC Questions

Retrieving cells in MySQL - JDBC
Retrieving cells in MySQL  Hi, Am creating an online exam application using JSP & MySql.The exam is of objective nature with four choices each and 100 questions. Can you please help me to insert the chosen choice into cells 

Java Beginners

Exporting data from mysql into csv using jsp
Exporting data from mysql into csv using jsp  Hi friends.... I want to export the data from mysql to csv file using... i am having 30 columns in my... want csv file with 10 rows.. i want to do in jsp... pls help me soon..its very 

JDBC Questions

SERVLETS AND MYSQL - JDBC
SERVLETS AND MYSQL  Hai I need a servlet program to add,delete and modify .I saw this link www.roseindia.net/servlets/web-application.shtml.This link has the same program .But it has edit and delete button in the table 

JSP Servlet Questions

problem on jsp, inserting data into table(mysql).
problem on jsp, inserting data into table(mysql).  hello friends, I have a problem in jsp.I want to insert data, which is given by user through a html page into a table.And the table name also is given by the user.My database 

SQL Question

Migrating from mysql to MS Access
Migrating from mysql to MS Access  Hi I am hoping for some help I need to write a conversion program (SQL statements) to import existing data in a MYSQL database to a MS Access database. any suggestions would be appreciated 

JSP Servlet Questions

Image retrieval from mysql - JSP-Servlet
Image retrieval from mysql  Hai friends, I used the following code to insert image into mysql db. Db data type is blob. Database connection codings are in different file which is to be included 

MySQL

MySQL Administrator
; Introduction to Mysql Administrator MySQL Administrator is a program... MySQL Administrator       MySQL Administrator MySQL Administrator is a powerful visual administration 

Java Beginners

jdbc driver for mysql - Java Beginners
jdbc driver for mysql  I need jdbc driver program for connecting java progrma to mysql. Please any one send me the url to download the driver... of jdbc-mysql database connectivity and idea about jdbc and mysql driver 

Programming Tutorials

Using MYSQL Database with JSP & Servlets.
 

MySQL

Installing MySQL on Windows
installs to C:\Program File\MySQL Server 5.0 location. On a developer machine a typical MySQL installation can be look like this : C:\Program Files\MySQL\MySQL Server 5.0 C:\Program Files\MySQL\MySQL Administrator 1.0 C 

Free Magazine

Introduction to MySQL
program for use in a client/server network environment. The MySQL available...Introduction to MySQL         MySQL is an open source Relational Database Management System 

JDBC Questions

jsp fie execution in tomcat and using mysql - JDBC
jsp fie execution in tomcat and using mysql  I created 2 jsp files... and password to enter into the Mysql database account.the other named...:THE LAST JSP PAGE IS COMING DIRECTLY ON EXECUTION IN TOMCAT 

JSP Servlet Questions

Read Excel data using JSP and update MySQL databse
Read Excel data using JSP and update MySQL databse  HOw to read excel data using JSP and update MySQl database 

JSP Servlet Questions

get info from mysql using jsp and servlet
get info from mysql using jsp and servlet  HELLO! I wanna create a jsp page which able to let me get its name, phone and other info by asking the user to key in their email address from mysql database by using servlet and jsp too 

Java Beginners

HOW WRITE GREEK CHARACTERS INTO MYSQL BY JSP ?
HOW WRITE GREEK CHARACTERS INTO MYSQL BY JSP ?  HALLOW TO ALL ! I'M USING MYSQL5.5 , TOMCAT7 & JSP. IN MY BROWSER I'M SEEING GREEK CHARS BECAUSE...:mysql://localhost:3306/XXXXX?user=userName&password=usersPassword& 

Java Beginners

how to connect jsp to mysql - Java Beginners
how to connect jsp to mysql  I m new in Mysql and JSP i m ceating.java file using bean file for connectivity but i m not able to connect jsp... me hw to conncet jsp with mysql this is connection file package connect 

Java Beginners

access image from ajax store in mysql using jsp
access image from ajax store in mysql using jsp  access image from ajax store in mysql using jsp (code to access image captured by camera and store in mysql 

JSP Servlet Questions

insert name city and upload image in database using mysql and jsp
insert name city and upload image in database using mysql and jsp   insert name city and upload image in database using mysql and jsp 

JSP Servlet Questions

jsp page to add users to mysql database
jsp page to add users to mysql database  <%@taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic 

JSP Servlet Questions

jsp page to add the user to mysql database
jsp page to add the user to mysql database  adduser.jsp: <%@taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@taglib uri="/WEB-INF/struts-logic.tld 

JDBC Questions

Save profile and image to mysql database, and view the image in another jsp page
Save profile and image to mysql database, and view the image in another jsp page  Pls. need help in saving the profile info with the image in mysql database.. some basic code pls in jsp... thanks in advance 

JSP Servlet Questions

Upload Exce Data into MySql Using Jsp and Servlet - JSP-Servlet
Upload Exce Data into MySql Using Jsp and Servlet  now i am doing... into Mysql Database table so please give the coding to me, it's very urgent for me... the following link: http://www.roseindia.net/jsp/upload-insert-csv.shtml Hope 

Java-Tutorials

MySQL NOT IN
MySQL NOT IN In this section we will read about how to use the NOT IN function in MySQL with a simple example. MySQL NOT IN() function specifies... will demonstrate you about how to use MySQL not in() function. In this example we 

SQL Question

mysql doubt
mysql doubt  1.What are the method to write malayalam in mysql command prompt?Is it necessary to write malayalam corressponding unicode in mysql command prompt? 2.How to store & retrieve Malayalam from mysql databases 

JDBC Questions

Dateformat in MySQL
Dateformat in MySQL  Date format in MySQL 

JDBC Questions

Mysql connector
Mysql connector  Wer can i get mysql-connector? Is it jar or exe file.../pub/mirrors/maven/mysql/jars/mysql-connector-java-5.0.5.jar It will provide you the download option for mysql-connector-java-5.0.5.jar file. Thanks 

MySQL

MySQL Training ? Online Free MySQL Training
MySQL Training ? Online Free MySQL Training   ... want to know about MySQL, we are starting from installation to the development of enterprise application using MySQL. In this online training/tutorial we are using 

SQL Question

Mysql connect
Mysql connect  i can have a mysql database file and mysql-connector-net .but i have not mysql database. how to connect vb.net thsis database.(C:\Documents and Settings\Admin\My Documents\VB.NET\Stock delna\STC.sql ). plz help me 

JSP Servlet Questions

servlet program - JSP-Servlet
servlet program  Hi All, I just want to write a servlet program where in i want to retreive some data(some names) through a sql query from a sql...("com.mysql.jdbc.Driver"); Connection con = DriverManager.getConnection("jdbc:mysql 

Advertisements Advertisements
 

 

 

DMCA.com