User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 456,433 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,638 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 5815 | Replies: 4
Closed Thread
Join Date: May 2007
Posts: 1
Reputation: kavisymphony is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
kavisymphony kavisymphony is offline Offline
Newbie Poster

online exam source code in jsp

  #1  
Jun 7th, 2007
hi every body! i m doing my online project in jsp..i want to refer some other online exams..so i need source code for online exam application in jsp...any body is there for me to help?
AddThis Social Bookmark Button
 
Join Date: May 2006
Location: ★ ijug.net ★
Posts: 1,012
Reputation: ithelp will become famous soon enough ithelp will become famous soon enough 
Rep Power: 6
Solved Threads: 68
ithelp ithelp is offline Offline
Veteran Poster

Re: online exam source code in jsp

  #2  
Jun 7th, 2007
check some quiz sites.
 
Join Date: Aug 2007
Posts: 5
Reputation: samsathish is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
samsathish samsathish is offline Offline
Newbie Poster

Re: online exam source code in jsp

  #3  
Sep 20th, 2007
Originally Posted by ithelp View Post
check some quiz sites.
i need online exam source code in jsp
 
Join Date: Feb 2006
Posts: 1,509
Reputation: masijade is a glorious beacon of light masijade is a glorious beacon of light masijade is a glorious beacon of light masijade is a glorious beacon of light masijade is a glorious beacon of light 
Rep Power: 10
Solved Threads: 136
masijade's Avatar
masijade masijade is offline Offline
Posting Virtuoso

Re: online exam source code in jsp

  #4  
Sep 21st, 2007
So write some. If you have problems, and a specific question, then come back and we will help, but for God's/Allah's/Buddha's/<insert additional diety names here>'s sake, Do Your Own Homework, or at least make an attempt at it.
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
 
Join Date: Oct 2007
Posts: 79
Reputation: hidash_in has a little shameless behaviour in the past 
Rep Power: 0
Solved Threads: 0
hidash_in hidash_in is offline Offline
Junior Poster in Training

Re: online exam source code in jsp

  #5  
Oct 9th, 2007
<%@ page contentType="text/html" %>
<%@ page session="true" %>
<%@ page language="java" %>
<%@ page autoFlush="true" import="com.hurix.mhlncms.*, java.util.*"%>
<%@ page import="java.util.*,java.io.*,java.sql.*"%>
<jsp:useBean id="hdbc" class="com.hurix.mhlncms.cmslib.cmsdbconnection.HurixDbconnection" scope="application" />
<jsp:useBean id="mis" class="com.hurix.mhlncms.online" scope="page" />

<HTML><HEAD><TITLE>Management Information System</TITLE>

<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<STYLE type=text/css>
BODY
{
MARGIN: 0px
}
</STYLE>

<SCRIPT language=javascript>

var hr = <%=request.getAttribute("HR") %>
var sec = 00;
var min =00;
var count1;

function countDown()
{
sec--;

if (sec == -01)
{
sec = 18;
min = min - 1;
}
else { min = min; }

if (sec<=9)
{ sec = "0" + sec;
}

if(min==-01)
{
min=0;
hr= hr++;
}

time = (hr<=9 ? "0" + hr : hr)+" : " + (min<=9 ? "0" + min : min)+ " : " + sec ;
document.online.timeLeft.value = time;

if (document.getElementById)
{
theTime.innerHTML = time;
}

SD=window.setTimeout("countDown();", 1000);

if (hr=='00' && min == '00' && sec == '00')
{ sec = "00"; window.clearTimeout(SD);
alert("The time is Expiered");


var inputs=0;
var cou=0;
var aa;
var examdate1 = document.online.examdate1.value;
for(var x=0;x<10;x++)
{
var name= new Array(10)
name[0]="TRAP";
name[1]="Dennisriche";
name[2]="ThomasJohn";
name[3]="MarkHoneywell";
name[4]="Active server pages";
name[5]="Shozo Kawasaki";
name[6]="Neither Process Nor Completes Its Work";
name[7]=" Western India Vegetable Products Limited";
name[8]="Java server pages";
name[9]="Object oriented";
//alert("array:"+name[x]);
inputs = document.getElementsByTagName('input')
for(var i=0; i < inputs.length; i++)
{
if(inputs[i].checked==true)
{
aa=inputs[i].value;
//alert("The selected value is"+aa);
if(aa==name[x])
{
cou++;
}
}
}
}
alert("count:"+cou);
document.location.href="techexam.jsp?cou="+cou+"&examdate1="+examdate1+" ";
}
}
window.onload = countDown;

</script>

<script text="javascript">

