Home Answers Viewqa JSP-Servlet jsp online ex

 
 


shanthala
jsp online ex
2 Answer(s)      7 months ago
Posted in : JSP-Servlet

plz help me providing source code for mini project online exam using jsp and mysql..... plzplz plzhelp me pur....

View Answers

November 8, 2012 at 4:18 PM


We are providing you a simple application.

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

http://www.roseindia.net/struts/struts/struts2.2.1/onlinetestapp/index.html

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


November 8, 2012 at 4:26 PM


i used this code sir...am not getting where to place questions plz help me









Related Pages:
jsp online ex
jsp online ex  wat is the parametr u passed ...ques
jsp online ex
jsp online ex  how to sum up the count of a cloumn in mysql and display ot on jsp when asked to calculate
jsp online ex
jsp online ex  plz help me providing source code for mini project online exam using jsp and mysql..... plzplz plzhelp me pur
jsp online ex
jsp online ex  deepak sir please help me...i jave created jsp page containing a question with 4 optipns and now i want tp save the options selected inside mysql and then retrievecot for checking it wit correctness...plzzzzzzzzz
Online Quiz Application in JSP
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 bookstore - JSP-Servlet
online bookstore  i want to display some books like online shoping.please send me code for that using jsp and servlets
jsp online exam...
jsp online exam...  Plz provide me front end design
online bookstore - JSP-Servlet
online bookstore  i want code for online bookshop.please send mo soon..........  Hi Friend, Please specify some details. Thanks
jsp online exam
jsp online exam  i have designed a html page with 20 multiple choice questions ...options are in radio button for each question .... now i have to retrieve all the selected answers and save it to database match it with correct
secure online payment code for jsp
secure online payment code for jsp   how to implements online payment in jsp
online shopping
online shopping   Hai sir/madam, i'm working on online shopping project.requirements is oracle10g,servlets/jsp... what is the difference b/w storing and saving image into database.how to store and how
online examination system project in jsp
online examination system project in jsp  How many tables are required in SQL for online examination system project in jsp in java
online examination system project in jsp
online examination system project in jsp  How many tables are required in SQL for online examination system project in jsp in java my email id
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 that result will also store in the database.The code must be in JSP-SERVLET using
online examination system project in jsp
online examination system project in jsp  How many and which data tables are required for online examination system project in jsp in java. please give me the detailed structure of each table
online examination system project in jsp
online examination system project in jsp  How to show the status bar which shows how much time is remaining in online examination system in jsp.my
online examination
online examination  coding for multiple choice question in jsp   We are providing you a simple application. Create table test...: http://www.roseindia.net/jsp/online-quiz-application-jsp.shtml
online bus reservation
online bus reservation   online bus reservation using jsp coding
online address book
online address book  how to create online address book using jsp and mysql
online examination system project in jsp
online examination system project in jsp  thanks for providing me 6 tables for online examination system. I want to know what will the id field of Answers1 table contain? Will it contain same id for all the questions of Set1 &
online examination system project in jsp
online examination system project in jsp  thanks for providing me 6 tables for online examination system. I want to know what will the id field of Answers1 table contain? Will it contain same id for all the questions of Set1 &
how to create online exam in jsp and database
how to create online exam in jsp and database  learing stage ,want to know how to create online exam
online examination system project in jsp
online examination system project in jsp  Thanks for providing me the 6 tables.But I want to know will the id field of answers1 table be same for all questions of Set1? Will it be 1 or will be 1,2,3,... What
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
online examination system project in jsp
in jsp for online examination system...; For more information, visit the following link: http://www.roseindia.net/jsp/online...online examination system project in jsp  I am doing project
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
Using Servlets, JSP for Online Shopping
Using Servlets, JSP for Online Shopping  What is wrong with my code ? JSP <form action="LoginServlet "method="post" > <table> <tr ><td>Username:</td><td><input type="text" name="Id
online flight booking
online flight booking  hello sir, i am new jsp learner. can you help in doing below these two in online flight booking. 1.Browse flights by destination. 2.Search flights by a drop-down menu
online shopping project
online shopping project  sir, plz can u send me the coding of simple application of online shopping cart project using jsp and servlets which should be run in netbeans without any errors
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 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
online shopping project
online shopping project  can you plz send the source code of online shopping application developed with the help of struts 1.2, hibernate and sql , jsp   Please visit the following link: Struts Shopping Cart
online test system
/online-quiz-application-jsp.shtml http://www.roseindia.net/answers/viewqa/JSP...online test system  Hi, I am creating a project for online test... result and that result will also store in the database.The code must be in JSP
ex. connect to Oracle - Java Beginners
ex. connect to Oracle  dear sir, I want to ask how to connect java...); e.printStackTrace(); } catch(SQLException ex){ System.err.println("SQLException information"); while(ex!=null) { System.err.println
ONLINE EXAM CODE SPLIT
ONLINE EXAM CODE SPLIT  hi.. im developing online exam for c programming in jsp.. i read the question from database as a string suppose String... me.. it is in jsp
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... this ... plz send coding in jsp by using oracle 10g database
online shopping project in j2ee - JSP-Servlet
online shopping project in j2ee  hello, I am doing a project on online shopping implementing it with only jsp-servlet.I wanted to know that do I need... might not notice) or just the servlet-jsp is enough?? Thanks in advance
online project tracking system
online project tracking system  hello sir , I chintan patel and my question is as under how to assign project for admin to project manager in jsp servlet project my project name is "online project tracking system " and i am
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 shopping project in j2ee - JSP-Servlet
online shopping project in j2ee  hello, I am making a project online shopping using jsp-servlet. I wanted to know that how do I implement following: 1) A non-registered user(or a registered user who has not signed-in) can browse
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 database connectivity issue from JSP page .
online database connectivity issue from JSP page .  Hi; Everything working fine in localhost , but facing a simple problem in connectivity... in online connectivity ---- Class.forName
online database connectivity issue from JSP page .
online database connectivity issue from JSP page .  Hi; Everything working fine in localhost , but facing a simple problem in connectivity... in online connectivity ---- Class.forName
online database connectivity issue from JSP page .
online database connectivity issue from JSP page .  Hi; Everything working fine in localhost , but facing a simple problem in connectivity... following code in online connectivity ---- Class.forName
CAN U HELP ME TO CODE IN JSP FOR ONLINE VOTING SYSTEM
CAN U HELP ME TO CODE IN JSP FOR ONLINE VOTING SYSTEM  can u help me to code in jsp for online voting system
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 of jsp file which i have sent,...,i used next and previous buttons and used two
online test application in java
the following link: http://www.roseindia.net/jsp/online-quiz-application-jsp.shtml...online test application in java  Can questions come in html file (test.html) if we link test.jsp with test.html   We have taken
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
wt are the futures in jdk 1.5 with clear ex
wt are the futures in jdk 1.5 with clear ex  plese send me the correce ex