Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners online test application in java
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


zaidkhan
online test application in java
1 Answer(s)      2 years and 2 months ago
Posted in : Java Beginners


Can questions come in html file (test.html) if we link test.jsp with test.html


Advertisement
View Answers

August 9, 2012 at 11:50 AM


We have taken radiobuttons in our application, you can take textarea, textfield etc. Here we have created a table ans(ques,op1,op2,op3,op4,op5,ans) in the mysql database.

1)radio.jsp:

<%@page import="java.sql.*"%>
<form name="form" method="post" action="result.jsp">
<table>
<%
Class.forName("com.mysql.jdbc.Driver");
Connection conn =DriverManager.getConnection("jdbc:mysql://localhost:3306/register","root","root");
Statement st=conn.createStatement();
ResultSet rs=st.executeQuery("select * from answers");
int i=0;
while(rs.next()){
%>
<tr>
<td><%=rs.getString(1)%></td>
<td><input type="radio" name="radio<%=i%>" value="<%= rs.getString(2) %>"></td><td><%=rs.getString(2)%></td>
<td><input type="radio" name="radio<%=i%>" value="<%= rs.getString(3) %>"></td><td><%=rs.getString(3)%></td>
<td><input type="radio" name="radio<%=i%>" value="<%= rs.getString(4) %>"></td><td><%=rs.getString(4)%></td>
<td><input type="radio" name="radio<%=i%>" value="<%= rs.getString(5) %>"></td><td><%=rs.getString(5)%></td>
<td><input type="radio" name="radio<%=i%>" value="<%= rs.getString(6) %>"></td><td><%=rs.getString(6)%></td>
<td><input type="hidden" name="ans<%=i%>" value="<%= rs.getString(7) %>"></td>

</tr><%
i++;
}
%>
<tr><td><INPUT type="submit" name="submit" value="Submit"></td></tr>
</table>
</form>

2) result.jsp:

<%@page import="java.sql.*"%>
<%@page import="java.util.*"%>
<%
String id[]= new String[10];
for(int i=0;i<10;i++){
id[i]=request.getParameter("radio"+i);
}
String str[]= new String[10];
for(int j=0;j<10;j++){
str[j]=request.getParameter("ans"+j);
}
boolean isCorrect = Arrays.equals(id,str);
out.println("Your Answers are : " + isCorrect);
%>

For more information,please visit the following link:

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



Related Tutorials/Questions & Answers:
online test application in java
Online Test Application Table Of Contents Introduction To Application Database Design Creating Data Access Object (DAO) Design Pattern Creating Views Writing Actions Mapping Application Admin Module User Module Download
online test application in java
online test application in java  Can questions come in html file... the following link: http://www.roseindia.net/jsp/online-quiz-application-jsp.shtml... radiobuttons in our application, you can take textarea, textfield etc. Here we have created
Advertisements
Online test
Online test   I am creating a project for online test system. There should be a timer,on pressing next button it will retrieve a next question and it will show on the same page,on completion of test it will show result
online test project on java using servlets and jsp
online test project on java using servlets and jsp  as i am doing online test project on java using jsp and servlets ,,,the problem is in the code...;Here is a jsp application. Here we have created a table test
code for timer in java netbeans for online test series countdown timer
code for timer in java netbeans for online test series countdown timer  code for timer in java netbeans for online test series countdown timer
online test project
online test project  i need online test project in java using struts...kindly help..   Have a look at the following link: http://www.roseindia.net/struts/struts/struts2.2.1/onlinetestapp
Online Test System Project
Online Test System Project  I want a full ready-made project on online test system in jsp. i am not using servlet but only jsp.And backend database...://www.roseindia.net/jsp/online-quiz-application-jsp.shtml
online test system
online test system  Hi, I am creating a project for online test.../online-quiz-application-jsp.shtml http://www.roseindia.net/answers/viewqa/JSP... question and it will show on the same page,on completion of test it will show
Online Test System Project
Online Test System Project  I want a full ready-made project on online test system in jsp. i am not using servlet but only jsp.And backend database as mysql. my email address is help me. send a full project on online test system
online test software using jsp and servlet
online test software using jsp and servlet  online test software using jsp and servlet
java test
java test  How to read the data from an .csv file and write into an xml file using java? (test_sample.csv(it should contain at least 39 lines)) i...:\\Documents and Settings/janardhany/Desktop/test_sample.txt
online banking application
online banking application  i want to develope online banking application by using jsp with oracle 10g database but i have problem to view the mini statement and balance enquiry...when we entered accontno and pin and select
Using the QUnit to test jQuery application
Using the QUnit to test jQuery application       Using the QUnit to test jQuery application Using Qunit , testing of JQuery become very easy and efficient
how to conduct the test in java
how to conduct the test in java  how to conduct the test in java
java test - Java Beginners
java test   Trace through the following program segment and state clearly the output that will be generated: public static void main(String [] args){ int no1; int no2; for (no1 = -2; no1 <= 1; no1++){ for (no2
Online Java Compiler
that allows a Java application developers to write and test their application code... you to test your Java and other programming language codes online...Online Java Compiler provides the Java development environment online, which
Online Quiz Application in JSP
Online Quiz Application in JSP  ... are going to implement of Online quiz application using of JSP. Step 1: Create... is the code. <%@page language="java" import="java.sql.*" %>
Create test engine - Java Beginners
Create test engine  How can create a test engine dat generates questions randomly using javax.swing in java
Online Java Tutorial
Online Java Tutorial  Hi, I am trying to find Online Java Tutorials. Give me the URL. Thanks   Hi, Learn Java at Java Tutorials section. Thanks
Online Java Training for Beginners
Online Java Training for Beginners The online java training for beginners... or no knowledge of Java programming can undertake Rose India's online Java training for the beginners. The Online Java Programming course for the beginner's
Java File Handling Test Results
Java File Handling Test Results   Is somebody able to help me with this Write a program to read each name from the file and prompt the user... java.io.*; public class Test { public static void main(String[] args) throws
online attendance management in java.....
online attendance management in java.....  if any body have this project or project related to this please help.... i need it urgently.. plz help me out
junit test case - Java Beginners
junit test case  how to use junit for testing email id format  Hi Friend, Please visit the following link: http://www.roseindia.net/junit/ Hope that it will be helpful for you. Thanks
Java Online Training
Java online training is provided for free to everyone interested in learning... in the IT department. Online training of Java given at Roseindia is one of the best in comparison to other types of training available in the market. Java online training
online shopping - Java Beginners
online shopping  Respected Sir, Sir please help me how to handle online shooping and shopping cart by click on image by only using jsp
online shopping - Java Beginners
online shopping  Respected Sir, Sir please help me how to handle online shooping and shopping cart by click on image by only using jsp?   Hi friend, For solving the problem visit to : http
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
online java traaining - Java Beginners
online java traaining  HI, Can u tell me ! that where i can study online training for java study?? Where i get home work or task or daily lab... java examples regarding core java,IO package, Threads,Collections, Swing etc. You
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... you kindly document the steps in more details to run your application
JAVA JAZZ UP - Free online Java magazine
? will provide Java developers an online testing service to test and monitor Java... JAVA JAZZ UP - Free online Java magazine   ... Java Around the Globe   Sony Ericsson to provide new online
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
Advertisements
 

 

 

DMCA.com