Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  
 

online test application in java

Ads

 
 

Share on Google+Share on Google+

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

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

Ads
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:

<[email protected] 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:

<[email protected] import="java.sql.*"%>
<[email protected] 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


Ads









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 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
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
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 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
online test software using jsp and servlet
online test software using jsp and servlet  online test software using jsp and servlet
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. <[email protected] language="java" import="java.sql.*" %>
Free Java online Training
Free Java online Training  Hi, From where I can take online free Java Training classes? Thanks   Hi, Ok, We will provide online free... for registering for Free Online Java Training classes. Thanks
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
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
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 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
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 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
how to conduct the test in java
how to conduct the test in java  how to conduct the test in java
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
Best Core Java Online Training
Best Core Java Online Training  Hi, I want to make my career in Java programming and for learning quickly searching for Java online training. Which is the best Core Java Online Training course? Thanks   Hi, Learning
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
Where to take online Java Training?
Where to take online Java Training?  Hi, I am new in programming and trying to learn Java for making career in Java. I want to find good Job in Java programming. Where to take online Java training course? Thanks   Hi
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
Java Learning online made easy
Java Learning online made easy  Hi, We are announcing Java tutorials for learning Java online at our website. These tutorial are well written... are best for learning Java online and becoming expert in few months. "Here
Core Java Online Training
of such application is MATLAB. The practical and video-based core java online...Ascend as an Expert Developer with Core Java Online Training - Online... java online training for those who wish to learn, but are bounded by time, due
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