Internet Banking Java Project Report
Internet Banking Java Project Report
Internet Banking :
Banks have historically been at the forefront of leveraging technology to improve their
products, services, and efficiency. They have long relied on electronic and communication
networks to deliver a wide range of value-added products and services. Direct dial-up
connections, private networks, public networks, and other technologies, as well as
telephones, personal computers, and automated teller machines, are used for distribution.
With the prevalence of PCs and easy access to the Internet and the World Wide Web
(WWW), banks are increasingly using the Internet to receive instructions and provide their
clients with products and services. Although the nature and complexity of the goods and
services offered by different banks vary greatly, this type of banking is commonly referred to
as Internet Banking.
Proposed System :
Description :
The proposed system is utilised to keep track of all of a bank’s customer’s accounts
by keeping entries for customers (i.e. account data), investments, and providing their
account summary. Customers may also view their accounts without needing to visit
the bank, and transactions can be done online.
The account holder can access their account by entering login information
such as the username and password issued by the bank.
1. The user login, through which the customer logs in to view his/her account.
2. The customer can view his account summary and download forms online after
logging in.
3. A customer can use his previous account to open a new account online.
4. The customer can transfer money from his account to the account of another
customer.
5. The new username and password can be sent via SMS.
1. He/she can change his/her profile information.
1
Objectives :
The main Objective of the System in point basis are:-
Advantage :
The Objective of the system is to overcome the drawbacks of the existing manual
system and make a hassle-free computerized system.
2
TOOLS/ENVIRONMENT USED IN THE PROJECT
Introduction :
Innovation in technology is the buzzword today. Computer the wonder machine has
fulfilled more than its share of expectations. We are currently in the midst of a technological
revolution in which outdated system has made way for outstanding ones. One of the major
applications of computer technology has been information processing activity. Computer
has been an essential part of the organizational info processing because the power of the
technology and volume of data it can process.
Hardware Requirement :
Processor : Core 2 Duo
CPU Clock : 2.6 MHZ
RAM: : 1 GB
HDD : 500 GB
Monitor : LCD/LED
Mouse : Optical Mouse
Software Requirement :
Platform used : Microsoft Windows 10 and 11.
Software used : Eclipse .
RDBMS used : MY-SQL, Apache Tomcat and Xamp web server.
About Java :-
Java is a general purpose computer programming language that is concurrent, class
based and object oriented and specifically designed to have as few implementation
dependencies as possible. It is intended to let application developers write once and run
anywhere, meaning that compiled java code can run on all platform without the need of
recompilation. Java programmes are usually compiled to byte code that can run on any Java
virtual machine (JVM), independent of computer architecture. As of 2016, Java is one of the
most popular programming languages in use, particularly for client-server web application.
Java was originally developed by James Gosling AT Sun Micro system (Which has since
acquired by oracle corporation) and released in 1985 as a core component of sun Micro
system java platform. The language derives much of its syntax from c and c++, but it has
fewer low level facilities either of them. The original and reference implementation java
3
compilers, virtual machine and class libraries was originally released by sun under
proprietary license.
Platform independent
4
CHAPTER – 2
ER Diagram :-
5
CODE
==================================================================================
===
body{
margin:0;
padding:0;
line-height: 1.5em;
}
b{font-size: 110%;}
em{color: red;}
#maincontainer{
width: 840px; /*Width of main container*/
margin: 0 auto; /*Center container on page*/
}
#topsection{
background: #CCCCFF;
height: 90px; /*Height of top section*/
}
#topsection h1{
margin: 0;
padding-top: 15px;
}
#contentwrapper{
float: left;
width: 100%;
background: #3399FF;
height:500px;
}
#contentcolumn{
margin-left: 200px; /*Set left margin to LeftColumnWidth*/
}
#leftcolumn{
float: left;
width: 200px; /*Width of left column*/
height:500px;
margin-left: -840px; /*Set left margin to -(MainContainerWidth)*/
6
background: #C8FC98;
#footer{
clear: left;
width: 100%;
background: black;
color: #FFF;
text-align: center;
padding: 4px 0;
}
#footer a{
color: #FFFF80;
}
.innertube{
margin: 10px; /*Margins for inner DIV inside each column (to provide
padding)*/
margin-top: 0;
}
li {display:inline;}
</style>
<script type="text/javascript">
/*** Temporary text filler function. Remove when deploying template. ***/
var gibberish=["This is just some filler text", "Welcome to Dynamic Drive
CSS Library", "Demo content nothing to read here"]
function filltext(words){
for (var i=0; i<words; i++)
document.write(gibberish[Math.floor(Math.random()*3)]+" ")
}
</script>
<SCRIPT type="text/javascript">
window.history.forward();
function noBack()
{ window.history.forward(); }
</SCRIPT>
</head>
<body>
<div id="maincontainer">
<div id="contentwrapper">
<div id="contentcolumn">
<div class="innertube"><form method="post" action="Controller">
<img src="login.jpg" width="225" height="150" />
<h3><i>Welcome to the world of internet banking...</i></h3>
<em><h4><font face="Times New Roman" size="+2"
color="black">Logins</font></h4></em>
7
<font face="Times New Roman" size="+1" color="black">
<div id="leftcolumn">
<div class="innertube"><em><h4><font face="Times New Roman" size="+2"
color="grey">Service Offerings</font></h4></em>
<font face="Times New Roman" size="+1" color="black">
<ol type="disc">
<li>Netbanking</li><br>
<li>Bill Payment</li><br>
<li>Online Shopping</li><br>
<li>Mobile Banking Services</li><br>
<li><a href="services.jsp"><h2>More About Products And
Services</h2></a></li><br>
</ol></div>
</div>
</div>
</body>
</html>
==================================================================================
===
LOGIN PAGE(AS.JSP)
8
<script type="text/javascript">
function validateForm()
{
var x=document.forms["login"]["logid"].value
if (x==null || x=="")
{
alert("LOGIN ID must be filled out");
return false;
}
x=document.forms["login"]["pass"].value
if (x==null || x=="")
{
alert("PASSWORD must be filled out");
return false;
}
return true;
}
function validateUser()
{
var x=document.forms["login"]["logid"].value
if (x==null || x=="")
{
alert("LOGIN ID must be filled out");
return false;
}
return true;
}
</script>
function keyb_change()
{
document.getElementById("switch").innerHTML = (opened ? "Show
keyboard" : "Hide keyboard");
opened = !opened;
9
vkb = new VKeyboard("keyboard", // container's id
keyb_callback, // reference to the callback
function
true, // create the arrow keys or not?
(this and the following params are optional)
true, // create up and down arrow keys?
false, // reserved
true, // create the numpad or not?
"", // font name ("" == system
default)
"14px", // font size in px
"#000", // font color
"#F00", // font color for the dead keys
"#FFF", // keyboard base background color
"#FFF", // keys' background color
"#DDD", // background color of
switched/selected item
"#777", // border color
"#CCC", // border/font color of
"inactive" key (key with no value/disabled)
"#FFF", // background color of "inactive"
key (key with no value/disabled)
"#F77", // border color of the language
selector's cell
true, // show key flash on click?
(false by default)
"#CC3300", // font color during flash
"#FF9966", // key background color during
flash
"#CC3300", // key border color during flash
false, // embed VKeyboard into the page?
true, // use 1-pixel gap between the
keys?
0); // index(0-based) of the initial
layout
}
else
vkb.Show(opened);
text = document.getElementById("textfield");
text.focus();
if(document.attachEvent)
text.attachEvent("onblur", backFocus);
}
function backFocus()
{
if(opened)
{
var l = text.value.length;
setRange(text, l, l);
text.focus();
}
}
// Callback function:
function keyb_callback(ch)
{
10
var val = text.value;
switch(ch)
{
case "BackSpace":
var min = (val.charCodeAt(val.length - 1) == 10) ? 2 : 1;
text.value = val.substr(0, val.length - min);
break;
case "Enter":
text.value += "\n";
break;
default:
text.value += ch;
}
}
try
{
range = ctrl.createTextRange();
}
catch(e)
{
try
{
range = document.body.createTextRange();
range.moveToElementText(ctrl);
}
catch(e)
{
range = null;
}
}
if(!range) return;
range.collapse(true);
range.moveStart("character", start);
range.moveEnd("character", end - start);
range.select();
}
}
</SCRIPT>
</head>
<body background="1.jpg">
<MARQUEE>
<span style="color:green"><i><H1>LOGIN PAGE OF BANK OF RR</H1></i></span>
</MARQUEE>
11
<center>
<form method="post" action="Controller" name="login" onsubmit="return
validateForm()" >
</table></tr>
<%if((String)request.getAttribute("wrong")!
=null)
{
%>
<script type="text/javascript">alert("LOGIN ID OR
PASSWORD IS WRONG")</script>
<%} %>
</table>
<A href="javascript:keyb_change()" onclick="javascript:blur()"
id="switch" style="font-family:Tahoma;font-size:14px;text-
decoration:none;border-bottom: 1px dashed #0000F0;color:#0000F0">Show
keyboard</A>
<DIV id="keyboard"></DIV>
<input type=submit name="action" value=LOGIN >
<input type=reset name=RESET ><br>
<a href="Controller?action=forget" onClick="return
validateUser()">FORGOT PASSWORD</a>
</form>
</center>
</body>
</html>
==================================================================================
===
12
AFTER LOGIN PAGE (AFTERLOGIN.JSP)
body{
margin:0;
padding:0;
line-height: 1.5em;
}
b{font-size: 110%;}
em{color: red;}
#maincontainer{
width: 840px; /*Width of main container*/
margin: 0 auto; /*Center container on page*/
}
#topsection{
background: #EAEAEA;
height: 200px; /*Height of top section*/
13
}
#topsection h1{
margin: 0;
padding-top: 15px;
}
#contentwrapper{
float: left;
width: 100%;
}
#contentcolumn{
margin-left: 200px; /*Set left margin to LeftColumnWidth*/
}
#leftcolumn{
float: left;
width: 200px; /*Width of left column*/
margin-left: -840px; /*Set left margin to -(MainContainerWidth)*/
background: #C8FC98;
}
#footer{
clear: left;
width: 100%;
background: black;
color: #FFF;
text-align: center;
padding: 4px 0;
}
#footer a{
color: #FFFF80;
}
.innertube{
margin: 10px; /*Margins for inner DIV inside each column (to provide
padding)*/
margin-top: 0;
}
</style>
<script type="text/javascript">
/*** Temporary text filler function. Remove when deploying template. ***/
var gibberish=["This is just some filler text", "Welcome to Dynamic Drive
CSS Library", "Demo content nothing to read here"]
function filltext(words){
for (var i=0; i<words; i++)
document.write(gibberish[Math.floor(Math.random()*3)]+" ")
}
</script>
14
<script type="text/javascript" src="ddaccordion.js"></script>
<script type="text/javascript">
ddaccordion.init({
headerclass: "expandable", //Shared CSS class name of headers group
that are expandable
contentclass: "categoryitems", //Shared CSS class name of contents
group
revealtype: "click", //Reveal content when user clicks or onmouseover
the header? Valid value: "click", "clickgo", or "mouseover"
mouseoverdelay: 200, //if revealtype="mouseover", set delay in
milliseconds before header expands onMouseover
collapseprev: true, //Collapse previous content (so only one open at
any time)? true/false
defaultexpanded: [0], //index of content(s) open by default [index1,
index2, etc]. [] denotes no content
onemustopen: false, //Specify whether at least one header should be
open always (so never all headers closed)
animatedefault: false, //Should contents open by default be animated
into view?
persiststate: true, //persist state of opened contents within browser
session?
toggleclass: ["", "openheader"], //Two CSS classes to be applied to
the header when it's collapsed and expanded, respectively ["class1",
"class2"]
togglehtml: ["prefix", "", ""], //Additional HTML added to the header
when it's collapsed and expanded, respectively ["position", "html1",
"html2"] (see docs)
animatespeed: "fast", //speed of animation: integer in milliseconds
(ie: 200), or keywords "fast", "normal", or "slow"
oninit:function(headers, expandedindices){ //custom code to run when
headers have initalized
//do nothing
},
onopenclose:function(header, index, state, isuseractivated){ //custom
code to run whenever a header is opened or closed
//do nothing
}
})
</script>
<style type="text/css">
.arrowlistmenu{
width: 180px; /*width of accordion menu*/
}
15
}
.arrowlistmenu ul li{
padding-bottom: 2px; /*bottom spacing between menu items*/
}
.arrowlistmenu ul li a{
color: #A70303;
background: url(arrowbullet.png) no-repeat center left; /*custom bullet
list image*/
display: block;
padding: 2px 0;
padding-left: 19px; /*link text is indented 19px*/
text-decoration: none;
font-weight: bold;
border-bottom: 1px solid #dadada;
font-size: 90%;
}
.arrowlistmenu ul li a:visited{
color: #A70303;
}
16
ArrayList person=(ArrayList)session.getAttribute("ATT");
per=(PersonInfo)person.get(0);
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="200" align="left" valign="top"><h3>A/C no:<%=
per.getcac() %></h3></td>
<td width="200" align="left" valign="top"><h3>Branch:<
%= per.getbcode() %></h3></td>
</table>
</div>
</div>
</div>
<div id="leftcolumn">
<div class="innertube"><br>
<br>
<br><b>
<div class="arrowlistmenu">
<h3 class="menuheader expandable">RR MENU</h3>
<ul class="categoryitems">
<li><a href="afterlogin.jsp">HOME</a></li>
<li><a href="afterenquery.jsp">ACCOUNT STATEMENT</a></li>
<li><a href="ministat.jsp">MINI STATEMENT</a></li>
<li><a href="TRANSFERMONEY.jsp">TRANSFER MONEY</a></li>
<li><a href="loan.jsp">LOANS</a></li>
<li><a href="profile.jsp">PROFILE</a></li>
<li><a href="bal.jsp">BALANCE</a></li>
<li><a href="beneficiery.jsp">BENEFICIERY</a></li>
<li><a href="transbill.jsp">BILL PAY</a></li>
<li><a href="newregistration.jsp">REGISTRATION NEW ACCOUNT</a></li>
</ul>
<h3 class="menuheader expandable">IP ADDRESS</h3>
<ul class="categoryitems">
<li>
<script language="JavaScript">
VIH_BackColor = "palegreen";
VIH_ForeColor = "navy";
VIH_FontPix = "16";
VIH_DisplayFormat = "You are visiting from:<br>IP Address: %%IP%
%<br>Host: %%HOST%%";
VIH_DisplayOnPage = "yes";
</script>
<script language="JavaScript"
src="http://scripts.hashemian.com/js/visitorIPHOST.js.php"></script>
</li>
</ul>
</div>
</div>
</div>
</form>
</body>
</html>
==================================================================================
===
17
ACCOUNT STATEMENT(AFTERENQUERY.JSP)
Connection con=null ;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con =DriverManager.getConnection("jdbc:odbc:abc","root","root");
String sql="select * from widep where cac="+a+" and
ddate>='"+request.getParameter("orderdate")+"' and
ddate<='"+request.getParameter("ordedate")+"'";
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery(sql);
while(rs.next())
{
%>
<TR>
<TD> <%= rs.getString(2) %></TD>
<TD> <%= rs.getString(4) %></TD>
<TD> <%= rs.getFloat(5) %></TD></TR>
<%
}
}catch(Exception e){System.out.println(e);}
%>
</body>
</html>
==================================================================================
===
18
MINISTATEMENT (MINISTAT.JSP)
<%
ArrayList person=(ArrayList)session.getAttribute("ATT");
PersonInfo per=null;
per=(PersonInfo)person.get(0);
%>
%>
<TR>
<TD> <%= per.getdadate() %></TD>
<TD> <%= per.gettype() %></TD>
<TD> <%= per.getamount() %></TD></TR>
<% } %>
</table>
</body>
</html>
==================================================================================
===
19
TRANSFER MONEY(TRANSFERMONEY.JSP)
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con
=DriverManager.getConnection("jdbc:odbc:abc","root","root");
String sql="Select * from bene where cac="+a;
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery(sql);
if(rs.next()){
do
{
%>
<option ><%=rs.getInt(2) %></option>
<%
}while(rs.next());
}
else
{
%>
<script type="text/javascript">alert("NO BENIFICIERY
EXIST")</script>
<%
}
}
catch(Exception e){
System.out.println(e);
}
finally{
20
if(con!=null)
{
con.close();
}
}
%>
</select><br>
<input type="submit" value="PROCEED">
<center>
</form>
</body>
</html>
==================================================================================
===
TRANSFER MONEY(TRANSFERMONEY1.JSP)
function validateName()
{
var x=document.forms["price"]["amt"].value
var y=document.forms["price"]["lim"].value
var z=document.forms["price"]["balance"].value
if (x==null || x=="")
{
alert("ENTER THE AMOUNT");
return false;
}
if(parseFloat(x) <= 0)
{
alert("Amount Should be greater than 0");
return false;
}
if(isNaN(x))
{
alert("Enter the valid Amount");
return false;
}
if (parseFloat(x)>parseFloat(y))
{
alert("AMOUNT EXCEEDING LIMITS");
21
return false;
}
if (parseFloat(x)>parseFloat(z))
{
alert("AMOUNT EXCEEDING ACCOUNT BALANCE");
return false;
}
return true;
}
</script>
</head>
<body>
<jsp:include page="include.jsp" flush="true"/>
<form action="Controller" method="post" name="price">
<INPUT TYPE="hidden" name="option" VALUE=<%=request.getParameter("AA") %>>
<script type="text/javascript">
document.forms["price"]["amt"].value=document.forms["n"]["option"].value
</script>
String tacc=request.getParameter("AA");
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con =DriverManager.getConnection("jdbc:odbc:abc","root","root");
String sql="Select * from bene where tacc="+tacc+" and cac="+a;
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery(sql);
if(rs.next()){
%>
<INPUT TYPE="TEXT" readonly="true" name="lim" VALUE=<
%=rs.getFloat(5) %>>
<%
}
sql="Select * from accd where cac="+a;
stmt=con.createStatement();
rs=stmt.executeQuery(sql);
if(rs.next()){
%>
<INPUT TYPE="hidden" name="balance" VALUE=<
%=rs.getFloat(2) %>>
<%
22
}
catch(Exception e){
System.out.println(e);
}
finally{
if(con!=null)
{
con.close();
}
}
%>
<input type="Submit" value="TRANSFER" name="action" onClick="return
validateName()">
</form>
</body>
</html>
==================================================================================
===
LOAN (LOAN.JSP)
<%@ 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>Insert title here</title>
<SCRIPT type="text/javascript" src="rightclick.js"></SCRIPT>
</head>
<body>
<jsp:include page="include.jsp" flush="true"/>
23
<SCRIPT type="text/javascript" src="rightclick.js"></SCRIPT>
==================================================================================
===
24
alert("Not a Valid Name");
return false;
}
if (x==null || x=="")
{
alert("ENTER THE NAME");
return false;
}
return true;
}
</script>
</head>
<body>
<jsp:include page="include.jsp" flush="true"/>
<form method="post" action="Controller" name="login">
<img src="profile1.jpg" width="1200" height="150" border="0" />
<span style="background-color: #FFCCCC"> <em><h3><font face="Times New
Roman" size="+2" color="#000033">PROFILE</font></h3></em></span>
<BR> ENTER THE NAME <INPUT TYPE="TEXT" name="cname">
<input type=submit value="CHANGE NAME" name="action" onClick="return
validateName()" >
</form>
</body>
</html>
==================================================================================
===
25
<BR> ENTER NEW PASSWORD <INPUT TYPE="PASSWORD" name="cpass">
<input type=submit value="CHANGE PASSWORD" name="action" >
</form>
</body>
</html>
==================================================================================
===
if (x==null || x=="")
{
alert("ENTER THE MOBILE NO");
return false;
}
if(isNaN(x))
26
{
alert("Enter the valid Mobile Number(Like : 9566137117)");
return false;
}
if(x.length!=10)
{
alert("Mobile No. Should Be of 10 Digits");
return false;
}
if (x.charAt(0)!="9"&&x.charAt(0)!="8"&&x.charAt(0)!="7")
{
alert("Mobile No. should start with 9,8 or 7 ");
return false
}
return true;
}
</script>
</head>
<body>
<jsp:include page="include.jsp" flush="true"/>
<form method="post" action="Controller" name="login">
<img src="profile1.jpg" width="1200" height="150" border="0" />
<span style="background-color: #FFCCCC"> <em><h3><font face="Times New
Roman" size="+2" color="#000033">PROFILE</font></h3></em></span>
<BR> ENTER THE MOBILE NUMBER <INPUT TYPE="TEXT" name="mobile">
<input type=submit value="CHANGE MOBILE" name="action" onClick="return
validateMobile()">
</form>
</body>
</html>
==================================================================================
===
function validateName()
{
var x=document.forms["bene"]["acno"].value
var y=document.forms["bene"]["limit"].value
document.forms["bene"]["chk"].value="false"
if (x==null || x=="" || y==null || y=="")
27
{
alert("ALL Fields Should Be filled");
return false;
}
if(parseFloat(y) <= 0)
{
alert("Limits Should be greater than 0");
return false;
}
if(isNaN(x))
{
alert("Enter the Accno");
return false;
}
if(isNaN(y))
{
alert("Enter the valid Limit");
return false;
}
document.forms["bene"]["chk"].value="true"
return true;
}
</script>
</head>
<body>
<jsp:include page="include.jsp" flush="true"/>
<img src="beneficiary.jpg" width="300" height="150" border="0" />
<span style="background-color: #FFCCCC"> <em><h3><font face="Times New
Roman" size="+2" color="#000033">BENEFICIARY</font></h3></em></span>
<table width="100%" border="0" cellpadding="0" cellspacing="0" id="logo">
<tr>
</tr>
</table>
<form method="post" action="" name="bene">
<input type="hidden" value="false" name="chk"><br>
A/C No: <input type="text" name="acno" id="a"><br>
SET THE LIMITS:<input type="text" name="limit"
id="s"><br>
<input type="submit" value="ADD" onClick="return
validateName()">
</form>
28
<%
ArrayList person=(ArrayList)session.getAttribute("ATT");
PersonInfo per=null;
per=(PersonInfo)person.get(0);
Integer a=per.getcac();
Connection con=null ;
String tacc=request.getParameter("acno");
String lim=request.getParameter("limit");
String chk=request.getParameter("chk");
if(tacc!=null && lim!=null&& lim!="" &&tacc!="")
{
if(Integer.parseInt(tacc)== a){
%>
<script type="text/javascript">alert("OWNER OF ACCOUNT
NO IS SAME")</script>
<%
}
else if(chk.compareTo("true") == 0)
{
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con
=DriverManager.getConnection("jdbc:odbc:abc","root","root");
String sql="Select * from accd where
cac="+Integer.parseInt(tacc);
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery(sql);
if(rs.next()){
sql="insert into bene
values("+a+","+Integer.parseInt(tacc)+","+Float.parseFloat(lim)+")";
stmt=con.createStatement();
stmt.executeUpdate(sql);
}
else
{
%>
<script type="text/javascript">alert("ACCOUNT NO IS NOT
EXIST")</script>
<%
}
}
catch(Exception e){
System.out.println(e);
}
finally{
if(con!=null)
{
con.close();
}
}
}
}
%>
</body>
</html>
29
==================================================================================
===
</tr>
</table>
<h2>Select benificiay to modify</h2><select name="BB">
<%
ArrayList person=(ArrayList)session.getAttribute("ATT");
PersonInfo per=null;
per=(PersonInfo)person.get(0);
Integer a=per.getcac();
Connection con=null ;
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con
=DriverManager.getConnection("jdbc:odbc:abc","root","root");
String sql="Select * from bene where cac="+a;
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery(sql);
30
if(rs.next()){
do
{
%>
<option ><%=rs.getInt(2) %></option>
<%
}while(rs.next());
}
else
{
%>
<script type="text/javascript">alert("NO BENIFICIERY
EXIST")</script>
<%
}
}
catch(Exception e){
System.out.println(e);
}
finally{
if(con!=null)
{
con.close();
}
}
%>
</select><br>
==================================================================================
===
31
ArrayList person=(ArrayList)session.getAttribute("ATT");
PersonInfo per=null;
per=(PersonInfo)person.get(0);
Integer a=per.getcac();
Connection con=null ;
String tacc=request.getParameter("BB");
String lim=request.getParameter("limit");
System.out.println(tacc);
System.out.println(lim);
if( lim!=null&& lim!="" && tacc!=null && tacc!="")
{
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con
=DriverManager.getConnection("jdbc:odbc:abc","root","root");
String sql="update bene set camt="+Float.parseFloat(lim)+"
where tacc="+Integer.parseInt(tacc)+"&& cac="+a;
Statement stmt=con.createStatement();
stmt.executeUpdate(sql);
}
catch(Exception e){
System.out.println(e);
}
finally{
if(con!=null)
{
con.close();
}
}
}
%>
<form action="benemodify2.jsp" method="post">
<img src="beneficiary.jpg" width="300" height="150" border="0" />
<span style="background-color: #FFCCCC"> <em><h3><font face="Times New
Roman" size="+2"
color="#000033"><center>BENEFICIARY</font></h3></em></span>
<table width="100%" border="0" cellpadding="0" cellspacing="0" id="logo">
<tr>
</tr>
</table>
<h2>Select benificiay to modify</h2><select name="BB">
32
<%
con=null ;
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con
=DriverManager.getConnection("jdbc:odbc:abc","root","root");
String sql="Select * from bene where cac="+a;
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery(sql);
if(rs.next()){
do
{
%>
<option ><%=rs.getInt(2) %></option>
<%
}while(rs.next());
}
else
{
%>
<script type="text/javascript">alert("NO BENIFICIERY
EXIST")</script>
<%
}
}
catch(Exception e){
System.out.println(e);
}
finally{
if(con!=null)
{
con.close();
}
}
%>
</select><br>
<form action="benemodify2.jsp">
SET THE LIMITS:<input type="text" name="limit" /><br />
<input type="submit" value="CHANGE" />
</form>
</body>
</html>
==================================================================================
===
33
import= "java.sql.*" import= "java.util.*" import="p.*"%>
<!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>Insert title here</title>
<style type="text/css">
.toolheader{
width: 25em;
}
li { display:inline;font-size:30px;font-weight:bold}
</style>
</head>
<body>
<jsp:include page="include.jsp" flush="true"/>
<%
ArrayList person=(ArrayList)session.getAttribute("ATT");
PersonInfo per=null;
per=(PersonInfo)person.get(0);
Integer a=per.getcac();
Connection con=null ;
String tacc=request.getParameter("AA");
if(tacc!=null &&tacc!="")
{
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con
=DriverManager.getConnection("jdbc:odbc:abc","root","root");
String sql="delete from bene where
tacc="+Integer.parseInt(tacc);
Statement stmt=con.createStatement();
stmt.executeUpdate(sql);
}
catch(Exception e){
System.out.println(e);
}
finally{
if(con!=null)
{
con.close();
}
}
}
%>
<form action="removebene.jsp" method="post">
<img src="beneficiary.jpg" width="300" height="150" border="0" />
<span style="background-color: #FFCCCC"> <em><h3><font face="Times New
Roman" size="+2"
color="#000033"><center>BENEFICIARY</center></font></h3></em></span>
<center>
<table width="100%" border="0" cellpadding="0" cellspacing="0" id="logo" >
<tr>
<td width="33%" align="center" valign="top"><a
href="beneficiery.jsp"><img src="add.jpg" alt="ADD" width="500" height="55"
border="0" /></a></td>
<td width="33%" align="center" valign="top"><a
href=""><img src="modify.jpg" alt="MODIFY" width="500" height="55"
border="0" /></a></td>
34
<td width="33%" align="center" valign="top"><a
href=""><img src="remove.jpg" alt="REMOVE" width="500" height="55"
border="0" /></a></td>
<td align="left" valign="top"><img
src="line1.jpg" width="1" height="55" /></td>
</tr>
</table>
</center><br>
con=null ;
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con
=DriverManager.getConnection("jdbc:odbc:abc","root","root");
String sql="Select * from bene where cac="+a;
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery(sql);
if(rs.next()){
System.out.println(rs.getInt(2));
do
{
%>
<option ><%=rs.getInt(2) %></option>
<%
}while(rs.next());
}
else
{
%>
<script type="text/javascript">alert("NO BENIFICIERY
EXIST")</script>
<%
}
}
catch(Exception e){
System.out.println(e);
}
finally{
if(con!=null)
{
con.close();
}
}
%>
</select><li><br>
<center><input type="Submit" value="Remove Beneficiary"></center>
</form>
</body>
35
</html>
==================================================================================
===
BILLPAYMENTS (TRANSBILL.JSP)
function validateName()
{
var x=document.forms["bill"]["PayAmount"].value
if (x==null || x=="")
{
alert("ENTER THE AMOUNT");
return false;
}
if(parseFloat(x) <= 0)
{
alert("Amount Should be greater than 0");
return false;
}
if(isNaN(x))
{
alert("Enter the valid Amount");
return false;
}
return true;
}
</script>
</head>
<body>
<jsp:include page="include.jsp" flush="true"/>
<form method="post" action="Controller" name="bill">
<span style="background-color: #FFCCCC"> <em><h3><font face="Times New
Roman" size="+2" color="#000033"><center>BILL
PAYMENTS/TRANSFER</center></font></h3></em></span>
<img src="bill_pay.jpg" width="600" height="150" border="0" />
<p>Using the bill payment you can view and Pay Various bills online,
directly from your account. You can pay telephone,electricity,
insurance,credit cards and other bills from the comfort of your house or
office, 24 hours a day, 365 days a year.</p>
36
<img src="transbill.jpg" width="300" height="150"
border="0" />
<form action="form_action.asp" align ="center">
<h3>Select the company you want to pay the bill
for</h3><select>
<option SELECTED>Reliance Comm.</option>
<option>TATA Indicom</option>
</select><br>
<br>
Enter the payable amount: <input type="text"
name="PayAmount" /><br />
<input type="submit" value="PAY" name="action"
onClick="return validateName()"/>
<input type="reset" value="RESET" />
</form>
</body>
</html>
==================================================================================
===
if (z==null ||z==""||w==null||w=="")
{
alert("ALL Fields Should Be filled");
return false;
}
if(z!=w)
{
alert("Password Didnt match");
return false;
}
return true;
}
</script>
</head>
<body bgcolor="#E6E6FA">
<jsp:include page="include.jsp" flush="true"/>
<%
Integer i=(Integer)session.getAttribute("A");
37
if(i==0)
{
%>
<script type="text/javascript">alert("LOGIN ID ALREADY EXIST")</script>
<%
}
session.setAttribute("A",1);
%>
<span style="background-color: #FFCCCC"> <em><h3><font face="Times New
Roman" size="+2" color="#000033">OPEN A NEW ACCOUNT</font></h3></em></span>
<div class="menu" align="center">
<span><img src="nwac.jpg" width="150" height="70" border="0" /></span>
<span><img src="reg_ac.jpg" width="350" height="70" border="0" /></span>
<span><img src="reg1.jpg" width="150" height="70" border="0" /></span>
</div>
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con =DriverManager.getConnection("jdbc:odbc:abc","root","root");
String sql="Select * from acc ";
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery(sql);
rs.next();
Integer a=rs.getInt(1)+1;
%>
<INPUT TYPE="text" disabled="disabled" name="ac" VALUE="<%=a %>">
<INPUT TYPE="hidden" name="acn" VALUE="<%=a %>">
<%
}
catch(Exception e){
System.out.println(e);
}
finally{
if(con!=null)
{
con.close();
}
}
%>
<br>
<BR><input type="submit" value="OPEN ACCOUNT" name="action"
onClick="return validateName()">
<input type="RESET" value="RESET" >
</form>
</body>
</html>
38
==================================================================================
===
CONTROLLER
import java.io.IOException;
import java.util.*;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.*;
import p.*;
import javax.servlet.*;
import javax.servlet.http.*;
public Controller() {
super();
String userAction=req.getParameter("action");
if(userAction.equals("LOGIN")){
search(req,res);
open(req,res);
else if(userAction.equals("PAY")){
pay(req,res);
39
}
else if(userAction.equals("TRANSFER")){
transfer(req,res);
nameu(req,res);
emailu(req,res);
mobileu(req,res);
else
{ RequestDispatcher rd=req.getRequestDispatcher("main.jsp");
if(userAction.equals("reg")){
rd=req.getRequestDispatcher("main.jsp");
if(userAction.equals("Personal Banking")){
rd=req.getRequestDispatcher("as.jsp");
else if(userAction.equals("forget")){
rd=req.getRequestDispatcher("forget.jsp");
else if(userAction.equals("mini")){
ArrayList person=(ArrayList)req.getAttribute("list");
PersonInfo per=null;
40
rd=req.getRequestDispatcher("2.jsp");
else if(userAction.equals("home")){
req.setAttribute("file","login.jsp");
rd=req.getRequestDispatcher("BAAP.jsp");
else if(userAction.equals("contact")){
req.setAttribute("file","contact.jsp");
rd=req.getRequestDispatcher("contact.jsp");
else if(userAction.equals("registration")){
req.setAttribute("file","registration.jsp");
rd=req.getRequestDispatcher("registration.jsp");
req.setAttribute("file","login.jsp");
rd=req.getRequestDispatcher("main.jsp");
rd.forward(req,res);
function(request,response);
41
function(request,response);
try{
String log=req.getParameter("log");
String pas=req.getParameter("pas");
Integer nwac=Integer.parseInt(req.getParameter("acn"));
HttpSession session=req.getSession(true);
ArrayList personn=(ArrayList)session.getAttribute("ATT");
Integer i=pdao.reg(personn,log,pas,nwac);
session.setAttribute("A",i);
RequestDispatcher rd=req.getRequestDispatcher("newregistration.jsp");
rd.forward(req,res);
}catch(Exception e){System.out.println(e);}
try{
42
float name=Float.parseFloat(req.getParameter("amt"));
Integer nam=Integer.parseInt(req.getParameter("option"));
HttpSession session=req.getSession(true);
ArrayList personn=(ArrayList)session.getAttribute("ATT");
PersonInfo per=null;
person=(PersonInfo)personn.get(0);
personn=pdaou.transfer(person.getcac(),name,personn,nam);
ArrayList personlist=pdao.retrieve(person.getid(),person.getpass());
session.setAttribute("ATT", personlist);
RequestDispatcher rd=req.getRequestDispatcher("TRANSFERMONEY.jsp");
rd.forward(req,res);
}catch(Exception e){System.out.println(e);}
try{
float name=Float.parseFloat(req.getParameter("PayAmount"));
HttpSession session=req.getSession(true);
ArrayList personn=(ArrayList)session.getAttribute("ATT");
PersonInfo per=null;
person=(PersonInfo)personn.get(0);
personn=pdaou.uppay(person.getcac(),name,personn);
ArrayList personlist=pdao.retrieve(person.getid(),person.getpass());
session.setAttribute("ATT", personlist);
43
RequestDispatcher rd=req.getRequestDispatcher("afterlogin.jsp");
rd.forward(req,res);
}catch(Exception e){System.out.println(e);}
try{
String name=req.getParameter("cpass");
HttpSession session=req.getSession(true);
ArrayList personn=(ArrayList)session.getAttribute("ATT");
PersonInfo per=null;
person=(PersonInfo)personn.get(0);
pdaou.emailupd(person.getid(),name);
Integer i=personn.size();
for(Integer j=0;j<i;j++)
person=(PersonInfo)personn.get(j);
person.setpass(name);
personn.set(j, person);
session.setAttribute("ATT", personn);
RequestDispatcher rd=req.getRequestDispatcher("afterlogin.jsp");
rd.forward(req,res);
}catch(Exception e){System.out.println(e);}
44
protected void mobileu(HttpServletRequest req,HttpServletResponse res)throws
ServletException, IOException {
try{
String name=req.getParameter("mobile");
HttpSession session=req.getSession(true);
ArrayList personn=(ArrayList)session.getAttribute("ATT");
PersonInfo per=null;
person=(PersonInfo)personn.get(0);
pdaou.mobileupd(person.getid(),Long.parseLong(name));
Integer i=personn.size();
for(Integer j=0;j<i;j++)
person=(PersonInfo)personn.get(j);
person.setmobile(Long.parseLong(name));
personn.set(j, person);
session.setAttribute("ATT", personn);
RequestDispatcher rd=req.getRequestDispatcher("afterlogin.jsp");
rd.forward(req,res);
}catch(Exception e){System.out.println(e);}
try{
45
PersonInfo person=new PersonInfo();
String name=req.getParameter("cname");
HttpSession session=req.getSession(true);
ArrayList personn=(ArrayList)session.getAttribute("ATT");
PersonInfo per=null;
person=(PersonInfo)personn.get(0);
pdaou.nameupd(person.getid(),name);
Integer i=personn.size();
for(Integer j=0;j<i;j++)
person=(PersonInfo)personn.get(j);
person.setname(name);
personn.set(j, person);
session.setAttribute("ATT", personn);
RequestDispatcher rd=req.getRequestDispatcher("afterlogin.jsp");
rd.forward(req,res);
}catch(Exception e){System.out.println(e);}
try{
String logid=req.getParameter("logid");
String password=req.getParameter("pass");
ArrayList personlist=pdao.retrieve(logid,password);
46
HttpSession session=req.getSession(true);
session.setAttribute("ATT", personlist);
RequestDispatcher rd=null;
if(personlist.size()==0){
req.setAttribute("wrong","AA");
rd=req.getRequestDispatcher("as.jsp");
else{
req.setAttribute("wrong",null);
session.setAttribute("A",1);
rd=req.getRequestDispatcher("afterlogin.jsp");
rd.forward(req,res);
}catch(Exception e){System.out.println(e);}
==================================================================================
===
47
PDAO.JAVA
package p;
import java.io.Serializable;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.sql.*;
public PDAO()
estabcon();
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con =DriverManager.getConnection("jdbc:odbc:abc","root","root");
}catch(Exception e){ }
}
48
public int reg(ArrayList a,String log,String pass,Integer nwac) throws SQLException
Integer i=0;
try{
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery(sql);
if(!rs.next())
PersonInfo per=(PersonInfo)a.get(0);
stmt=con.createStatement();
stmt.executeUpdate(sql);
stmt=con.createStatement();
stmt.executeUpdate(sql);
stmt=con.createStatement();
stmt.executeUpdate(sql);
stmt=con.createStatement();
49
stmt.executeUpdate(sql);
stmt=con.createStatement();
stmt.executeUpdate(sql);
i= 1;
} catch(Exception e){
System.out.println(e);
finally{
if(con!=null)
con.close();
return i;
try{
50
String sql="Select * from custp where cid='" +id + "' and pass='"
+pass+"'";
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery(sql);
String name;
String psd;
String cname=null,cadd=null,dadate=null,type=null;
Integer cac,bcode;
Long cmobile;
Float amount,bal;
if(rs.next()){
name=rs.getString("cid");
psd=rs.getString("pass");
con
=DriverManager.getConnection("jdbc:odbc:abc","root","root");
try{
stmt = con.createStatement();
rs=stmt.executeQuery(sql);
rs.next();
name=rs.getString("cid");
cac=rs.getInt("cac");
try{
stmt = con.createStatement();
51
rs=stmt.executeQuery(sql);
rs.next();
cname=rs.getString("cname");
cadd=rs.getString("cadd");
cmobile=rs.getLong("cmobile");
try{
stmt =
con.createStatement();
rs=stmt.executeQuery(sql);
rs.next();
bal=rs.getFloat("bal");
bcode=rs.getInt("bcode");
try{
sql="Select
* from widep where cac="+cac;
stmt =
con.createStatement();
rs=stmt.executeQuery(sql);
while(rs.next()){
dadate=rs.getString("ddate");
type=rs.getString("type");
amount=rs.getFloat("amount");
52
PersonInfo p=new PersonInfo();
p.setall(name,cac,cadd,bal,bcode,dadate,type,amount);
p.setname(cname);
p.setpass(psd);
p.setmobile(cmobile);
a.add(p);
catch(Exception e){
System.out.println(e);
catch(Exception e){
System.out.println(e);
catch(Exception e){
System.out.println(e);
catch(Exception e){
System.out.println(e);
53
}
} catch(Exception e){
System.out.println(e);
finally{
if(con!=null)
con.close();
return a;
==================================================================================
===
PDAOU.JAVA
package p;
import java.io.Serializable;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
54
import java.util.*;
import java.text.*;
public PDAOU()
estabcon();
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con =DriverManager.getConnection("jdbc:odbc:abc","root","root");
}catch(Exception e){ }
/*
amount float(10,2)
*/
55
try{
Statement stmt=con.createStatement();
stmt.executeUpdate(sql);
String dat=dateFormat.format(date);
String tim=dateFormat.format(date);
stmt=con.createStatement();
stmt.executeUpdate(sql);
stmt=con.createStatement();
stmt.executeUpdate(sql);
dat=dateFormat.format(date);
tim=dateFormat.format(date);
stmt=con.createStatement();
stmt.executeUpdate(sql);
} catch(Exception e){
System.out.println(e);
56
}
finally{
if(con!=null)
con.close();
return a;
try{
Statement stmt=con.createStatement();
stmt.executeUpdate(sql);
String dat=dateFormat.format(date);
String tim=dateFormat.format(date);
stmt=con.createStatement();
stmt.executeUpdate(sql);
57
} catch(Exception e){
System.out.println(e);
finally{
if(con!=null)
con.close();
return a;
try{
Statement stmt=con.createStatement();
stmt.executeUpdate(sql);
} catch(Exception e){
System.out.println(e);
finally{
if(con!=null)
con.close();
58
}
try{
Statement stmt=con.createStatement();
stmt.executeUpdate(sql);
} catch(Exception e){
System.out.println(e);
finally{
if(con!=null)
con.close();
try{
59
String sql="update custd set cmobile="+name+" where cid=" +
nname;
Statement stmt=con.createStatement();
stmt.executeUpdate(sql);
} catch(Exception e){
System.out.println(e);
finally{
if(con!=null)
con.close();
SNAP SHOTS
60
61
62
63
SCOPE OF ENHANCEMENT
The system may be updated or modified owing to its simple structure. This can further be
used for maintenance of the ACCOUNT details for the customers and make the transaction
easy for the customers.
64
CONCLUSION
A INTERNET BANKING SYSYTEM has been developed and the system was
tested with sample data.
The system results in regular timely preparations of required outputs.The system
provides a user friendly environment for the customers to do banking without going to the
bank itself, allows the facility like opening the new account, transferring the money and
downloading the forms.
65