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.... i created dynamic page to display columns in the table but how to handle them and display ...here is the code <%-- Document : columns Created on : Mar 1, 2012, 12:17:14 AM Author : cc --%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<%@ page language="java" import="java.sql.*"%>
<html>
<head><title>Read from mySQL Database</title>
    <link rel="html" href="css.html" type="text/css">
</head>
<body>
 <p align="center"><b>Fields In the table.</b><br>&nbsp;</p>

<div align="center" width="85%">
    <a id="currenttab" href="columns.jsp">columns</a>
    <a href="delete.jsp">delete</a>
<center>
<table border="1" borderColor="#ffe9bf" cellPadding="0" cellSpacing="0" width="658" height="63">
<tbody>
<%
String DRIVER = "com.mysql.jdbc.Driver";
Class.forName(DRIVER).newInstance();


Connection con=null;
ResultSet rst=null;
Statement stmt=null;
String temp=null;

try{
String url="jdbc:mysql://localhost:3306/test";

int i=1;
con=DriverManager.getConnection(url,"root","root");
stmt=con.createStatement();
rst=stmt.executeQuery("select column_name from information_schema.columns where table_name='sam'");
while(rst.next()){

if (i==(i/2)*2){
%>
<tr>
<td bgColor="#ffff98" vAlign="top" width="47" align="center" height="19"><input type="checkbox" name="column"><%=rst.getString(1)%>.</td>

<%
}else{
%>
<tr>
<td bgColor="#ffcc68" vAlign="top" width="47" align="center" height="19"><input type="checkbox" name="column"><%=rst.getString(1)%>.</td>
</tr>
<% }

i++;

}
rst.close();
stmt.close();
con.close();
}catch(Exception e){
System.out.println(e.getMessage());
}
%>

</tbody>
</table>
</center>
</div>



</body>
</html>

thanks in advance......

View Answers

Ads









Related Tutorials/Questions & Answers:
JSP &MYSQL
JSP &MYSQL  Develop a web page for the telephone directory using jsp and mysql
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
Advertisements
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/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 - 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
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 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 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
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
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
How to display all the rows in JSP ,MySQL select condition statement IN dept_table
How to display all the rows in JSP ,MySQL select condition statement IN dept_table  I iam unable to display all the rows in JSP select statement from MYSQL DB.i have used the below code:only first row that satisfy the condition
retrieve related data from database using jsp and mysql
retrieve related data from database using jsp and mysql  Hi sir, please give some example of jsp code for retrieving mysql database values in multiple dropdown list. if we change a value in a dropdown its related value must
Creat a folder, inside it upload and download files in jsp and mysql
Creat a folder, inside it upload and download files in jsp and mysql  Create one or more folder .inside it we can upload and download multiple files   Here is an application that will upload the file and save
Connect JSP with mysql
Connect JSP with mysql   ... how to connect to MySQL database from your JSP code. First, you need to create... tutorial of "How to connect to MySQL Database from JSP?": 2
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
question
question  i need a simple code to display all employees on leave using jsp and mysql
question
question  i need a jsp and mysql program to display all employees on leave
question
question  i need a simple jsp + mysql code for trigger after insert
question
question  i need to set trigger using jsp with mysql query,please help me
question
question  please give me a simple program using bean + jsp + mysql
report making in asp
report making in asp  Hi sir, Please give some example report making code for jsp and mysql
online address book
online address book  how to create online address book using jsp and mysql
How to connect mysql with jsp
How to connect mysql with jsp  how to connect jsp with mysql while using apache tomcat
Search operation in JSP page
Search operation in JSP page  How to perform search in jsp with MYSQL database plz help me
question
question  i need a jsp and mysql program to retrieve data from employee table and attendance table using user name and password at a time
jsp sql server 2005 connectivity
jsp sql server 2005 connectivity  your jsp mysql tutorial is very help full.Please tell me how to connect jsp with SQL server 2005
question
question  i need a simple jsp + mysql code to display all absentees.and please send,if have any option to send any notification message to user who forgot to mark attendance
question
question  Good morning sir, i need a jsp and mysql code to track attendance immediately,and if you have any idea about how to take absentees please send me that too
question
question  i need a jsp and mysql program to retrieve data from employee table and attendance table using user name and password at a time for a Sign in user
question
question  sir, i need a jsp+mysql query to select data from two table for a perticular user eg:select data from employee and leave table for john.please help me
photo viwer
photo viwer  i need coding for photo viewer using jsp mysql   Please visit the following link: http://www.roseindia.net/jsp/downloadimage.shtml
jsp online ex
jsp online ex  plz help me providing source code for mini project online exam using jsp and mysql..... plzplz plzhelp me pur
question
question  good morning, please give me a jsp+mysql code to calculate monthly salary according to salary.i have two off days per month except... can't create a code for this.please send me a model jsp +mysql code to calculate
question
of the grid and below a button for approving all attendances marked )-using java/jsp + mysql
question
of the grid and below a button for approving all attendances marked )-using java/jsp + mysql
question
absentees.i need a jsp code to insert absent,half day leave in to data base while user mark attendance after a fixed time.using jsp and mysql...question  good afternoon sir, i have a project in jsp which contains
question
question  i need to mark employees as half day absent who came after 10'o clock in my web project,so i need to know who are all late entry.if you have any idea using jsp and mysql please help me
How to provide navigation in quiz application using jsp?
How to provide navigation in quiz application using jsp?  hi everyone. i am using jsp with mysql connectivity. i have to retrieve questions from db one at a time. on clicking the next it should go the next question
How to connect to MySQL in JSP?
How to connect to MySQL in JSP?  How to connect to MySQL in JSP..., You can use the Java JDBC code to connect to MySQL database in JSP page. Check the tutorial: Connect JSP with mysql Thanks
How to insert and retrieve Questions with special symbols and images into database in an ONLINE EXAMINATION project?
How to insert and retrieve Questions with special symbols and images into database in an ONLINE EXAMINATION project?  Hi guys. I am developing an online examination application. I am using JSP,MYSQL and ECLIPSE .The problem
data update
the data and edit it based on subjectcode(varchar)this should be done using jsp and mysql the table format is like this: subjectcode(varchar),subjectname
data update
the data and edit it based on subjectcode(varchar)this should be done using jsp and mysql the table format is like this: subjectcode(varchar),subjectname
data update
the data and edit it based on subjectcode(varchar)this should be done using jsp and mysql the table format is like this: subjectcode(varchar),subjectname
data update
the data and edit it based on subjectcode(varchar)this should be done using jsp and mysql the table format is like this: subjectcode(varchar),subjectname
data update
the data and edit it based on subjectcode(varchar)this should be done using jsp and mysql the table format is like this: subjectcode(varchar),subjectname
data update
the data and edit it based on subjectcode(varchar)this should be done using jsp and mysql the table format is like this: subjectcode(varchar),subjectname
data update
the data and edit it based on subjectcode(varchar)this should be done using jsp and mysql the table format is like this: subjectcode(varchar),subjectname
Sql delete operation
Sql delete operation  Hi, I am tried to several times but i am get an answer.I used html anchor element for redirecting the page. i am using jsp with mysql 1.admincustdb.jsp : in this page contains only display the database
jsp tabs
on submit button the that tab page will not replace. I am using Jsp and mysql...jsp tabs  Hi everyone, I want create the tabs in jsp page..both tab linked with another jsp page. the link jsp page with each tab having a form
how to make two types of user for a web dynamic project
how to make two types of user for a web dynamic project  Hello everyone, I am doing a dynamic web project using jsp and mysql so my problem is that i want to make two user one is admin other is genral user, the admin can see all

Ads