online quiz program coding using jsp, jdbc odbc connection with ms. access.. Thank you.

online quiz program coding using jsp, jdbc odbc connection with ms. access.. Thank you.

please provide online quiz program coding using jsp, jdbc odbc connection with ms. access.. Thank you.

View Answers

April 3, 2012 at 3:03 PM

Create table test(ques,op1,op2,op3,op4,ans) and answers(id,ans). Then try the following code:

1)form.jsp:

<%@page import="java.sql.*"%>
<html>
<form method="post" action="result.jsp">
<table>
<%
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/register","root";, "root");
Statement st=connection.createStatement();
ResultSet rs=st.executeQuery("Select * from test");
int i=1;
while(rs.next()){
%>
<tr><td><%=i%></td><td><%=rs.getString("ques")%></td><td><input type="radio" value="<%=rs.getString("op1")%>" name="radio<%=i%>"/><%=rs.getString("op1")%></td><td><input type="radio" value="<%=rs.getString("op2")%>" name="radio<%=i%>"/><%=rs.getString("op2")%></td><td><input type="radio" value="<%=rs.getString("op3")%>" name="radio<%=i%>"/><%=rs.getString("op3")%></td><td><input type="radio" value="<%=rs.getString("op4")%>" name="radio<%=i%>"/><%=rs.getString("op4")%></td></tr>

<%
i++;
}
%>
<tr><td><input type="submit" value="submit"></td></tr>
</table>
</form>
</html>

2)result.jsp:

<%@page import="java.sql.*"%>

<%
String st[]=new String[10];
for(int i=0;i<st.length;i++){
int j=i+1;
st[i]=request.getParameter("radio"+j);
System.out.println(st[i]);

}
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/register","root";, "root");
Statement stmt=connection.createStatement();
ResultSet rs=stmt.executeQuery("Select ans from answers");
String ans="";
while(rs.next()){
ans+=rs.getString("ans")+" ";
}
int count=0;
String answers[]=ans.split(" ");
for(int i=0;i<answers.length;i++){
if(st[i].equals(answers[i])){
count++;
}
}
out.println("Your "+count+" answers are correct");
%>

For more information, visit the following link:

http://www.roseindia.net/jsp/online-quiz-application-jsp.shtml









