Important: Use custom search function to get better results from our thousands of pages

Use " " for compulsory search eg:"electronics seminar" , use -" " for filter something eg: "electronics seminar" -"/tag/" (used for exclude results from tag pages)


 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
next and previous button for online examination question page coding using jsp
Post: #1

jsp coding for next and previous button in online quiz system
Post: #2
exam online using jsp
) ONLINE REVIEW USING JSP

OBJECTIVE:
To create a three-tier application to conduct an online test using JSP and database.

ALGORITHM:

1. Design the HTML page (ExamClient.html) with the following
a) Create a form to obtain user input.
b) Use the radio buttons to make several options for the questions.
c) Set the server URL (ExamServer.jsp) as the value of the action attribute.
d) Use the submit button to invoke the server and send the form data to the server.
2. Create the JSP file with the following
a) Read the customer's entry.
b) Retrieve the answers from the database.
c) Match the user's responses with the correct answers from the database table.
d) For each correct answer, increase the mark by 5.
e) The server shows the brand and the result to the client as a response.

PROGRAM:

ExamClient.html

Code:
<html>
<head>
<title>Online Exam Client</title>
<style type="text/css">
   body{background-color:black;font-family:courier;color:blue}
</style>
</head>
<body>
<h2 style="text-align:center">ONLINE EXAMINATION</h2>
<h3>Answer the following questions (5 marks for each correct answer)</h3>
<hr/>
<form name="examForm" method="post" action="ExamServer.jsp">
1.Who is called as the father of computer?<br/>
<input type="radio" name="ans1" value="Sachin">Sachin
<input type="radio" name="ans1" value="Stuart">Stuart
<input type="radio" name="ans1" value="Charles Babbage">Charles Babbage
<input type="radio" name="ans1" value="Napier">Napier
<br/><br/>
2.C++ was developed by?<br/>
<input type="radio" name="ans2" value="Dennis Ritchie">Dennis Ritchie
<input type="radio" name="ans2" value="None">None
<input type="radio" name="ans2" value="David Ritchie">David Ritchie
<input type="radio" name="ans2" value="John">John
<br/><br/>
3.C was developed by?<br/>
<input type="radio" name="ans3" value="Dennis Ritchie">Dennis Ritchie
<input type="radio" name="ans3" value="Stroustrup">Stroustrup
<input type="radio" name="ans3" value="David Ritchie">David Ritchie
<input type="radio" name="ans3" value="Charles Babbage">Charles Babbage
<br/><br/>
<input type="submit" value="Check Your Result"/>
</form>
</body>
</html>

ExamServer.jsp

Code:
<%@page contentType="text/html" language="java" import="java.sql.*"%>
<html>
<head>
<title>Online Exam Server</title>
<style type="text/css">
   body{background-color:black;font-family:courier;color:blue}
</style>
</head>
<body>
<h2 style="text-align:center">ONLINE EXAMINATION</h2>
<p>
<a href="ExamClient.html">Back To Main Page</a>
</p>
<hr/>
<%
String str1=request.getParameter("ans1");
String str2=request.getParameter("ans2");
String str3=request.getParameter("ans3");
int mark=0;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:examDS");
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery("SELECT * FROM examTab");
int i=1;
while(rs.next())
{
if(i==1)
{
  String dbans1=rs.getString(1);
  if(str1.equals(dbans1))
  {
   mark=mark+5;
  }
}
if(i==2)
{
  String dbans2=rs.getString(1);
  if(str2.equals(dbans2))
  {
   mark=mark+5;
  }
}
if(i==3)
{
  String dbans3=rs.getString(1);
  if(str3.equals(dbans3))
  {
   mark=mark+5;
  }
}
i++;
}
if(mark>=10)
{
out.println("<h4>Your Mark Is : "+mark+"</h4>");
out.println("<h3>Congratulations....! You Are Eligible For The Next Round...</h3>");
}
else
{
out.println("<h4>Your Mark is : "+mark+"</h4>");
out.println("<h3>Sorry....!! You Are Not Eligible For  The Next Round...</h3>");
}
%>
</form>
</body>
</html>
 

Marked Categories : next and previous button for online examination question,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Image Verification
(case insensitive)
Please enter the text within the image on the left in to the text box below. This process is used to prevent automated posts.

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  khedut nodhani patrak online registration Guest 2 0 26-10-2018 03:34 PM
Last Post: Guest
  ppt about artificial hand using embedded system Guest 0 0 24-10-2018 02:39 PM
Last Post: Guest
  ppt about artificial hand using embedded system Guest 0 0 24-10-2018 02:33 PM
Last Post: Guest
  pune university tybcs php eqps question answer Guest 0 0 08-09-2018 01:35 PM
Last Post: Guest
  php interview question seminar ideas 2 3,530 08-08-2018 08:33 PM
Last Post: bmaimuspetrovay3942
  dynamic signature verification using pattern recognition Guest 0 0 14-06-2018 04:26 PM
Last Post: Guest
  rigidity modulus by static method viva question Guest 0 0 07-06-2018 07:46 AM
Last Post: Guest
  matlab code for iris recognition using wavelets Guest 0 0 11-05-2018 07:49 AM
Last Post: Guest
  online matrimonial project Guest 0 0 13-04-2018 01:09 AM
Last Post: Guest
  mini project leaky bucket on computer graphics using opengl Guest 3 1,835 10-04-2018 09:16 PM
Last Post: Guest
This Page May Contain What is next and previous button for online examination question page coding using jsp And Latest Information/News About next and previous button for online examination question page coding using jsp,If Not ...Use Search to get more info about next and previous button for online examination question page coding using jsp Or Ask Here

Options: