Home Answers Viewqa JSP-Servlet Actually this code of "virtual classroom" is not working. I am running it in netbeans and the databases are in netbeans only

 
 


sheetal
Actually this code of "virtual classroom" is not working. I am running it in netbeans and the databases are in netbeans only
0 Answer(s)      11 months ago
Posted in : JSP-Servlet

hey...actually this code of "virtual classroom" is not working.Can u help?plz...i am running it in netbeans and the databases are in netbeans only...plz...

The structure of all tables included in the project is as under:-

1.  STUDENT
+--------+-------------+------+-----+---------+-------+

| Field  | Type | Null | Key | Default | Extra |

+--------+-------------+------+-----+---------+-------+

| user   | varchar(25) | YES  | UNI | NULL  |   |

| pass   | varchar(25) | YES  | | NULL  |   |

| name   | varchar(25) | YES  | | NULL  |   |

| ph_no  | varchar(25) | YES  | | NULL  |   |

| year   | varchar(2)  | YES  | | NULL  |   |

| branch | varchar(4)  | YES  | | NULL  |   |

+--------+-------------+------+-----+---------+-------+

2.  FACULTY
+---------+-------------+------+-----+---------+-------+
| Field   | Type    | Null | Key | Default | Extra |
+---------+-------------+------+-----+---------+-------+
| user  | varchar(25) | YES  |  | NULL  |   |
| pass  | varchar(25) | YES  |  | NULL  |   |
| name  | varchar(25) | YES  |  | NULL  |   |
| ph_no   | varchar(10) | YES  |    | NULL  |   |
| subject | varchar(25) | YES  |    | NULL  |   |
| branch  | varchar(4)  | YES  |    | NULL  |   |

5

Virtual Classroom


+---------+-------------+------+-----+---------+-------+

3.  STUDENTSIGNUP
+--------+-------------+------+-----+---------+-------+
| Field  | Type | Null | Key | Default | Extra |
+--------+-------------+------+-----+---------+-------+
| user   | varchar(25) | YES  | UNI | NULL  |   |
| pass   | varchar(25) | YES  | | NULL  |   |
| name   | varchar(25) | YES  | | NULL  |   |
| ph_no  | varchar(25) | YES  | | NULL  |   |
| year   | varchar(2)  | YES  | | NULL  |   |
| branch | varchar(4)  | YES  | | NULL  |   |
+--------+-------------+------+-----+---------+-------+
4.  FACULTYSIGNUP
+---------+-------------+------+-----+---------+-------+
| Field   | Type    | Null | Key | Default | Extra |
+---------+-------------+------+-----+---------+-------+
| user  | varchar(25) | YES  |  | NULL  |   |
| pass  | varchar(25) | YES  |  | NULL  |   |
| name  | varchar(25) | YES  |  | NULL  |   |
| ph_no   | varchar(10) | YES  |    | NULL  |   |
| subject | varchar(25) | YES  |    | NULL  |   |
| branch  | varchar(4)  | YES  |    | NULL  |   |
+---------+-------------+------+-----+---------+-------+
5.  ADMIN
+-------+------------+------+-----+---------+-------+
| Field | Type  | Null | Key | Default | Extra |
+-------+------------+------+-----+---------+-------+
| pass  | varchar(5) | YES  |   | NULL  |   |
+-------+------------+------+-----+---------+-------+
6.  PPT
+---------+-------------+------+-----+---------+-------+
| Field   | Type    | Null | Key | Default | Extra |

6
Virtual Classroom


+---------+-------------+------+-----+---------+-------+
| subject | varchar(10) | YES  |    | NULL  |   |
| ppt   | varchar(50) | YES  |  | NULL  |   |
+---------+-------------+------+-----+---------+-------+

7.  VIDEO
+---------+-------------+------+-----+---------+-------+
| Field   | Type    | Null | Key | Default | Extra |
+---------+-------------+------+-----+---------+-------+
| subject | varchar(10) | YES  |    | NULL  |   |
| video   | varchar(70) | YES  |    | NULL  |   |
+---------+-------------+------+-----+---------+-------+
8.  QUESTION
+---------+--------------+------+-----+---------+-------+
| Field   | Type    | Null | Key | Default | Extra |
+---------+--------------+------+-----+---------+-------+
| que   | varchar(200) | YES  | | NULL  |   |
| askedby | varchar(25)  | YES  |   | NULL  |   |
| subject | varchar(10)  | YES  |   | NULL  |   |
| qid   | int(11)   | YES  | UNI | NULL |   |
+---------+--------------+------+-----+---------+-------+
9.  ANSWER

+----------+--------------+------+-----+---------+-------+

| Field | Type  | Null | Key | Default | Extra |

+----------+--------------+------+-----+---------+-------+

| qid   | int(11)   | YES  | UNI | NULL |   |

| answer   | varchar(200) | YES  |  | NULL  |   |

| answerby | varchar(25)  | YES  |  | NULL  |   |

+----------+--------------+------+-----+---------+-------+


Virtual Classroom
![alt text][1]

CODE

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" import="java.sql.*"%>
<!DOCTYPE   html    PUBLIC  "-//W3C//DTD    HTML    4.01    Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>profile</title>
</head>
<SCRIPT type="text/javascript">
window.history.forward();
function noBack() { window.history.forward(); }
</SCRIPT>
<body background="G:\Classroom1.jpg" bgcolor="red" >


<form action="main.jsp" method="post" >

<table  width="960" border="0"  cellpadding="0" cellspacing="4" bgcolor="grey">
<tr>
<td>
<center><img src="D:\New folder\Web Page Header.gif" width="960"height="100"
></center>
</td>
</tr>
<tr>
<td align="left"    style="word-spacing:6px;font-size:120%;padding- right:30px;color:#888888;white-space:nowrap;">
<a href="studlogin.jsp" title="student">Student login </a>  |
<a href="faclogin.jsp" title="faculty"> Faculty login </a>  |


</td></tr>
</table>

8

Virtual Classroom


<table>
<tr><td>
<tr><td>Admin Login
<tr><td><input type="password" value="" name="pass" >
<tr><td><input type="submit" value="Login" onclick="fu(this.form)" >
</td></tr>
</table>
<%

String pass1=request.getParameter("pass");
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection  c=  DriverManager.getConnection("jdbc:odbc:akb",    "root", "root");
Statement s= c.createStatement(); String sql="select pass from admin"; ResultSet rs= s.executeQuery(sql); rs.next();
if( pass1.equalsIgnoreCase(rs.getString(1)) )
{
%>
<jsp:forward page="admin.jsp"></jsp:forward>
<%
}
rs.close(); s.close(); c.close();
}
catch(Exception e) {}
%>
</form>
</body>
</html>





<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" import="java.sql.*"%>
<!DOCTYPE   html    PUBLIC  "-//W3C//DTD    HTML    4.01    Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>MAIN</title>
</head>
<SCRIPT type="text/javascript">
window.history.forward();
function noBack() { window.history.forward(); }
</SCRIPT>


<body background="G:\Classroom1.jpg" bgcolor="red" >





Virtual Classroom


<SCRIPT type="text/javascript">
window.history.forward();
function noBack() { window.history.forward(); }
</SCRIPT>
<form action="studlogin.jsp"    method="post" >

<marquee        ONMOUSEOVER="this.stop();"  ONMOUSEOUT="this.start();" scrollamount="20"    bgcolor="white" >
<H3> Virtual Class room </H3>
</MARQUEE>





<TABLE border=0 cellspacing=2 cellpadding=2 width="100%">
<TR>
<TD width="34%">
<TABLE border=0 cellspacing=2 cellpadding=2 width="100%">
<TR>
<TD>
<marquee bgcolor="red"  style="position: relative;" behavior="scroll" "
direction="up"  scrollamount="8"    scrolldelay="2" onmouseover="this.stop()"
onmouseout="this.start()"width="350" height="200"><br>

<img src="D:\New folder\3d_virtual_classroom.jpg" width=250 height=250 title="ad " style="position: relative;" border="0"><br>
<img src="D:\New folder\education1.jpg" width=250 height=250    title="ad
" style="position: relative;" border="0"><br>
<img src="D:\New folder\virtual.jpg" width=250 height=250   title="ad   "
style="position: relative;" border="0"><br>
<img    src="D:\New folder\virtual_class_room.jpg"  width=250   height=250
title="ad   " style="position: relative;" border="0"><br>

</marquee>
</TD>
</TR>
</TABLE>
</TD>
<TD>
<table cellpadding=2 cellspacing=0 border=0>

<tr>    <td bgcolor="red"><table     cellpadding=0   cellspacing=0  border=1 width=100%>            <tr>    <td     bgcolor="green"     align=center style="padding:2;padding-bottom:4">        <b><font    size=-1 color="white" face="verdana,arial"> LOG IN</font></b></tr>
<tr><td bgcolor="white" style="padding:5"><br>
<TABLE  border=0    cellspacing=5   cellpadding=2   width="60%"
bgcolor="white">
<TR>
<TD>
<tr><td>    <font   face="verdana,arial"    size=-1>
Login_Type:</font></td> <td><select name="type"><option
value="Student">Student</option></select></td></tr>

10



Virtual Classroom


<tr><td>    <font face="verdana,arial" size=-1> Login:</font></td>
<td><input type="text" name="login" value=""></td></tr>
<tr><td>    <font   face="verdana,arial"    size=-1> Password:</font></td>      <td><input  type="password" name="password1"></td></tr>
<tr><td>    <font face="verdana,arial" size=-1>� </font></td>
<td><font   face="verdana,arial"    size=-1><input  type="submit"
value="Enter"></font></td></tr>
<tr><td colspan=2><font face="verdana,arial"    size=-
1>� </font></td>  </tr>
<tr><td colspan=2><font face="verdana,arial"    size=-1>Lost    your
username    or  password?   Find    it  <a
href="G:\study\seminar\ppt\ppt_for_05].ppt">here</a>!</font></td></tr>
<tr><td colspan=2><font face="verdana,arial"    size=-1>Not member
yet? Click      <button style="width:160;height:24; background-color:#97cfc3" onclick=  "   location.href='signup.jsp'" >here</button>  to register.</font></td></tr>


</TABLE>
</TD>
<TD>
</table>


</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>





<%

String str1=request.getParameter("login"); String str2=request.getParameter("password1"); if(str1!=null && str2!= null)
{
int flag=0;


try{


Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection  c=  DriverManager.getConnection("jdbc:odbc:akb",

"root", "root");
Statement s= c.createStatement();
out.println("user="+str1+" and pass= "+str2);
String sql="select user from student where user='"+str1+"' and pass='"+str2+"'";
ResultSet rs= s.executeQuery(sql);
if(rs.next())

11



Virtual Classroom




else

flag=1;

flag=0;



if(flag==1)
{





}
else

rs.close(); s.close(); c.close();



session.setAttribute("user",str1);
%>
<jsp:forward page="profile.jsp" />
<%


out.println("UserName/Password Not Valid");


}







%>
</form>
</body>
</html>

}catch(Exception e) {   out.println(e);}




<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" import="java.sql.*"%>
<!DOCTYPE   html    PUBLIC  "-//W3C//DTD    HTML    4.01    Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<SCRIPT type="text/javascript">
window.history.forward();
function noBack() { window.history.forward(); }
</SCRIPT>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>student</title>
</head>
<body background="G:\Classroom1.jpg" bgcolor="red" >

<form action="studentsignup.jsp"    method="post" >

<table  width="960" border="0"  cellpadding="0" cellspacing="4" bgcolor="black">
<tr>
<td>


12



Virtual Classroom


<center><img    src="D:\New folder\Web  Page    Header.gif" width="1150" height="100" ></center>
</td>
</tr>
<tr>
<td align="left"    style="word-spacing:6px;font-size:120%;padding-
right:30px;color:#888888;white-space:nowrap;">
<a href="student.jsp" title="student">Student </a>  |
<a href="studentsignup.jsp" title="studensignupt">Student req </a>  |
<a href="faculty.jsp" title="faculty"> Faculty </a> |
<a href="facultysignup.jsp" title="faculty signup requests">Faculty req </a>
|
<a href="pptup.jsp" title="faculty"> PPT(upload) </a>   |
<a href="pptdel.jsp" title="faculty"> PPT(del) </a> |
<a href="videoup.jsp" title="faculty"> Video(up) </a>   |
<a href="videodel.jsp" title="faculty"> Video(del) </a> |
<a href="que1.jsp" title="faculty"> Question </a>   |
<a href="ans1.jsp" title="faculty"> Ans </a>    |
<td>    <a href="main.jsp" title="faculty"> Logout </a>

</td></tr>
</table>
<br>
<br>
<b>User Name    :   </b><input type="text" value="" name="user"> ââ?¬Æ? ââ?¬Æ?
<input type="submit" value="DELETE" >
<br>
<br>
<table  width="960" border="0"  cellpadding="0" cellspacing="4" border=2
background="G:\Classroom1.jpg">
<tr>
<td>


<%
try{



Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection  c=  DriverManager.getConnection("jdbc:odbc:akb",

"root", "root");
Statement s= c.createStatement();
String sql="select * from studentsignup "; ResultSet rs= s.executeQuery(sql);
%>
<tr><td><b>USERNAME</b><td><b>PASSWORD</b><td><b>NAME</b><td><b>PHONE NO</b><td><b>YEAR</b><td><b>BRANCH</b>
<%
while( rs.next() )
{
%>


<%

%>
<td>

<tr><td>

out.println(rs.getString(1));



13




Virtual Classroom



<%

%>
<td>
<%


out.println(rs.getString(2));




%>
<td>
<%

out.println(rs.getString(3));




%>
<td>
<%

out.println(rs.getString(4));




%>
<td>
<%

out.println(rs.getString(5));


out.println(rs.getString(6));


}
rs.close();

String user=request.getParameter("user"); String sql1;
if(user!=null)
{
sql1="select * from studentsignup where user='"+user+"' "; ResultSet rs1= s.executeQuery(sql1);
rs1.next();
out.println("user : "+user);
sql1="insert    into    student
values('"+rs1.getString(1)+"','"+rs1.getString(2)+"','"+rs1.getString(3)+"','
"+rs1.getString(4)+"','"+rs1.getString(5)+"','"+rs1.getString(6)+"' )";
s.execute(sql1);

sql="delete from studentsignup where user='"+user+"'";
s.execute(sql);
rs1.close();
}







%>
</td>
</tr>
</table>

s.close();
c.close();
}catch(Exception e) {   out.println(e);}





14




Virtual Classroom



</form>

</body>
</html>



<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" import="java.sql.*"%>
<!DOCTYPE   html    PUBLIC  "-//W3C//DTD    HTML    4.01    Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>profile</title>
</head>
<SCRIPT type="text/javascript">
window.history.forward();
function noBack() { window.history.forward(); }
</SCRIPT>
<body background="G:\Classroom1.jpg" bgcolor="red" >

<form action="profile.jsp"  method="post" >

<table  width="960" border="0"  cellpadding="0" cellspacing="4" bgcolor="grey">
<tr>
<td>
<center><img src="D:\New folder\Web Page Header.gif" width="960"height="100"
></center>
</td>
</tr>
<tr>
<td align="left"    style="word-spacing:6px;font-size:120%;padding- right:30px;color:#888888;white-space:nowrap;">
<a href="profile.jsp" title="Home">Home </a>    |
<a href="update.jsp" title="update"> Edit Profile </a>  |
<a href="study.jsp" title="study">Study material</a>    |
<a href="video.jsp" title="video">Video Lectures</a>    |
<a href="question.jsp" title="ask">Ask doubts</a>   |
<a href="ans.jsp" title="tell">Answers</a>

</td>

<td align="right"   style="word-spacing:6px;font-size:120%;padding- right:10px;color:#888888;white-space:nowrap;">
|<a href="main.jsp" title="tell">Logout</a>
</td>
</tr>
</table>



15



Virtual Classroom







<%
String user =(String)session.getAttribute("user");




try{


Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection  c=  DriverManager.getConnection("jdbc:odbc:akb",

"root", "root");
Statement s= c.createStatement();
String sql="select * from student where user='"+user+"'";


ResultSet rs= s.executeQuery(sql);
rs.next();


%>



<br>
<br>
<br>
<table border=0 cellspacing=2 cellpadding=2 width="100%">
<tr>    <td bgcolor="red"><table    cellpadding=0   cellspacing=0   border=1 width=100%>        <tr>        <td     bgcolor="green"     align=center style="padding:2;padding-bottom:4">            <font    size=-1    color="white" face="verdana,arial"> <b>Profile</b></font></tr>
<TR>
<TD width="50%">
<TABLE  cellspacing=2 cellpadding=2 width="100%">
<TR>
<td>



> </center>



</td>
</TR>

<center> <img src="G:\Classroom1.jpg" width=100 height= 100



<tr><td>Logged  in  as  <input  type="text" name="user"

value="<% out.println(rs.getString(1)); %>"></td></tr>


</TABLE>
</TD>
<TD>
<TABLE border=0 cellspacing=2 cellpadding=2 width="100%">
<TR>
<TD>

16


Virtual Classroom


<tr><td>    <font face="verdana,arial" size=-1> Name: </font></td>  <td>
<input type="text" name="name" value="<% out.println(rs.getString(3)); %>">
</td>   </tr>


<tr><td>    <font   face="verdana,arial"    size=-1>    Branch:</font></td>
<td>    <input  type="text" name="branch"   value="<%
out.println(rs.getString(6)); %>">  </td>   </tr>

<tr><td>    <font   face="verdana,arial"    size=-1>    Year.:</font></td>
<td>    <input type="text" name="year" value="<% out.println(rs.getString(5));
%>">    </td>   </tr>

<tr><td>    <font   face="verdana,arial"    size=-1>        Contact No..:</font></td>    <td>       <input  type="text" name="phno" value="<% out.println(rs.getString(4)); %>">    </td>       </tr>



</TD>
<TD>

</TABLE>

</td>
</tr>
</table>

<%

</TABLE>


String branch=rs.getString(6); String year=rs.getString(5); session.setAttribute("branch",branch); session.setAttribute("year",year); out.println("branch = "+branch+" and year = "+year); rs.close();
s.close();
c.close();
}
catch(Exception e) { out.println(e);    }








%>


</form>
</body>
</html>


17



Virtual Classroom




<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" import="java.sql.*"%>
<!DOCTYPE   html    PUBLIC  "-//W3C//DTD    HTML    4.01    Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>update</title>
</head>

<SCRIPT type="text/javascript">
window.history.forward();
function noBack() { window.history.forward(); }
</SCRIPT>
<body background="G:\Classroom1.jpg" bgcolor="red" >
<form   action="update.jsp" method="post" >
<table  width="960" border="0"  cellpadding="0" cellspacing="4"
bgcolor="grey">
<tr>
<td>
<center><img src="D:\New folder\Web Page Header.gif" width="960"height="100"
></center>
</td>
</tr>
<tr>
<td align="left"    style="word-spacing:6px;font-size:120%;padding-
right:30px;color:#888888;white-space:nowrap;">
<a href="profile.jsp" title="Home">Home </a>    |
<a href="update.jsp" title="update"> Edit Profile </a>  |
<a href="study.jsp" title="study">Study material</a>    |
<a href="videos.jsp" title="video">Video Lectures</a>   |
<a href="question.jsp" title="ask">Ask doubts</a>   |
<a href="ans.jsp" title="tell">Answers</a>

</td>

<td align="right"   style="word-spacing:6px;font-size:120%;padding- right:10px;color:#888888;white-space:nowrap;">
|<a href="main.jsp" title="tell">Logout</a>
</td>
</tr>
</table>



<%
String name=request.getParameter("name");
String username=request.getParameter("username"); String pas=request.getParameter("pass");

String branch=request.getParameter("branch");

18



Virtual Classroom


String year=request.getParameter("year"); String phno=request.getParameter("ph_no"); out.println("branch = "+branch+" and year = "+year); String user =(String)session.getAttribute("user"); try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection  c=  DriverManager.getConnection("jdbc:odbc:akb",
"root", "root");
Statement s= c.createStatement();
String sql="select * from student where user='"+user+"'"; ResultSet rs= s.executeQuery(sql);
rs.next();


%>


<center><table cellpadding=2 cellspacing=0 border=0>


<tr>    <td bgcolor="red"><table    cellpadding=0   cellspacing=0   border=1 width=100%>        <tr>        <td     bgcolor="green"     align=center style="padding:2;padding-bottom:4">            <b><font     size=-1    color="white" face="verdana,arial"> Edit Profile</font></b></tr>
<tr><td bgcolor="white" style="padding:5"><br>
<TABLE border=0 cellspacing=2 cellpadding=2 width="100%">

<tr>    <td bgcolor="red"><table        cellpadding=0   cellspacing=0   border=1 width=100%>            <tr>            <td     bgcolor="green"         align=center style="padding:2;padding-bottom:4">                <b><font     size=-1        color="white" face="verdana,arial">     Profile picture</font></b><td   bgcolor="green" align=center        style="padding:2;padding-bottom:4">     <b><font            size=-1 color="white" face="verdana,arial">Personal info</font></b>

<TR>
<TD width="50%">
<TABLE  cellspacing=2 cellpadding=2 width="100%">
<TR>
<TD>
<center><img src="G:\Classroom1.jpg" width=150 height=150   ></center>
<center>
<div class="mybutton">
<a href="main.html">
<button style="width:160;height:24; background-
color:#97cfc3">change picture
</button></a><br>
</div>
</center>
</TD>
</TR>
</TABLE>
</TD>
<TD>

19



Virtual Classroom


<center><table>
<tr><td>    <font face="verdana,arial" size=-1> Name:</font></td>   <td>
<input type="text" name="name" value="<% out.println(rs.getString(3)); %>">
</td>   </tr>

<tr><td>    <font face="verdana,arial" size=-1> User_name:</font></td>
<td>    <input  type="text" name="username" value="<%
out.println(rs.getString(1)); %>">  </td>   </tr>

<tr><td>    <font face="verdana,arial" size=-1> Password:</font></td>
<td>    <input type="text" name="pass" value="<% out.println(rs.getString(2));
%>">    </td>   </tr>


<tr><td>    <font   face="verdana,arial"    size=-1>    Branch:</font></td>
<td><select name="branch">


value="it">IT</option> value="mech">MECH</option> value="comp">Comp</option> value="entc">Entc</option>

<option

<option

<option

<option

</select></td></tr>


<tr><td>    <font   face="verdana,arial"    size=-1>    Year:</font></td>
<td><select name="year">


value="fe">FE</option> value="se">SE</option> value="te">TE</option> value="be">BE</option>

<option

<option

<option

<option

</select></td></tr>


<tr><td>    <font   face="verdana,arial"    size=-1>        Contact No..:</font></td>    <td>       <input  type="text"         name="ph_no"    value="<% out.println(rs.getString(4)); %>">    </td>       </tr>

<tr><td><font   face="verdana,arial"    size=-1>� </font></td><td><font face="verdana,arial" size=-1><input type="submit" value="Update"  ></font>
</table></center>
</table>
</td>
<%

String  sql1="update    student set user='"+username+"',pass='"+pas+"',name='"+name+"',ph_no='"+phno+"',year='"+y ear+"',branch='"+branch+"' where user='"+user+"'";


20



Virtual Classroom


s.execute(sql1);
%>
<jsp:forward page="profile.jsp" />
<%



s.close();
c.close();
}
catch(Exception e) {    }


%>

</table>
</table>

</td>
</tr>
</table>
</center>

</form>


</body>
</html>



<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" import="java.sql.*"%>
<!DOCTYPE   html    PUBLIC  "-//W3C//DTD    HTML    4.01    Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>study material</title>
</head>
<body background="G:\Classroom1.jpg" bgcolor="red" >
<SCRIPT type="text/javascript">
window.history.forward();
function noBack() { window.history.forward(); }
</SCRIPT>
<form action="study.jsp" method="post" >
<%
String branch =(String)session.getAttribute("branch");
String year =(String)session.getAttribute("year");
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection  c1= DriverManager.getConnection("jdbc:odbc:akb", "root", "root");

21



Virtual Classroom


Statement s1= c1.createStatement();
out.println("branch= "+branch+" and year= "+year);
String sql="select subject from subject where branch='"+branch+"' and year='"+year+"' ";
String temp=null;
ResultSet rs= s1.executeQuery(sql);

rs.next();
temp=rs.getString(1);

%>

<table  width="960" border="0"  cellpadding="0" cellspacing="4" bgcolor="black">
<tr>
<td>
<center><img src="D:\New folder\Web Page Header.gif" width="960"height="100"
></center>
</td>
</tr>
<tr>
<td align="left"    style="word-spacing:6px;font-size:120%;padding-
right:30px;color:#888888;white-space:nowrap;">
<a href="sub1.jsp" title="<% out.println(temp); %>"><% out.println(temp); %>
</a>    |
<%  rs.next();
temp=rs.getString(1);
%>
<a href="sub2.jsp" title="<% out.println(temp); %>"><% out.println(temp); %>
</a>    |
<%  rs.next();
temp=rs.getString(1);
%>
<a href="sub3.jsp" title="<% out.println(temp); %>"><% out.println(temp); %>
</a>    |
<%  rs.next();
temp=rs.getString(1);
%>
<a href="sub4.jsp" title="<% out.println(temp); %>"><% out.println(temp); %>
</a>    |
<%  rs.next();
temp=rs.getString(1);
%>
<a href="sub5.jsp" title="<% out.println(temp); %>"><% out.println(temp); %>
</a>    |
<%rs.close(); %>
<a href="profile.jsp" title="home">home</a>

</td>

<td align="right"   style="word-spacing:6px;font-size:120%;padding- right:10px;color:#888888;white-space:nowrap;">
|<a href="main.jsp" title="tell">Logout</a>

22



Virtual Classroom


</td>
</tr>
</table>

<%


s1.close();
c1.close();
}
catch(Exception e) {out.println(e); }








%>

</form>
</body>
</html>

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" import="java.sql.*"%>
<!DOCTYPE   html    PUBLIC  "-//W3C//DTD    HTML    4.01    Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>sub1</title>
</head>
<body background="G:\Classroom1.jpg" bgcolor="red" >
<SCRIPT type="text/javascript">
window.history.forward();
function noBack() { window.history.forward(); }
</SCRIPT>
<form action="sub1.jsp" method="post" >
<%
String branch =(String)session.getAttribute("branch");
String year =(String)session.getAttribute("year");


try{


Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection  c1= DriverManager.getConnection("jdbc:odbc:akb",

"root", "root");
Statement s1= c1.createStatement();
out.println("branch= "+branch+" and year= "+year);
String  sql1="select    subject from    subject where branch='"+branch+"' and year='"+year+"' ";
ResultSet rs= s1.executeQuery(sql1);
rs.next();

23



Virtual Classroom


String subject=rs.getString(1); rs= s1.executeQuery(sql1); rs.next();

%>

<table  width="960" border="0"  cellpadding="0" cellspacing="4" bgcolor="black">
<tr>
<td>
<center><img src="D:\New folder\Web Page Header.gif" width="960"height="100"
></center>
</td>
</tr>
<tr>
<td align="left"    style="word-spacing:6px;font-size:120%;padding-
right:30px;color:#888888;white-space:nowrap;">
<a href="sub1.jsp" title="<% out.println(rs.getString(1)); %>">sub1 </a>    |
<%  rs.next(); %>
<a href="sub2.jsp" title="<% out.println(rs.getString(1)); %>"> sub2 </a>   |
<%  rs.next(); %>
<a href="sub3.jsp" title="<% out.println(rs.getString(1)); %>">sub3</a> |
<%  rs.next(); %>
<a href="sub4.jsp" title="<% out.println(rs.getString(1)); %>">sub4</a> |
<%  rs.next(); %>
<a href="sub5.jsp" title="<% out.println(rs.getString(1)); %>">sub5</a> |
<%rs.close(); %>
<a href="profile.jsp" title="home">home</a>

</td>

<td align="right"   style="word-spacing:6px;font-size:120%;padding- right:10px;color:#888888;white-space:nowrap;">
|<a href="main.jsp" title="tell">Logout</a>
</td>
</tr>
</table>

<%

String sql2="select ppt from ppt where subject='"+subject+"'"; ResultSet rs1= s1.executeQuery(sql2);
rs1.next();
String ppt=rs1.getString(1);

%><br><br>
<a  href="<%    out.println(ppt);%>"    title="<%   out.println(ppt);%>">ppt1   </a>
<br><br>
<%
if(!rs1.next())
{
ppt=rs1.getString(1);
rs1.close();

24
Virtual Classroom
%>
</form>
</body>
</html>

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" import="java.sql.*"%>
<!DOCTYPE   html    PUBLIC  "-//W3C//DTD    HTML    4.01    Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>video</title>
</head>
<SCRIPT type="text/javascript">
window.history.forward();
function noBack() { window.history.forward(); }
</SCRIPT>
<body background="G:\Classroom1.jpg" bgcolor="red" >
<form action="video.jsp" method="post" >
<%
String branch =(String)session.getAttribute("branch");
String year =(String)session.getAttribute("year");
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection  c1= DriverManager.getConnection("jdbc:odbc:akb", "root", "root");
Statement s1= c1.createStatement();
out.println("branch= "+branch+" and year= "+year);
String sql="select subject from subject where branch='"+branch+"'
and year='"+year+"' ";
ResultSet rs= s1.executeQuery(sql);

rs.next();
%>

<table  width="960" border="0"  cellpadding="0" cellspacing="4" bgcolor="black">
<tr>
<td>
<center><img src="D:\New folder\Web Page Header.gif" width="960"height="100"
></center>
</td>
</tr>
<tr>
<td align="left"    style="word-spacing:6px;font-size:120%;padding- right:30px;color:#888888;white-space:nowrap;">

26
Virtual Classroom
<a href="sub11.jsp" title="<% out.println(rs.getString(1)); %>">sub1 </a>   |
<%  rs.next(); %>
<a href="sub22.jsp" title="<% out.println(rs.getString(1)); %>"> sub2 </a>  |
<%  rs.next(); %>
<a href="sub23.jsp" title="<% out.println(rs.getString(1)); %>">sub3</a>    |
<%  rs.next(); %>
<a href="sub44.jsp" title="<% out.println(rs.getString(1)); %>">sub4</a>    |
<%  rs.next(); %>
<a href="sub55.jsp" title="<% out.println(rs.getString(1)); %>">sub5</a>    |
<% rs.close(); %>
<a href="profile.jsp" title="home">home</a>

</td>

<td align="right"   style="word-spacing:6px;font-size:120%;padding- right:10px;color:#888888;white-space:nowrap;">
|<a href="main.jsp" title="tell">Logout</a>
</td>
</tr>
</table>

<%


s1.close();
c1.close();
}
catch(Exception e) {out.println(e); }








%>

</form>
</body>
</html>



<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" import="java.sql.*"%>
<!DOCTYPE   html    PUBLIC  "-//W3C//DTD    HTML    4.01    Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>MAIN</title>
</head>


27



Virtual Classroom



<body background="G:\Classroom1.jpg" bgcolor="red" >
<form action="faclogin.jsp" method="post" >

<marquee        ONMOUSEOVER="this.stop();"  ONMOUSEOUT="this.start();" scrollamount="20"    bgcolor="white" >
<H3> Virtual Class room </H3>
</MARQUEE>





<TABLE border=0 cellspacing=2 cellpadding=2 width="100%">
<TR>
<TD width="34%">
<TABLE border=0 cellspacing=2 cellpadding=2 width="100%">
<TR>
<TD>
<marquee bgcolor="red"  style="position: relative;" behavior="scroll" "
direction="up"  scrollamount="8"    scrolldelay="2" onmouseover="this.stop()" onmouseout="this.start()"width="350" height="200"><br>

<img src="D:\New folder\3d_virtual_classroom.jpg" width=250 height=250 title="ad " style="position: relative;" border="0"><br>
<img src="D:\New folder\education1.jpg" width=250 height=250    title="ad
" style="position: relative;" border="0"><br>
<img src="D:\New folder\virtual.jpg" width=250 height=250   title="ad   "
style="position: relative;" border="0"><br>
<img    src="D:\New folder\virtual_class_room.jpg"  width=250   height=250
title="ad   " style="position: relative;" border="0"><br>

</marquee>
</TD>
</TR>
</TABLE>
</TD>
<TD>
<table cellpadding=2 cellspacing=0 border=0>

<tr>    <td bgcolor="red"><table     cellpadding=0   cellspacing=0  border=1 width=100%>            <tr>    <td     bgcolor="green"     align=center style="padding:2;padding-bottom:4">        <b><font    size=-1 color="white" face="verdana,arial"> LOG IN</font></b></tr>
<tr><td bgcolor="white" style="padding:5"><br>
<TABLE  border=0    cellspacing=5   cellpadding=2   width="60%" bgcolor="white">
<TR>
<TD>
<tr><td>    <font   face="verdana,arial"    size=-1>
Login_Type:</font></td> <td><select name="type"><option value="Faculty">Faculty</option></select></td></tr>
<tr><td>    <font face="verdana,arial" size=-1> Login:</font></td>
<td><input type="text" name="login" value=""></td></tr>

28



Virtual Classroom


<tr><td>    <font   face="verdana,arial"    size=-1> Password:</font></td>      <td><input  type="password" name="password1"></td></tr>
<tr><td>    <font face="verdana,arial" size=-1>� </font></td>
<td><font   face="verdana,arial"    size=-1><input  type="submit" value="Enter"></font></td></tr>
<tr><td colspan=2><font face="verdana,arial"    size=-
1>� </font></td>  </tr>
<tr><td colspan=2><font face="verdana,arial"    size=-1>Lost    your
username    or  password?   Find    it  <a href="G:\study\seminar\ppt\ppt_for_05].ppt">here</a>!</font></td></tr>
<tr><td colspan=2><font face="verdana,arial"    size=-1>Not member
yet? Click          <button style="width:160;height:24; background-color:#97cfc3" onclick=  "   location.href='facsignup.jsp'"  >here</button>  to register.</font></td></tr>


</TABLE>
</TD>
<TD>
</table>


</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>





<%

String str1=request.getParameter("login"); String str2=request.getParameter("password1"); if(str1!=null && str2!= null)
{
int flag=0;


try{


Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection  c=  DriverManager.getConnection("jdbc:odbc:akb",

"root", "root");
Statement s= c.createStatement();
out.println("user="+str1+" and pass= "+str2);
String sql="select user from faculty where user='"+str1+"' and pass='"+str2+"'";
ResultSet rs= s.executeQuery(sql);
if(rs.next())
flag=1;
else

29



Virtual Classroom


flag=0;


if(flag==1)
{





}
else

rs.close(); s.close(); c.close();



session.setAttribute("fuser",str1);
%>
<jsp:forward page="fac_profile.jsp" />
<%


out.println("UserName/Password Not Valid");


}







%>
</form>
</body>
</html>

}catch(Exception e) {   out.println(e);}




<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" import="java.sql.*" buffer="100kb"%>
<!DOCTYPE   html    PUBLIC  "-//W3C//DTD    HTML    4.01    Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>faculty signup</title>
</head>
<body background="G:\Classroom1.jpg" bgcolor="red" >


<script language="javascript">
function fu(form)
{
alert('A request is sent to the admin to approve your signup ');
}
function fun1(form)
{

var l=form.pass.value.length;

for(var i=0; i < l ; i++)
{

30



Virtual Classroom


if(form.pass1.value.substr(i,1) != form.pass.value.substr(i,1) )
{
form.pass.value=""; form.pass1.value=""; alert('passwords Not Equal'); break;
}

}
}

function fun2(form)
{

var l=form.phno.value.length;
for(var i=0; i < l ; i++)
{
if( (form.phno.value.substr(i,1)>=  'a' && form.phno.value.substr(i,1)>= 'z'        ) ||(form.phno.value.substr(i,1)>= 'A' && form.phno.value.substr(i,1)>= 'Z' ) )
{
form.pass.value=""; form.pass1.value=""; alert('invalid phone no.'); break;
}

}
}


</script>
<form action="facsignup.jsp" method="post" >

<marquee    ONMOUSEOVER="this.stop();"  ONMOUSEOUT="this.start();" bgcolor="white" scrollamount=15 >
<h2>    <font face="verdana,arial" size=-1 > <a href="main.jsp">Click here</a>
to return to home page .</font>
</h2>
</MARQUEE>


<table cellpadding=2 cellspacing=0 border=0>


<tr>    <td bgcolor="red"><table    cellpadding=0   cellspacing=0   border=1 width=100%>        <tr>        <td     bgcolor="green"     align=center style="padding:2;padding-bottom:4">            <font    size=-1    color="white" face="verdana,arial"> <b>Sign Up</b></font></tr>
<tr><td bgcolor="white" style="padding:5"><br>
<center><table>
<tr><td>    <font face="verdana,arial" size=-1> Name:</font></td>   <td>
<input type="text" name="name" value="">    </td>   </tr>

31



Virtual Classroom



<tr><td>    <font face="verdana,arial" size=-1> User_name:</font></td>
<td>    <input type="text" name="username" value="" > </td> </tr>

<tr><td>    <font face="verdana,arial" size=-1> Password:</font></td>
<td>    <input type="password" name="pass" value="">    </td>   </tr>

<tr><td>    <font   face="verdana,arial"    size=-1>    Conform
Password:</font></td>   <td>    <input type="password" name="pass1" value="">
</td>   </tr>
<tr><td>    <font face="verdana,arial" size=-1> Phone NO.:</font></td>
<td>    <input  type="text" name="phno" value=""    onblur="fun1(this.form)">
</td>   </tr>

<tr><td>    <font   face="verdana,arial"    size=-1>    Subject:</font></td>
<td>    <input type="text" name="subject" value="" onblur="fun2(this.form)">
</td>   </tr>

<tr><td>    <font   face="verdana,arial"    size=-1>    Branch:</font></td>
<td><select name="branch" >


value="it">IT</option> value="mech">Mech</option> value="entc">ENTC</option> value="comp">Comp</option>

<option

<option

<option

<option

</select></td></tr>





<tr><td><font   face="verdana,arial"    size=-1>� </font></td><td><font face="verdana,arial"      size=-1><input   type="submit"  value="Register" onclick="fu(this.form)" ></font></td></tr>

</table></center>



</td></tr></table></td></tr></table>


<%

String name=request.getParameter("name");
String username=request.getParameter("username"); String pas=request.getParameter("pass");
String pas1=request.getParameter("pass1"); String branch=request.getParameter("branch"); String subject=request.getParameter("subject"); String phno=request.getParameter("phno");

32
Virtual Classroom

try{ "root", "root");


Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection  c=  DriverManager.getConnection("jdbc:odbc:akb",

Statement s= c.createStatement();
String  sql="insert into    facultysignup

values('"+username+"','"+pas+"','"+name+"','"+phno+"','"+subject+"','"+branch
+"' )";
out.println("name= : "+name);
if(name!=""&&name!=null)
{
s.execute(sql);
}
s.close();
c.close();
}
catch(Exception e) {}

%>


</form>

</body>
</html>

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" import="java.sql.*"%>
<!DOCTYPE   html    PUBLIC  "-//W3C//DTD    HTML    4.01    Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>update</title>
</head>

<SCRIPT type="text/javascript">
window.history.forward();
function noBack() { window.history.forward(); }
</SCRIPT>
<body background="G:\Classroom1.jpg" bgcolor="red" >
<form   action="facupdate.jsp" method="post" >
<table  width="960" border="0"  cellpadding="0" cellspacing="4"
bgcolor="grey">
<tr>
<td>


33
Virtual Classroom
<center><img src="D:\New folder\Web Page Header.gif" width="960"height="100"
></center>
</td>
</tr>
<tr>
<td align="left"    style="word-spacing:6px;font-size:120%;padding-
right:30px;color:#888888;white-space:nowrap;">
<a href="fac_profile.jsp" title="Home">Home </a>    |
<a href="facupdate.jsp" title="update"> Edit Profile </a>   |
<a href="fstudy.jsp" title="study">Study material</a>   |
<a href="fvideos.jsp" title="video">Video Lectures</a>  |
<a href="fquestion.jsp" title="ask">Ask doubts</a>  |
</td>

<td align="right"   style="word-spacing:6px;font-size:120%;padding- right:10px;color:#888888;white-space:nowrap;">
|<a href="main.jsp" title="tell">Logout</a>
</td>
</tr>
</table>



<%
String user =(String)session.getAttribute("fuser");


try{


Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection  c=  DriverManager.getConnection("jdbc:odbc:akb",

"root", "root");
Statement s= c.createStatement();
String sql="select * from faculty where user='"+user+"'";
out.println("select * from faculty where user='"+user+"'"); ResultSet rs= s.executeQuery(sql);
rs.next();
out.println("user= "+user);

%>

<center><table cellpadding=2 cellspacing=0 border=0>


<tr>    <td bgcolor="red"><table    cellpadding=0   cellspacing=0   border=1 width=100%>        <tr>        <td     bgcolor="green"     align=center style="padding:2;padding-bottom:4">            <b><font     size=-1    color="white" face="verdana,arial"> Edit Profile</font></b></tr>
<tr><td bgcolor="white" style="padding:5"><br>
<TABLE border=0 cellspacing=2 cellpadding=2 width="100%">
34
Virtual Classroom

<tr>    <td bgcolor="red"><table        cellpadding=0   cellspacing=0   border=1 width=100%>            <tr>            <td     bgcolor="green"         align=center style="padding:2;padding-bottom:4">                <b><font     size=-1        color="white" face="verdana,arial">     Profile picture</font></b><td   bgcolor="green" align=center        style="padding:2;padding-bottom:4">     <b><font            size=-1 color="white" face="verdana,arial">Personal info</font></b>

<TR>
<TD width="50%">
<TABLE  cellspacing=2 cellpadding=2 width="100%">
<TR>
<TD>
<center><img src="G:\Classroom1.jpg" width=150 height=150   ></center>
<center>
<div class="mybutton">
<a href="main.html">
<button style="width:160;height:24; background-
color:#97cfc3">change picture
</button></a><br>
</div>
</center>
</TD>
</TR>
</TABLE>
</TD>
<TD>
<center><table>
<tr><td>    <font face="verdana,arial" size=-1> Name:</font></td>   <td>
<input type="text" name="name" value="<% out.println(rs.getString(3)); %>">
</td>   </tr>

<tr><td>    <font face="verdana,arial" size=-1> User_name:</font></td>
<td>    <input  type="text" name="username" value="<%
out.println(rs.getString(1)); %>">  </td>   </tr>

<tr><td>    <font face="verdana,arial" size=-1> Password:</font></td>
<td>    <input  type="password" name="pass" value="<%
out.println(rs.getString(2)); %>">  </td>   </tr>

<tr><td>    <font   face="verdana,arial"    size=-1>    Conform
Password:</font></td>   <td>    <input type="password" name="pass1" >   </td>
</tr>

<tr><td>    <font   face="verdana,arial"    size=-1>    Branch:</font></td>
<td><select name="branch">


value="it">IT</option> value="mech">MECH</option> value="comp">Comp</option> value="entc">Entc</option>
35

<option

<option

<option

<option

Virtual Classroom


</select></td></tr>
<tr><td>    <font face="verdana,arial" size=-1> Subject:</font></td>
<td>    <input  type="text" name="subject"  value="<%
out.println(rs.getString(5)); %>" > </td>   </tr>


<tr><td>    <font   face="verdana,arial"    size=-1>        Contact No..:</font></td>    <td>       <input  type="text"         name="ph_no"    value="<% out.println(rs.getString(4)); %>">    </td>       </tr>

<tr><td><font   face="verdana,arial"    size=-1>� </font></td><td><font face="verdana,arial" size=-1><input type="submit" value="Update"  ></font>
</table></center>
</table>
</td>
<%
String name=request.getParameter("name");
String username=request.getParameter("username"); String pas=request.getParameter("pass");
String pas1=request.getParameter("pass1"); String branch=request.getParameter("branch"); String subject=request.getParameter("subject"); String phno=request.getParameter("ph_no");


if(name!=null && username!=null)
{
String  sql1="update    faculty set user='"+username+"',pass='"+pas+"',name='"+name+"',ph_no='"+phno+"',subject=' "+subject+"',branch='"+branch+"' where user='"+user+"'";

s.execute(sql1);
%>
<jsp:forward page="fac_profile.jsp" />
<%

}
else
 out.println("enter the fields");


s.close();
c.close();
}
catch(Exception e) {out.println(e); }


%>

</table>
</table>

</td>
</tr>

36
Virtual Classroom
</table>
</center>
</form>
</body>
</html>

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %>
<!DOCTYPE   html    PUBLIC  "-//W3C//DTD    HTML    4.01    Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Admin</title>
</head>
<SCRIPT type="text/javascript">
window.history.forward();
function noBack() { window.history.forward(); }
</SCRIPT>
<body background="G:\Classroom1.jpg" bgcolor="red" >

<form action="fac_profile.jsp"  method="post" >

<table  width="1150"    border="0"  cellpadding="0" cellspacing="4" bgcolor="black">
<tr>
<td>
<center><img    src="D:\New folder\Web  Page    Header.gif" width="1150"
height="100" ></center>
</td>
</tr>
<tr>
<td align="left"    style="word-spacing:6px;font-size:120%;padding-
right:30px;color:#888888;white-space:nowrap;">
<a href="student.jsp" title="student">Student </a>  |
<a href="studentsignup.jsp" title="studensignupt">Student req </a>  |
<a href="faculty.jsp" title="faculty"> Faculty </a> |
<a href="facultysignup.jsp" title="faculty signup requests">Faculty req </a>
|
<a href="pptup.jsp" title="faculty"> PPT(upload) </a>   |
<a href="pptdel.jsp" title="faculty"> PPT(del) </a> |
<a href="videoup.jsp" title="faculty"> Video(up) </a>   |
<a href="videodel.jsp" title="faculty"> Video(del) </a> |
<a href="que1.jsp" title="faculty"> Question </a>   |
<a href="ans1.jsp" title="faculty"> Ans </a>    |
<td>    <a href="main.jsp" title="faculty"> Logout </a>


</td></tr>
</table>

37
Virtual Classroom
</form>
</body>

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" import="java.sql.*"%>
<!DOCTYPE   html    PUBLIC  "-//W3C//DTD    HTML    4.01    Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Video delete</title>
</head>
<SCRIPT type="text/javascript">
window.history.forward();
function noBack() { window.history.forward(); }
</SCRIPT>
<body background="G:\Classroom1.jpg" bgcolor="red" >

<form action="videodel.jsp" method="post" >

<table  width="960" border="0"  cellpadding="0" cellspacing="4" bgcolor="black">
<tr>
<td>
<center><img    src="D:\New folder\Web  Page    Header.gif" width="1150" height="100" ></center>
</td>
</tr>
<tr>
<td align="left"    style="word-spacing:6px;font-size:120%;padding- right:30px;color:#888888;white-space:nowrap;">
<a href="student.jsp" title="student">Student </a>  |
<a href="studentsignup.jsp" title="studensignupt">Student req </a>  |
<a href="faculty.jsp" title="faculty"> Faculty </a> |
<a href="facultysignup.jsp" title="faculty signup requests">Faculty req </a>
|
<a href="pptup.jsp" title="faculty"> PPT(upload) </a>   |
<a href="pptdel.jsp" title="faculty"> PPT(del) </a> |
<a href="videoup.jsp" title="faculty"> Video(up) </a>   |
<a href="videodel.jsp" title="faculty"> Video(del) </a> |
<a href="que1.jsp" title="faculty"> Question </a>   |
<a href="ans1.jsp" title="faculty"> Ans </a>    |
<td>    <a href="main.jsp" title="faculty"> Logout </a>

</td></tr>
</table>
<br>
<br>
<b>Video Name   :   </b><input type="text" value="" name="ppt"> ââ?¬Æ? ââ?¬Æ?
<input type="submit" value="DELETE" >
<br>
<br>
38
Virtual Classroom
<center><table  width="960" border="0"  cellpadding="0" cellspacing="4" border=2 background="G:\Classroom1.jpg">
<tr>
<td>

<%
try{

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection  c=  DriverManager.getConnection("jdbc:odbc:akb",

"root", "root");
Statement s= c.createStatement();
String sql="select * from video ";
ResultSet rs= s.executeQuery(sql);
%>
<tr><td><b>SUBJECT</b><td><b>Video</b>
<%
while( rs.next() )
{
%>


<%

%>
<td>
<%

<tr><td>

out.println(rs.getString(1));



out.println(rs.getString(2));


}
rs.close();

String ppt=request.getParameter("ppt");
if(ppt!=null)
{   sql="delete from video where video='"+ppt+"'";
s.execute(sql);
}

%>
</td>
</tr>

s.close();
c.close();
}catch(Exception e) {   out.println(e);}

</table> </center>

</form>

</body>
</html>


  [1]: http://er
View Answers









Related Pages:
NetBeans
NetBeans  Hi, I am Kundan I have made a project on NetBeans. And now I want to know that how can i run my project without NetBeans IDE,on other PC. Please help me it's important
NetBeans
NetBeans  Hi, I am Kundan I have made a project on NetBeans. And now I want to know that how can i run my project without NetBeans IDE,on other PC. Please help me it's important
problem in inserting data in databases created in netbeans using jsp..
problem in inserting data in databases created in netbeans using jsp..  i am trying to make a virtual classroom website in jsp using netbeans.i created table inside netbeans through sql editor.and tried to make a login page whose
NetBeans IDE
main program and (empty) window. Try running it. The code that NetBeans.... This shows the code that has been generated by NetBeans to build this GUI... - Structure of the generated source code NetBeans automatically generates a lot of code
EJB with NetBeans
EJB with NetBeans  I am very new in Ejb and with very few knowledge about it. I have download NetBeans (7.01) and GlassFish (3.01). But, as I have no idea about Ejb, I am not getting how to run the code which includes a simple
Netbeans Question.
Netbeans Question.   Ok here is my code- * * To change this template...]); } } } This is what I am trying to get my program to due- using a two-dimensional array... the results in a tabular format and determine if your results are reasonable.I am
JSTL in Netbeans 6.9.1
is working fine. I am using Netbeans 6.9.1 Id with Glassfish server 3 for my...JSTL in Netbeans 6.9.1  I am seeking your help in solving problem I am facing. The problem has been described below: I am using JSTL1.1 core tag
netbeans
netbeans  guysss m nt able to opemn ma netbeans ide.. no error msg s coming... wn i installed yesterday one msg came stating about some run time error... sm one plzzzzzz hlp me
JOptionPane.showMessageDialog is not working on tomcat however it is working on netbeans on same machine
JOptionPane.showMessageDialog is not working on tomcat however it is working on netbeans on same machine  the following code is not running on apacheTomcat 7.0.30 version but the same code is working on netebans 7.0, how to make
Netbeans program
Netbeans program  I need to write a program that does the following.... TicTacToeGame is another program that uses a TicTacToe object to actually play a two human player game of Tic-Tac-Toe. Using the NetBeans design tool also create
webservice in Netbeans
problem at 17 th step while right clicking on the source code im not getting the last two options-"Ejb methods", and "Enterprise Resources".. how can i find them.. im using netbeans version 6.9.1 .. pls help me out... regards-- Harish Kumar
Netbeans Array help
Netbeans Array help  Ok here is my code- * * To change this template...]); } } } This is what I am trying to get my program to due- using a two-dimensional.... I are trying to get the application to to tally the actual combination's
java -netbeans help - Java Beginners
that.. am doing a project,to make it simple i gave the program of addition. sir/mam, i developed frontend with netbeans with buttons and textarea.. am executing...java -netbeans help   a simple program in netbeans ide to add two
Not able to filter rows of jtable with textfield in netbeans
not working means it is not filtering data and even i am not getting any exception...]; String date = null; for (int i = 0; i &lt; alstStock.size(); i++) { StockBean objBean = (StockBean) alstStock.get(i); data[i][0] = i + 1
Not able to filter rows of jtable with textfield in netbeans
not working means it is not filtering data and even i am not getting any exception...]; String date = null; for (int i = 0; i &lt; alstStock.size(); i++) { StockBean objBean = (StockBean) alstStock.get(i); data[i][0] = i + 1
calling servlet from jsp in netbeans ide
calling servlet from jsp in netbeans ide  I have tried to call servlet from jsp code in netbeans for checking the database values . but while running it showing the error that the resource not available. i dono wat mistake i did
how to install jfreechart in netbeans.
how to install jfreechart in netbeans.  I have successfully installed jfreechart in eclipse IDE.but I am unable to install the same in netbeansIDE... procedure to install it in netbeans 6.7.1 Please reply asap.Its urgent
Deploy netbeans project on external tomcat server - Framework
properly with use of netbeans bundled tomcat... But when i am trying to run...Deploy netbeans project on external tomcat server  Hello i have created an application using netbeans 5.5............i want to know that how i
jdbc and swing problem in netbeans
jdbc and swing problem in netbeans  i reteived the table from database in a jdbc program. next i want to do is place the table as it is in a jpanel.. i am using netbeans IDE can u tel me how to do that one?? urgent
jdbc and swing problem in netbeans
jdbc and swing problem in netbeans  i reteived the table from database in a jdbc program. next i want to do is place the table as it is in a jpanel.. i am using netbeans IDE can u tel me how to do that one?? urgent
buttons in netbeans,java
buttons in netbeans,java  respected sir, i would like to known how to make coding on a button while working on netbeans, so that a new window will open after clicking on that button? thank you   import java.awt.
NetBeans
NetBeans  why Netbeans IDE is not commonly used Today by most of the companies
netbeans
netbeans  In netbeans, there are choices of books with their price. you check the book you wanted then click the purchase.the output should be the book with the price then you will get the total price of the book you purchase.how
RMI and netbeans
RMI and netbeans  how to use Rmi in netbeans? i want to connect to a server machine which is holding my application and need to identify the systems connected in LAN with it and get the IP address from it i wnt to use netbeans
Looking for sample project in java using netbeans
Looking for sample project in java using netbeans  Hi all, i am novice in developing desktop application in java using netbeans. can anyone pls help me by sending project built in netbeans as soon as possible. so that i could
netbeans - IDE Questions
netbeans  I am uploading pdf file to tomcat server and i am using net beans. I am saving my file in /web/PDF/ directory. and my prob is when i am viewing my file I can not get it back by using http://localhost:8084/PDF
oracle connectivity problem with netbeans
oracle connectivity problem with netbeans  sir I am using oracle... since I execute statement directly from net bean but now I am preparing a program of simple connectivity with oracle in this I am giving driver details
How to insert data into databse by JSP form registration page in netbeans
How to insert data into databse by JSP form registration page in netbeans   Hello everyone, i am new comer to web development & netbeans, i m... of data for login purpose. I have created 1 form in JSP netbeans with both username
netbeans resource prob - IDE Questions
i the jar package I am using netbeans version 6.7.1...netbeans resource prob  Hi,please can you tell me how to include a file like an image in the jar package in netbeans so that i dont need to provide
databases
databases  i want to know the method of the servlet class in which i should write the code for initializing the database connection together with an example of a code for initializing the database connection
databases
databases  i want to know the method of the servlet class in which i should write the code for initializing the database connection together with an example of a code for initializing the database connection
databases
databases  i want to know the method of the servlet class in which i should write the code for initializing the database connection together with an example of a code for initializing the database connection
databases
databases  i want to know the method of the servlet class in which i should write the code for initializing the database connection together with an example of a code for initializing the database connection
databases
databases  i want to know the method of the servlet class in which i should write the code for initializing the database connection together with an example of a code for initializing the database connection
netbeans library
netbeans library  Hi could someone build a program in netbeans for a book library please.The program should provide a menu of options to work.../answers/viewqa/Java-Beginners/7688-write-java-code-discount-bookstore.html
netbeans library
netbeans library  Hi could someone build a program in netbeans for a book library please.The program should provide a menu of options to work.../answers/viewqa/Java-Beginners/7688-write-java-code-discount-bookstore.html
Java using Netbeans Object Oriented Programming
Java using Netbeans Object Oriented Programming   I am trying to make... the ,average and mean values of the array and returns that as another array. My code... value.\n"); for(int i = 0; i< numOfGrades; i++) { grades[i
Axis 2 & Tomcat & NetBeans - WebSevices
Axis 2 on NetBeans. I am using NetBeans 6.5, with Axis 2 1.4.1 and Tomcat 6.0.... that i can use it in my application too. I was told that Axis 2 and NetBeans...Axis 2 & Tomcat & NetBeans  Hi all, I have 3 classes House.java
netbeans program
netbeans program  Hi. could someone build this for me in netbeans please :) You are required to create a basic library management system for use... that an item can only be in the library once. Your library should be able to contain any
Web Services Examples in NetBeans
program I will show you how you can make webservices in the Netbeans IDE. NetBeans... Web Services Examples in NetBeans    In this section we will develop webservices using NetBeans IDE. NetBeans IDE is one
struts 2 problem with netbeans - Struts
struts 2 problem with netbeans  i made 1 application in struts2 with netbeans but got one errror like There is no Action mapped for namespace... for namespace / and action name login.) is not available. here give two code what
Netbeans Question need help desperately!!
Netbeans Question need help desperately!!   Ok here is my code..., number, frequency[die1][die2] + 1); okay that's the code....I'm trying to get... dice. How do I get the frequency of the numbers to print
connecting databases
connecting databases  I need to connect mysql on 2 or more remote pc'c. how can i giv the ip address for 2 or more systems. is it possible to connect... application is created in netbeans
how can i use ajax and jquery in netbeans ide
how can i use ajax and jquery in netbeans ide  i am using .net here we hav to download ajax controls and if i use netbeans ide and uses ajax control so from where i can get these controls.also i want to know which struct book i
Java swing in NetBeans - Swing AWT
. i will specify a swing code for JTable using NETBEANS so would you tell me... can u plz specify code for this above table. Q 3. i want to have another table like this is it possible: if it is can u give me code in NetBeans
coding problem in netbeans - Java Beginners
coding problem in netbeans  hi, i have just started programming in netbeans,i'm facing a problem in a java application i create a jframe class and jbutton and jtextfeild inside it now i have created another class c1
error while running a jsp page in netbeans
error while running a jsp page in netbeans  this is error that come under column "java db processes" in netbeans Exception in thread "main" java.lang.ExceptionInInitializerError
Code not working
Code not working  i want to write my first applet. I wrote the java program and html code for that. while im running in appletviewer it is asking.... since im using mac os,i ran it in terminal. it is running in fine
Datagrid not working
Datagrid not working  The code here is working fine, apart from the fact that that I'm using netbeans 6.5 and the servlet v2.5 and struts 1.1.... expression. I looked up on the internet for answers. according to one i used
conflicting databases
conflicting databases  i recently installed xampp including apache and mysql. i need to study php in dreamweaver. bt i already installed mysql for jsp project in netbeans. now mysql in xampp showing this result. 1:10:05 PM

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.