Related Tutorials/Questions & Answers:
online quiz program coding using jsp, jdbc odbc connection with ms. access.. Thank you.
online quiz program coding using jsp, jdbc odbc connection with ms. access.. Thank you.  please provide online quiz program coding using jsp, jdbc odbc connection with ms. access.. Thank you.   Create table test
Online quiz mini project
Online quiz mini project  Sir i need a online quiz program coding using java servlet, jdbc odbc connection with ms. access. If possible send that source code to me. Thank you
Advertisements
Connection using Jdbc-odbc bridge Driver
Connection using JDBC-ODBC bridge driver JDBCExample.java... program, Jdbc-Odbc bridge driver create connection between java application...=DriverManager.getConnection("jdbc:odbc:datastud"); --In the above code, connection class
Connect to MS Acces wothout using ODBC but JDBC - JDBC
Connect to MS Acces wothout using ODBC but JDBC  Hi, I want to connect my MS Access using JDBC but not ODBC. Please help me out. Thanks
how to connect java with ms access using odbc in eclipse
how to connect java with ms access using odbc in eclipse  import..."); //Connection con = DriverManager.getConnection("jdbc:odbc:DRIVER={Microsoft Access Driver (*.accdb)};DBQ=student.accdb","",""); Connection con
problem in jsp using ms-access
problem in jsp using ms-access  after starting server(tomcat) wen v...("jdbc:odbc:st") Can u pls help us in solving this pbm by giving whole source... = DriverManager.getConnection("jdbc:odbc:student"); Statement st=con.createStatement
jdbc odbc connection
jdbc odbc connection  i need a program in java which uses a jdbc odbc connection   Hi, You can create odbc datasource on your windows computer and then access in your Java program.ADS_TO_REPLACE_1 Read the JDBC ODBC
MS Access - JDBC
MS Access  hello Mr.Kaleeswaran, thank you very much for giving information about MS access database...but still i am having doubt in that topic...("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con = DriverManager.getConnection("jdbc:odbc:db1
JDBC-Odbc Connection
help you in explaining JDBC Odbc Connection in Java. The code explains you... JDBC-ODBC Connection       JDBC-ODBC Connection is a JDBC driver that translates the operation
Need Help in creating online quiz application using JSP - JSP-Servlet
Need Help in creating online quiz application using JSP  Hi, i am creating online Quiz application using JSP and MySQl ,Apache 6 in Netbeans IDE. i..., JSP Page Online Quize Application
JDBC ODBC Connection In Java
you about how to use the JDBC API using JDBC ODBC driver. In this example we... in Java and we will make a connection using JDBC ODBC driver and then we...JDBC ODBC Connection In Java In this section we will read about the various
MS Access - JSP-Servlet
problem is how to connect MS Acces database with servlets ... thank you..."); Connection con = DriverManager.getConnection("jdbc:odbc:db1... stepts 1.to configure the ms access database to your system control panel
Online Quiz Application in JSP
are going to implement of Online quiz application using of JSP. Step 1: Create... quiz question and answer form using with JSP or JDBC database.  Here... Online Quiz Application in JSP  
Updating Ms Access Database using jsp - JSP-Servlet
Updating Ms Access Database using jsp  Hi I am new to jsp and I am trying to update a record in an access database. I only want to update part... in the fields. Can you tell me what I am doing wrong.  Hi Friend, Create
java &ms access - JDBC
for a food festival using Java swing as front end and MS access as Backend... ve managed to populate the JComboBox using MS Access. The problem is only 8 per... = DriverManager.getConnection("jdbc:odbc:access"); Statement st
Jdbc MS-Access question
Jdbc MS-Access question  How to delete records from the three table in MS-Access? They are in relationship with each other regarding to data field
Jdbc MS-Access question
Jdbc MS-Access question  How to delete records from the three table in MS-Access? They are in relationship with each other regarding to data field
jdbc warning regarding to ms access
jdbc warning regarding to ms access  shows warning msg while compiling using ms access : warning: sun.jdbc.odbc.JdbcOdbcDriver is Sun proprietary API...=DriverManager.getConnection("jdbc:odbc:accdsn","",""); try{ Statement stmt
MS Access` - JDBC
MS Access`  Hello Sir, Thank you very much for your valuable... to insert image into MS Access Database. Now the task is how to retrieve the image.... So please help me in this regard sir.. thank you sir
MS ACCESS - JDBC
MS ACCESS  java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'origin='src' destination='dest''. THAT MY PROBLEM
how to send emails to many using jsp by connecting to ms access dabase.
how to send emails to many using jsp by connecting to ms access dabase.  Hi. I am trying to send multiple emails and the email ids are stored in a table in a msaccess database.I am using jsp for this.And finally there should
audio files in jdbc connectivity with ms-access - JDBC
to retrieve audio files through jdbc connectivity with ms-access and how to play... static void main(String[] args) { try{ String url="jdbc:odbc:access"; File... = DriverManager.getConnection("jdbc:odbc:access"); PreparedStatement ps
code for jsp to db connection using jdbc
code for jsp to db connection using jdbc  please send me the code... = DriverManager.getConnection("jdbc:odbc:student"); Statement st=con.createStatement...;html> <form method="post" action="http://localhost:8080/examples/jsp
HTML(Registration form) to Jsp to stored into MS ACCESS database
HTML(Registration form) to Jsp to stored into MS ACCESS database  i am sending one html file that contain 18 fields these are stored in ms-access database by using jsp code.i want to urgent jsp code. please urgent sir. thank
MS-Access
MS-Access  I am trying to upload a image to ms-acess using jsp,and my...: [Microsoft][ODBC Microsoft Access Driver]COUNT field incorrect ".I think i set... = DriverManager.getConnection("jdbc:odbc:student"); File imgfile = new File("C:/rose.jpg
how to insert values from jsp into ms access
how to insert values from jsp into ms access   how to insert values using jsp into ms access database
Thank you so much - JSP-Servlet
Thank you so much  Respected Sir/madam, By the grace of Sri guru Raghavendra, I have successfully got the output for my Image selection problem.. Lord Raghavendra has sent your team to help me in time.. Thanks
how to connect to MS access database in JSP?
how to connect to MS access database in JSP?  how to connect to MS access database in JSP? Any seetings/drivers need to be set or installed before... = DriverManager.getConnection("jdbc:odbc:student"); Statement st=con.createStatement
how to store image file and videofile in ms access database using java? - JDBC
how to store image file and videofile in ms access database using java?  how to store image file and video file in ms access database using java
How to insert or delete records in MS access database using jsp - JSP-Servlet
How to insert or delete records in MS access database using jsp  Hi friends please provide me a solution that i insert or delete record from a database using java server pages. I used the microsoft access 2003 database. PlZ
Failed to run Online Quiz Application in JSP - JSP-Interview Questions
Failed to run Online Quiz Application in JSP   Hi, I have been following your following link to run the online quiz application, but I failed... your question. Thanks  Hi, I cannot run your online quiz
online quiz
online quiz  Define a Question class which stores a multiple choice...) level. Use the Question class to define a Quiz class. A quiz can be composed of up to 10 questions. Define the add method of the Quiz class to add a question
J2ME connectivity to ms access
J2ME connectivity to ms access  How to establish client server connectivity to access ms access database on the server side? I have made the odbc connection. Plz help me in the coding part.. Dont know how to start
accessing ms access through jsp
accessing ms access through jsp  i have 3 tables in my database employee,project,task if i put employee id the search field .i should get details from other table what all queries should i use in servlet file and i am using
jsp coding please.
list. please show me how to do it? thank you. By the way, I'm using access..."); Connection con = DriverManager.getConnection("jdbc:odbc:student"); Statement...jsp coding please.  hi sir, my name is logeswaran. I have a problem
online quiz
online quiz  Define a Question class which stores a multiple choice...) level. Use the Question class to define a Quiz class. A quiz can be composed of up to 10 questions. Define the add method of the Quiz class to add a question
online quiz
online quiz  Define a Question class which stores a multiple choice...) level. Use the Question class to define a Quiz class. A quiz can be composed of up to 10 questions. Define the add method of the Quiz class to add a question
online quiz
online quiz  Define a Question class which stores a multiple choice...) level. Use the Question class to define a Quiz class. A quiz can be composed of up to 10 questions. Define the add method of the Quiz class to add a question
online quiz
online quiz  Define a Question class which stores a multiple choice...) level. Use the Question class to define a Quiz class. A quiz can be composed of up to 10 questions. Define the add method of the Quiz class to add a question
online quiz
online quiz  Define a Question class which stores a multiple choice...) level. Use the Question class to define a Quiz class. A quiz can be composed of up to 10 questions. Define the add method of the Quiz class to add a question
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
jdbc odbc
jdbc odbc  Sir, i want to get the selected value from JCombobox to ms... simply i just want to print in ms access or stored on ms acess databse in selected... = DriverManager.getConnection("jdbc:odbc:swing"); String sql = "INSERT
MS Access connct using flex with java
MS Access connct using flex with java  Hi All, Can anybody help me how to connect to the MS access database and getting the data using flex in java technology with tomcat server
ODBC connection
ODBC connection   import java.sql.*; import java.util.*; public... ODBC program,bt here I am getting error i.e Exception in Thread "main...)c.newInstance(); String s="jdbc:oracle:thin:@localhost:1521:ORCL
ODBC connection
ODBC connection   import java.sql.*; import java.util.*; public... ODBC program,bt here I am getting error i.e Exception in Thread "main...)c.newInstance(); String s="jdbc:oracle:thin:@localhost:1521:ORCL
ODBC connection
ODBC connection   import java.sql.*; import java.util.*; public... ODBC program,bt here I am getting error i.e Exception in Thread "main...)c.newInstance(); String s="jdbc:oracle:thin:@localhost:1521:ORCL
online shopping cart complete coding in pure jsp
online shopping cart complete coding in pure jsp  online shopping cart complete coding in pure jsp   Please visit the following link: JSP Online shopping cart
jdbc odbc
jdbc odbc  i want to fetch the data from the ms access and print on ms word for printing purpose?? the whole program is in swing to ms acess connectivity.. the whole set up is perform only printing part is remaining? so help me
jdbc odbc
jdbc odbc  i want to fetch the data from the ms access and print on ms word for printing purpose?? the whole program is in swing to ms acess connectivity.. the whole set up is perform only printing part is remaining? so help me
How to Open Picture From M.S. Access Database using Java Servlet ?
How to Open Picture From M.S. Access Database using Java Servlet ?  ... Database But i m still not able to open this picture through Java using M.S. Access...="jdbc:odbc:MyDsn"; Connection conn=DriverManager.getConnection

Ads