File Name Index.
html
<html>
<head> <title> L I B R A R Y - M A N A G E M E N T .... </title></head>
<body bgcolor="teak">
<h1>LIBRARY MANAGEMENT PROJECT....</h1>
<p><a href="[Link]"><b><font face="Ariel" size=5 Color=red>Student Admission System....</font></b></a></p>
<p><a href="[Link]"><b><font face="Ariel" size=5 Color=blue>Book Purchase System....</font></b></p></a>
<p><a href="[Link]"><b><font face="Ariel" size=5 Color=yellow>Student Detail Display....</font></b></p></a>
<p><a href="[Link]"><b><font face="Ariel" size=5 Color="white">Book Detail Display....</font></b></p></a>
<p><a href="[Link]"><b><font face="Ariel" size=5 Color="lightgreen">Student search System....</font></b></p></a>
<p><a href="[Link]"><b><font face="Ariel" size=5 Color="steel">Book search System....</font></b></p></a>
<p><a href="[Link]"><b><font face="Ariel" size=5 Color="magenta">Book Issue System....</font></b></p></a>
<p><a href="[Link]"><b><font face="Ariel" size=5 Color="orange">Book Return System....</font></b></p></a>
</body>
</html>
File Name [Link]
<html>
<head> <title> Student Admission System </title> </head>
<body bgcolor="yellow">
<h1> Enter Student Details.... </h1>
<form action="[Link]" method="get">
<table>
<tr>
<td><b><font face="Ariel" size=3>Enter the roll number: </font></b></td>
<td><input type="text" name="roll" value="Roll" size=15></td>
</tr>
<tr>
<td><b><font face="Ariel" size=3>Enter the name: </font></b></td>
<td><input type="text" name="name" value="Name" size=25></td>
</tr>
<tr>
<td><b><font face="Ariel" size=3>Enter the age: </font></b></td>
<td><input type="text" name="age" value="0" size=15></td>
</tr>
<tr>
<td><b><font face="Ariel" size=3>Enter the date of birth: </font></b></td>
<td><input type="text" name="dob" value="01/01/2008" size=15></td>
</tr>
</table>
<br><br>
Click on <input type="submit" name="submit" value="Save">
</body>
</html>
1
File Name [Link]
<html>
<head> <title>Student Admission</title> </head>
<body bgcolor="cyan">
<%@ page language="java" import="[Link].*" %>
<font face=verdana size=3 Color="Teak"> <b>Thank you for your submission, it has been successfully received:</b></font>
<br><br>
<%
String sRoll=[Link]("roll");
String sName=[Link]("name");
int sAge=[Link]([Link]("age"));
String sDob=[Link]("dob");
%>
<p> <b><font face="arial" size=4>The received roll is : <%=sRoll%></font></b></p>
<p> <b><font face="arial" size=4>The received name is : <%=sName%></font></b></p>
<p> <b><font face="arial" size=4>The received age is : <%=sAge%></font></b></p>
<p> <b><font face="arial" size=4>The received date of birth is : <%=sDob%></font></b></p>
<br><br><br><br>
<jsp:useBean id="admission" scope="request" class="[Link]" />
<% [Link](sRoll); %>
<% [Link](sName); %>
<% [Link](sAge); %>
<% [Link](sDob); %>
<% [Link](); %>
<p> <b><font face="arial" size=4>The retrieved roll is : <%=[Link]()%></font></b></p>
<p> <b><font face="arial" size=4>The retrieved name is : <%=[Link]()%></font></b></p>
<p> <b><font face="arial" size=4>The retrieved age is : <%=[Link]()%></font></b></p>
<p> <b><font face="arial" size=4>The retrieved date of birth is : <%=[Link]()%></font></b></p>
<br><br><br>
<a href="[Link]">Click back to Index page....</a>
</body>
</html>
2
File Name [Link]
<html>
<head> <title>Student Admission</title> </head>
<body bgcolor="cyan">
<%@ page language="java" import="[Link].*" %>
<font face=verdana size=3 Color="Teak"> <b>Thank you for your submission, it has been successfully received:</b></font>
<br><br>
<%
String sRoll=[Link]("roll");
String sName=[Link]("name");
String sAge=[Link]("age");
String sDob=[Link]("dob");
%>
<p> <b><font face="arial" size=4>The received roll is : <%=sRoll%></font></b></p>
<p> <b><font face="arial" size=4>The received name is : <%=sName%></font></b></p>
<p> <b><font face="arial" size=4>The received age is : <%=sAge%></font></b></p>
<p> <b><font face="arial" size=4>The received date of birth is : <%=sDob%></font></b></p>
<%
Connection con = null;
[Link] statement;
try {
// Load the Driver class file
[Link]("[Link]");
// Make a connection to the ODBC datasource Movie Catalog
con = [Link]("jdbc:odbc:myjdbc", "", "");
// Create the statement
statement = [Link]();
// Use the created statement to SELECT the DATA FROM the Titles Table.
int flag=[Link]("insert into std values ('"+sRoll+"','"+sName+"','"+sAge+"','"+sDob+"')");
}
catch (SQLException sqle) {
[Link]([Link]());
}
catch (ClassNotFoundException cnfe) {
[Link]([Link]());
}
catch (Exception e) {
[Link]([Link]());
}
finally {
try {
if ( con != null ) {
// Close the connection no matter what
[Link]();
}
}
catch (SQLException sqle) {
[Link]([Link]());
}
}
%>
</body>
</html>
3
File Name [Link]
package com;
import [Link].*;
public class Admission {
private String sRoll = null; private String sName = null;
private int sAge = 0;
private String sDob = null;
Connection conn;
Statement stmt;
ResultSet rs=null;
// Default Constructor
public Admission() {
try{
[Link]("[Link]");
conn=[Link]("jdbc:odbc:myjdbc","","");
stmt=[Link](ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
}
catch(SQLException sqle) {
[Link]("\t\tConnection could not be established properly....");
}
catch(ClassNotFoundException cnfe) {
[Link]("\t\tClass could not be found properly....");
}
}
// Public Accessors
public String getsRoll() {
return sRoll;
}
public void setsRoll(String value) {
sRoll = value;
}
// Public Accessors
public String getsName() {
return sName;
}
public void setsName(String value) {
sName = value;
}
// Public Accessors
public int getsAge() {
return sAge;
}
public void setsAge(int value) {
sAge = value;
}
// Public Accessors
public String getsDob() {
return sDob;
}
public void setsDob(String value) {
sDob = value;
}
public void insert() {
try {
int flag=[Link]("insert into std values ('"+sRoll+"','"+sName+"','"+sAge+"','"+sDob+"')");
}
catch(SQLException sqle) {
[Link]("\t\tQuery could not be executed properly....");
4
}
}
}
File Name [Link]
<html>
<head> <title> Book Purchase System </title> </head>
<body bgcolor="magenta">
<h1> Enter Book Details.... </h1>
<form action="[Link]" method="get">
<table>
<tr>
<td><b><font face="Ariel" size=3>Enter the book number: </font></b></td>
<td><input type="text" name="bkno" value="b1" size=15></td>
</tr>
<tr>
<td><b><font face="Ariel" size=3>Enter the book name: </font></b></td>
<td><input type="text" name="bname" value="Modern History" size=25></td>
</tr>
<tr>
<td><b><font face="Ariel" size=3>Enter the age: </font></b></td>
<td><input type="text" name="bsub" value="History" size=15></td>
</tr>
<tr>
<td><b><font face="Ariel" size=3>Enter the date of birth: </font></b></td>
<td><input type="text" name="price" value="500" size=15></td>
</tr>
</table>
<br><br>
Click on <input type="submit" name="submit" value="Save">
</body>
</html>
File Name [Link]
<html>
<head> <title>Book Purchase</title> </head>
<body bgcolor="light green">
<font face=verdana size=3 Color="Teak"> <b>Thank you for your submission, it has been successfully received:</b></font>
<br><br>
<%
String sBkno=[Link]("bkno");
String sBname=[Link]("bname");
String sBsub=[Link]("bsub");
int sPrice=[Link]([Link]("price"));
%>
<p> <b><font face="arial" size=4>The received roll is : <%=sBkno%></font></b></p>
<p> <b><font face="arial" size=4>The received name is : <%=sBname%></font></b></p>
<p> <b><font face="arial" size=4>The received age is : <%=sBsub%></font></b></p>
<p> <b><font face="arial" size=4>The received date of birth is : <%=sPrice%></font></b></p>
<br><br><br><br>
<jsp:useBean id="purchase" scope="request" class="[Link]" />
<% [Link](sBkno); %>
<% [Link](sBname); %>
<% [Link](sBsub); %>
<% [Link](sPrice); %>
<% [Link](); %>
<p> <b><font face="arial" size=4>The retrieved roll is : <%=[Link]()%></font></b></p>
<p> <b><font face="arial" size=4>The retrieved name is : <%=[Link]()%></font></b></p>
<p> <b><font face="arial" size=4>The retrieved age is : <%=[Link]()%></font></b></p>
<p> <b><font face="arial" size=4>The retrieved date of birth is : <%=[Link]()%></font></b></p>
5
<br><br><br>
<a href="[Link]">Click back to Index page....</a>
</body>
</html>
File Name [Link]
package com;
import [Link].*;
public class Purchase {
private String sBkno = null; private String sBname = null;
private String sBsub = null;
private int sPrice = 0;
Connection conn;
Statement stmt;
ResultSet rs=null;
// Default Constructor
public Purchase() {
try{
[Link]("[Link]");
conn=[Link]("jdbc:odbc:myjdbc","","");
stmt=[Link](ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
}
catch(SQLException sqle) {
[Link]("\t\tConnection could not be established properly....");
}
catch(ClassNotFoundException cnfe) {
[Link]("\t\tClass could not be found properly....");
}
}
// Public Accessors
public String getsBkno() {
return sBkno;
}
public void setsBkno(String value) {
sBkno = value;
}
// Public Accessors
public String getsBname() {
return sBname;
}
public void setsBname(String value) {
sBname = value;
}
// Public Accessors
public String getsBsub() {
return sBsub;
}
public void setsBsub(String value) {
sBsub = value;
}
// Public Accessors
public int getsPrice() {
return sPrice;
}
public void setsPrice(int value) {
sPrice = value;
}
public void insert() {
try {
int flag=[Link]("insert into book values ('"+sBkno+"','"+sBname+"','"+sBsub+"','"+sPrice+"')");
}
6
catch(SQLException sqle) {
[Link]("\t\tQuery could not be executed properly....");
}
}
}
File Name [Link]
<html>
<head> <title>Student Details Listing</title> </head>
<body bgcolor="cyan">
<%@ page language="java" import="[Link].*" %>
<font face=verdana size=3 Color="Teak"> <b>Thank you for your submission, it has been successfully received:</b></font>
<br><br>
<%
Connection con = null;
[Link] statement;
ResultSet rs=null;
try {
// Load the Driver class file
[Link]("[Link]");
// Make a connection to the ODBC datasource Movie Catalog
con = [Link]("jdbc:odbc:myjdbc", "", "");
// Create the statement
statement = [Link]();
// Use the created statement to SELECT the DATA FROM the Titles Table.
rs=[Link]("select * from std");%>
<table border=3 align=center>
<tr> <th>Roll No</th><th>Name</th><th>Age</th><th>Date of birth</th> </tr>
<% while([Link]())
{
String roll_field=[Link]("roll");
String name_field=[Link]("name");
int age_field=[Link]([Link]("age"));
String dob=[Link]("dob");%>
<tr> <td><%=roll_field%></td><td><%=name_field%></td><td><%=age_field%></td><td><%=dob%></td>
</tr>
<%} %>
</table>
<%}
catch (SQLException sqle) {
[Link]([Link]());
}
catch (ClassNotFoundException cnfe) {
[Link]([Link]());
}
catch (Exception e) {
[Link]([Link]());
}
finally {
try {
if ( con != null ) {
// Close the connection no matter what
[Link]();
}
}
catch (SQLException sqle) {
[Link]([Link]());
}
7
}
%>
<br><br><br>
<a href="[Link]">Click back to Index page....</a>
</body>
</html>
File Name [Link]
<html>
<head> <title>Book Details Listing</title> </head>
<body bgcolor="lightgreen">
<%@ page language="java" import="[Link].*" %>
<font face=verdana size=3 Color="Teak"> <b>Thank you for your submission, it has been successfully received:</b></font>
<br><br>
<%
Connection con = null;
[Link] statement;
ResultSet rs=null;
try {
// Load the Driver class file
[Link]("[Link]");
// Make a connection to the ODBC datasource Movie Catalog
con = [Link]("jdbc:odbc:myjdbc", "", "");
// Create the statement
statement = [Link]();
// Use the created statement to SELECT the DATA FROM the Titles Table.
rs=[Link]("select * from book");%>
<table border=3 align=center>
<tr> <th>Book No</th><th>Book Name</th><th>Subject</th><th>Price</th> </tr>
<% while([Link]())
{
String bkno_field=[Link]("bkno");
String bname_field=[Link]("bname");
String bsub_field=[Link]("bsub");
int price_field=[Link]([Link]("price"));%>
<tr> <td><%=bkno_field%></td><td><%=bname_field%></td><td><%=bsub_field%></td><td><
%=price_field%></td> </tr>
<%} %>
</table>
<%}
catch (SQLException sqle) {
[Link]([Link]());
}
catch (ClassNotFoundException cnfe) {
[Link]([Link]());
}
catch (Exception e) {
[Link]([Link]());
}
finally {
try {
if ( con != null ) {
// Close the connection no matter what
[Link]();
}
}
catch (SQLException sqle) {
[Link]([Link]());
8
}
}
%>
<br><br><br>
<a href="[Link]">Click back to Index page....</a>
</body>
</html>
File Name [Link]
<html>
<head> <title> Student Search System </title> </head>
<body bgcolor="teal">
<%@ page language="java" import="[Link].*" %>
<h1> Select the roll number.... </h1>
<form action="[Link]" method="get">
<%
Connection con = null;
[Link] statement=null;
ResultSet rs=null;
try {
// Load the Driver class file
[Link]("[Link]");
// Make a connection to the ODBC datasource Movie Catalog
con = [Link]("jdbc:odbc:myjdbc", "", "");
// Create the statement
statement = [Link]();
// Use the created statement to SELECT the DATA FROM the Titles Table.
rs=[Link]("select roll from std");%>
<select name="category" size="1">
<%
while([Link]())
{
String roll_field=[Link]("roll");%>
<option><%= roll_field %></option>
<%}%>
</select>
<br><br>
<p align=center>Click on <input type="submit" name="submit" value="Search"></P>
</form>
<%
String sCategory = [Link]("category");
if (sCategory!=null)
{%>
<%rs=[Link]("select * from std where roll = '"+sCategory+"'");
[Link]();%>
<br><br><br><br>
<table align="center" border=3>
<tr> <th>Roll No</th><th>Name</th><th>Age</th><th>Date of birth</th> </tr>
<%String roll_field=[Link]("roll");
String name_field=[Link]("name");
int age_field=[Link]([Link]("age"));
String dob=[Link]("dob");%>
<tr> <td><%=roll_field%></td><td><%=name_field%></td><td><%=age_field%></td><td><%=dob%></td>
</tr>
</table>
<%}
}
catch (SQLException sqle) {
[Link]([Link]());
}
9
catch (Exception e) {
[Link]([Link]());
}%>
<br><br><br>
<a href="[Link]"><font color="white">Click back to Index page....</font></a>
</body>
</html>
File Name [Link]
<html>
<head> <title> Book Search System </title> </head>
<body bgcolor="steel">
<%@ page language="java" import="[Link].*" %>
<h1> Select the book number.... </h1>
<form action="[Link]" method="get">
<%
Connection con = null;
[Link] statement=null;
ResultSet rs=null;
try {
// Load the Driver class file
[Link]("[Link]");
// Make a connection to the ODBC datasource Movie Catalog
con = [Link]("jdbc:odbc:myjdbc", "", "");
// Create the statement
statement = [Link]();
// Use the created statement to SELECT the DATA FROM the Titles Table.
rs=[Link]("select bkno from book");%>
<select name="category" size="1">
<%
while([Link]())
{
String bkno_field=[Link]("bkno");%>
<option><%= bkno_field %></option>
<%}%>
</select>
<br><br>
<p align=center>Click on <input type="submit" name="submit" value="Search"></P>
</form>
<%
String sCategory = [Link]("category");
if (sCategory!=null)
{%>
<%rs=[Link]("select * from book where bkno = '"+sCategory+"'");
[Link]();%>
<br><br><br><br>
<table align="center" border=3>
<tr> <th>Book No</th><th>Book Name</th><th>Subject</th><th>Price</th> </tr>
<%String bkno_field=[Link]("bkno");
String bname_field=[Link]("bname");
String bsub_field=[Link]("bsub");
int price_field=[Link]([Link]("price"));%>
<tr> <td><%=bkno_field%></td><td><%=bname_field%></td><td><%=bsub_field%></td><td><
%=price_field%></td> </tr>
</table>
<%}
}
catch (SQLException sqle) {
10
[Link]([Link]());
}
catch (Exception e) {
[Link]([Link]());
}%>
<br><br><br>
<a href="[Link]">Click back to Index page....</a>
</body>
</html>
File Name [Link]
<html>
<head> <title> Book Issue System </title> </head>
<body bgcolor="orange">
<%@ page language="java" import="[Link].*" %>
<h1> Select the roll number.... </h1>
<form action="[Link]" method="get">
<% Connection con = null;
[Link] statement=null;
ResultSet rs=null;
try {
// Load the Driver class file
[Link]("[Link]");
// Make a connection to the ODBC datasource Movie Catalog
con = [Link]("jdbc:odbc:myjdbc", "", "");
// Create the statement
statement = [Link]();
// Use the created statement to SELECT the DATA FROM the Titles Table.
rs=[Link]("select roll from std");%>
<select name="stu_category" size="1">
<%
while([Link]())
{
String roll_field=[Link]("roll");%>
<option><%= roll_field %></option>
<%}%>
</select>
<br><br>
<%rs=[Link]("select bkno from book where bkno not in (select bkno from issue)");%>
<h1> Select the book number.... </h1>
<select name="bk_category" size="1">
<%
while([Link]())
{
String bkno_field=[Link]("bkno");%>
<option><%= bkno_field %></option>
<%}%>
</select>
<br><br> <p align=center>Click on <input type="submit" name="submit" value="Issue"></P>
</form>
<%
String sCategory = [Link]("stu_category");
String bCategory = [Link]("bk_category");
String sDate="10/12/2008";
if (sCategory!=null && bCategory!=null)
{
int flag=[Link]("insert into issue values('"+sCategory+"','"+bCategory+"','"+sDate+"')");%>
<br><br><br><br>
<p><b>The book <%=bCategory%> has been issued to <%=sCategory%>....</b> </p>
<%}
}
11
catch (SQLException sqle) {
[Link]([Link]());
}
catch (Exception e) {
[Link]([Link]());
}%>
<br><br><br>
<a href="[Link]">Click back to Index page....</a>
</body>
</html>
File Name [Link]
<html>
<head> <title> Book Return System </title> </head>
<body bgcolor="pink">
<%@ page language="java" import="[Link].*" %>
<form action="[Link]" method="get">
<%
Connection con = null;
[Link] statement=null;
ResultSet rs=null;
try {
// Load the Driver class file
[Link]("[Link]");
// Make a connection to the ODBC datasource Movie Catalog
con = [Link]("jdbc:odbc:myjdbc", "", "");
// Create the statement
statement = [Link]();
// Use the created statement to SELECT the DATA FROM the Titles Table.
rs=[Link]("select bkno from issue");%>
<h1> Select the book number.... </h1>
<select name="bk_category" size="1">
<%
while([Link]())
{
String bkno_field=[Link]("bkno");%>
<option><%= bkno_field %></option>
<%}%>
</select>
<br><br>
<p align=center>Click on <input type="submit" name="submit" value="Return"></P>
</form>
<%
String bCategory = [Link]("bk_category");
if (bCategory!=null)
{
int flag=[Link]("delete from issue where bkno='"+bCategory+"'");%>
<br><br><br><br>
<p><b>The book <%=bCategory%> has been returned to the library....</b> </p>
<%}
}
catch (SQLException sqle) {
[Link]([Link]());
}
catch (Exception e) {
12
[Link]([Link]());
}%>
<br><br><br>
<a href="[Link]">Click back to Index page....</a>
</body>
</html>
File Name [Link]
<html>
<head> <title>[Link]</title> </head>
<body>
<h1> Website submission form design </h1>
<form action="[Link]" method="get">
Car owner status (RadioButton): <input type="radio" name="car" value="carT"> Having car
<input type="radio" name="car" value="nocar" CHECKED>
Having no car
<br><br>
Enter the website name (TextBox): <input type="text" name="website" value="[Link]" size=10 maxlength=20>
<br><br>
Enter the password (Password): <input type="password" name="passwd" value="abc123" size=10 maxlength=15>
Enter the url (Hidden): <input type="hidden" name="hide" value="Hidden Text" size=10 maxlength=15>
<br> <br>
category (ComboBox): <select name="category" size="1">
<option selected value="java">java</option>
<option value="ejb">ejb</option>
<option value="servlet">servlet</option>
<option value="jsp">jsp</option>
<option value="jdbc">jdbc</option>
</select>
category (ListBox): <select name="Food" size="3">
<option selected value="food1">Rice</option>
<option value="food2">Biriyani</option>
<option value="food3">Fried Rice</option>
<option value="food4">Chowmin</option>
<option value="food5">Roti</option>
</select>
<br> <br>
Description (TextArea): <textarea rows="4" cols='25' name="desc" wrap="off"></textarea>
Image display (ImageBox): <input type="image" src="[Link]" name="images" value="MyImage"> This is my image
<br> <br>
Search engines (CheckBox): <input type="checkbox" name="yahoo" value="T"> Yahoo
<input type="checkbox" name="google" value="T" CHECKED>
Google
<input type="checkbox" name="altavista" value="T"> Altavista
<br> <br>
Employment status (RadioButton): <input type="radio" name="emp" value="emp1"> Employed
<input type="radio" name="emp" value="emp2" CHECKED>
Self Employed
<input type="radio" name="emp" value="emp3"> Un-
Employed
<br> <br>
Enter the file name (File): <input type="file" name="fname" size=20 maxlength="15">
<br> <br>
Click me (Button): <input type="button" name="button" value="Click">
Description (CommandButton): <input type="submit" name="submit" value="Go">
13
Reset (ResetButton): <input type="reset" name="reset" value="Reset now">
</form>
</body>
</html>
File Name [Link]
<html>
<head>
<!-- Example4 -->
<title>[Link]</title>
</head>
<body>
<font face=verdana size=3>
Thank you for your submission, it has been successfully received:
<br><br>
<%
String sCar=[Link]("car");
String sName = [Link]("website");
String sPass = [Link]("passwd");
String sHide = [Link]("hide");
String sCategory = [Link]("category");
String sFood = [Link]("Food");
String sDesc = [Link]("desc");
String sImage = [Link]("images");
String sGoogle = [Link]("google");
String sYahoo = [Link]("yahoo");
String sAltavista = [Link]("altavista");
String sEmp = [Link]("emp");
String sFile = [Link]("fname");
%>
Car:<%=sCar%><br>
Name:<%=sName%><br>
Password:<%=sPass%><br>
Password:<%=sHide%><br>
Desc:<%=sDesc%><br>
Category:<%=sCategory%><br>
Food:<%=sFood%><br>
Desc:<%=sDesc%><br>
Image:<%=sImage%><br>
Google:<%=sGoogle%><br>
Yahoo:<%=sYahoo%><br>
Altavista:<%=sAltavista%><br>
Employee:<%=sEmp%><br>
File Name:<%=sFile%><br>
</font>
</body>
</html>
14