function getValues()
{
//<%!int j=1;%>
var inputs=0;
var cou=0;
var aa;

var examdate1 = document.online.examdate1.value;

for(var x=0;x<10;x++)
{
var name= new Array(10)
name[0]="TRAP";
name[1]="Dennisriche";
name[2]="ThomasJohn";
name[3]="MarkHoneywell";
name[4]="Active server pages";
name[5]="Shozo Kawasaki";
name[6]="Neither Process Nor Completes Its Work";
name[7]=" Western India Vegetable Products Limited";
name[8]="Java server pages";
name[9]="Object oriented";
//alert("array:"+name[x]);
inputs = document.getElementsByTagName('input')
for(var i=0; i < inputs.length; i++)
{
if(inputs[i].checked==true)
{
aa=inputs[i].value;

if(aa==name[x])
{
cou++;
}
}
}
}
alert("count:"+cou);
document.location.href="techexam.jsp?cou="+cou+"&examdate1="+examdate1+" ";
}

</script>
<script type="text/javascript" src="../JavaScript/datetimepicker.js"></script>

<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
<link href="../css/form.css" rel="stylesheet" type="text/css">
<link href="../css/style.css" rel="stylesheet" type="text/css">

<%
mis.setHurixDbconnection(hdbc);
String examdate1 = request.getParameter("examdate") != null ? request.getParameter("examdate") : null;
String answer = "";
%>

<FORM name="online">
<TABLE cellSpacing=0 cellPadding=0 width=776 border=0>
<input type="hidden" name= "examdate1" value="<%=examdate1%>">
<TBODY>
<TR>
<TD class=Form_Header bgColor=#999999>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD class=popheader width=25>&nbsp;</TD>
<TD class=popheader align=left width=222>Optitude Test </TD>
<TD align=left width=242 height=25>&nbsp;</TD>
<TD class=toplink vAlign=center align=left width=211>
<TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%"
border=0>
<TBODY>
<TR>
<TD align=right width="28%"><LABEL></LABEL></TD>
<TD align=right width="28%"><LABEL></LABEL></TD>
<TD align=right width="25%"><LABEL></LABEL></TD>
<TD align=middle width="29%"><LABEL>
</TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD>&nbsp;</TD></TR>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>


Exam Timing::<SPAN class=timeClass id=theTime></SPAN>
<SPAN class=labels id=theTime><input name="timeLeft" id=theTime size="10"></SPAN>
<TR vAlign=top align=left>
<TD width="10%" height=35>&nbsp;</TD>
<TD class=labels borderColor=#dfeaff height=35>
<SPAN class=red_marker></SPAN></TD>
<TD borderColor=#dfeaff height=35>

<%
Connection con = null;
String strPrjQuery=null;
ResultSet rst=null;
Statement stmt=null;
Collection EItemCheck=new Vector();
int n=0;
int i=0;
String q;

try
{
con=hdbc.getConnectionFromPool();

stmt=con.createStatement();
rst=stmt.executeQuery("select * from PMS_ONLINEWRITTEN ORDER BY dbms_random.value");

while(rst.next())
{
%>


<INPUT maxLength="100" type="text" name="q<%=n%>" class="fetch" size="100" value="<%=++n%>. <%=rst.getString("QUESTION")%>"><br>

<INPUT maxLength="100" type="text" name="ans<%=n%>" class="fetch" size="100" value=" <%=rst.getString("ANSWER")%>"><br>



<INPUT maxLength="30" type="radio" name="ques1 <%=n%>" class="fetch" value="<%=rst.getString("ANSWER1")%>">
<INPUT maxLength="100" type="text" name="ques" class="fetch" size="100" value="<%=rst.getString("ANSWER1")%>"><br>
<INPUT maxLength="30" type="radio" name="ques<%=n%>" class="fetch" value="<%=rst.getString("ANSWER2")%>">
<INPUT maxLength="100" type="text" name="ques" class="fetch" size="100" value="<%=rst.getString("ANSWER2")%>"><br>
<INPUT maxLength="30" type="radio" name="ques<%=n%>" class="fetch" value="<%=rst.getString("ANSWER3")%>">
<INPUT maxLength="100" type="text" name="ques" class="fetch" size="100" value="<%=rst.getString("ANSWER3")%>"><br>
<INPUT maxLength="30" type="radio" name="ques<%=n%>" class="fetch" value="<%=rst.getString("ANSWER4")%>">
<INPUT maxLength="100" type="text" name="ques" class="fetch" size="100" value="<%=rst.getString("ANSWER4")%>"><br><br>

<%

}

}
catch(SQLException e)
{
throw new SQLException("Error in Retrieving all the Projects ",null,e.getErrorCode());
}
finally
{
hdbc.putConnectionToPool(con);
}

Collection optians = mis.fetchoptianswer();
int n1=0;
int x;
String answer1="";
if (optians != null)
{
Iterator iter1 = optians.iterator();
Vector vect = new Vector();
while(iter1.hasNext())
{
vect = (Vector)iter1.next();
answer1= vect.elementAt(0).toString();
out.println("answer::"+answer1+"<br>");

}
}
%>

</SPAN></SPAN></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD align=middle>
<INPUT type=button value=submit onClick="getValues()">
</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
</FORM>
</BODY>
</HTML>
check this and leave ur feedback...
 
Closed Thread

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JSP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JSP Forum

All times are GMT -4. The time now is 1:29 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC