Internet Banking Java Project Report
Internet Banking Java Project Report
INTRODUCTION
Platform independent
REQUIREMENTS
HARDWARE:
SOFTWARE:
1.)Windows platform.
2).MY-SQL installed on windows platform.
3).Eclipse 3.3 installed on windows platform.
4).Apache tomcat installed on windows platform.
5).mysql connector 5.1.8 installed on windows platform.
System Description:
The proposed system is used to maintain a account record of all the customersof a Bank (RR) by
storing entries for customer(i.e. account details),investments and showing their account
summary. It also allows the customer to view their account without going to the bank and
transaction can be done online.
The customer need to login to his account by the provided username and id through the
bank.
The project has the following parts:
1.
2.
3.
4.
5.
6.
The user login, through which the customer logs in his/her account to view his account.
After login the customer can view his account summary, download forms online.
A customer can open a new account online through his previous account.
Customer can transfer the money from his account to the other customers account.
The changed username and password can be send through the sms.
He/she can change his profile details.
E-R DIAGRAM
CODE
==================================================
===================================
MAIN PAGE (1ST.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>
<style type="text/css">
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)*/
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="topsection"><div class="innertube"><h1><ul>
<li><a href="1st.jsp" rel="gotsubmenu[selected]"><img src="home.jpg"
alt="Home" width="70" height="55" border="0" ></a></li>
<li><a href="contact.jsp" rel="gotsubmenu"><img src="contact.jpg" alt="Contact
Us" width="70" height="55" border="0" /></a></li>
<li><a href="registration.jsp"><img src="registration.jpg" alt="REGITRATION"
width="70" height="55" border="0" /></a></li>
</ul></h1></div></div>
<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>
<font face="Times New Roman" size="+1" color="black">
<button type=submit name="action" value="Personal Banking">Personal
Banking</button>
</font></div>
</div>
</div>
<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 id="footer">INTERNET BANKING OF RR</div>
</div>
</body>
</html>
==================================================
===================================
LOGIN PAGE(AS.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>
<SCRIPT type="text/javascript" src="rightclick.js"></SCRIPT>
<title> New Document </title>
<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>
//
// 'keyb_change' and 'keyb_callback' functions
// do all the job here.
var opened = false, vkb = null, text = null;
function keyb_change()
{
document.getElementById("switch").innerHTML = (opened ? "Show keyboard" :
"Hide keyboard");
opened = !opened;
if(opened && !vkb)
{
// Note: all parameters, starting with 3rd, in the following
// expression are equal to the default parameters for the
// VKeyboard object. The only exception is 15th parameter
// (flash switch), which is false by default.
vkb = new VKeyboard("keyboard",
//
keyb_callback, //
function
true,
//
(this and the following params are optional)
true,
//
false,
//
true,
//
"",
//
"14px",
//
"#000",
//
"#F00",
//
"#FFF",
//
"#FFF",
//
"#DDD",
//
switched/selected item
"#777",
//
"#CCC",
//
key (key with no value/disabled)
"#FFF",
//
key (key with no value/disabled)
"#F77",
//
selector's cell
true,
//
by default)
"#CC3300",
//
"#FF9966",
//
"#CC3300",
//
false,
//
true,
//
0);
//
layout
}
else
vkb.Show(opened);
container's id
reference to the callback
create the arrow keys or not?
create up and down arrow keys?
reserved
create the numpad or not?
font name ("" == system default)
font size in px
font color
font color for the dead keys
keyboard base background color
keys' background color
background color of
border color
border/font color of "inactive"
background color of "inactive"
border color of the language
show key flash on click? (false
font color during flash
key background color during flash
key border color during flash
embed VKeyboard into the page?
use 1-pixel gap between the keys?
index(0-based) of the initial
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)
{
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;
}
10
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>
<center>
<form method="post" action="Controller" name="login" onsubmit="return
validateForm()" >
<br><br><br><br><br><br>
<br>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td ><h1>LOG-ON DETAILS</h1></td></tr>
<tr><table border="1">
<tr style="height:50px">
<td ><strong>LOGIN ID* </strong></td>
<td ><input name=logid type="text" id="username" value="" tabindex="1"
size="20" maxlength="20" ></td>
</tr>
<tr style="height:50px">
<td><strong>PASSWORD* </strong></td>
<td ><input type=password id="textfield" name=pass tabindex="2"
title="password" size="20"></td>
</tr>
</table></tr>
<%if((String)request.getAttribute("wrong")!
=null)
{
%>
<script type="text/javascript">alert("LOGIN ID OR PASSWORD IS WRONG")</script>
11
<%} %>
</table>
<A href="javascript:keyb_change()" onclick="javascript:blur()"
id="switch" style="font-family:Tahoma;font-size:14px;textdecoration: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
13
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
15
16
</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)
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"
import= "java.util.*" import="p.*" 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>Insert title here</title>
</head>
<body>
<jsp:include page="enqueries.jsp" flush="true"/>
<table column=4 border=5 width=800>
<tr><td><B>DATE<td><B>TYPE<td><B>AMOUNT</td>
<% ArrayList person=(ArrayList)session.getAttribute("ATT");
PersonInfo per=null;
per=(PersonInfo)person.get(0);
Integer a=per.getcac();
try
{
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)
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"
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>
<SCRIPT type="text/javascript" src="rightclick.js"></SCRIPT>
</head>
<body>
<jsp:include page="afterlogin.jsp" flush="true"/>
<%
ArrayList person=(ArrayList)session.getAttribute("ATT");
PersonInfo per=null;
per=(PersonInfo)person.get(0);
%>
<table column=4 border=5 width=800>
<tr><td><B>DATE<td><B>TYPE<td><B>AMOUNT</td>
<%
person=(ArrayList)session.getAttribute("ATT");
per=null;
for(int i=0;i<person.size();i++){
per=(PersonInfo)person.get(i);
%>
<TR>
<TD><%= per.getdadate() %></TD>
<TD><%= per.gettype() %></TD>
<TD><%= per.getamount() %></TD></TR>
<% } %>
</table>
</body>
</html>
==================================================
===================================
19
TRANSFER MONEY(TRANSFERMONEY.JSP)
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"
import= "java.sql.*" import= "java.util.*" import="p.*"
import ="java.text.*"%>
<!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>
</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">TRANSFER MONEY</font></h3></em></span>
<form action="TRANSFERMONEY1.jsp" method="post" name="n">
Select benificiay :
<select name="AA" class="toolheader">
<%
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);
if(rs.next()){
do
{
%>
<option ><%=rs.getInt(2) %></option>
<%
}while(rs.next());
}
else
{
%>
<script
EXIST")</script>
type="text/javascript">alert("NO BENIFICIERY
<%
20
}
}
catch(Exception e){
System.out.println(e);
}
finally{
if(con!=null)
{
con.close();
}
}
%>
</select><br>
<input type="submit" value="PROCEED">
<center>
</form>
</body>
</html>
==================================================
===================================
TRANSFER MONEY(TRANSFERMONEY1.JSP)
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"
import= "java.sql.*" import= "java.util.*" import="p.*"
import ="java.text.*"%>
<!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">
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;
21
}
if(isNaN(x))
{
alert("Enter the valid Amount");
return false;
}
if (parseFloat(x)>parseFloat(y))
{
alert("AMOUNT EXCEEDING LIMITS");
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>
ENTER THE AMOUNT:<input type="text" name="amt">
THE LIMIT:
<%
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");
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) %>>
22
<%
}
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)
%>>
<%
}
}
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>
==================================================
===================================
23
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"/>
<SCRIPT type="text/javascript" src="rightclick.js"></SCRIPT>
24
==================================================
===================================
return false;
}
return true;
</script>
</head>
<body>
<jsp:include page="include.jsp" flush="true"/>
<form method="post" action="Controller" name="login">
25
==================================================
===================================
==================================================
===================================
26
27
}
if (x.charAt(0)!="9"&&x.charAt(0)!="8"&&x.charAt(0)!="7")
{
}
}
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>
==================================================
===================================
ADDING BENEFICIARY (BENEFICIERY.JSP)
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"
import= "java.sql.*" import= "java.util.*" import="p.*"
import="java.lang.*"%>
<!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">
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=="")
{
alert("ALL Fields Should Be filled");
return false;
}
28
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>
validateName()">
</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
</form>
29
<%
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>
<%
}
elseif(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();
}
}
}
}
%>
30
</body>
</html>
==================================================
===================================
MODIFY BENEFICIARY (BENEFICIERY1.JSP)
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"
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>
</head>
<body>
<jsp:include page="include.jsp" flush="true"/>
<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>
31
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
{
%>
%>
<script
type="text/javascript">alert("NO BENIFICIERY
<%
}
}
catch(Exception e){
System.out.println(e);
}
finally{
if(con!=null)
{
con.close();
}
}
%>
</select><br>
<input type="Submit" value="Modify Beneficiary">
</form>
</body>
</html>
==================================================
===================================
MODIFY BENEFICIARY (BENEFICIERY2.JSP)
32
33
type="text/javascript">alert("NO BENIFICIERY
<%
}
}
catch(Exception e){
System.out.println(e);
}
finally{
if(con!=null)
{
con.close();
}
}
34
%>
</select><br>
<form action="benemodify2.jsp">
SET THE LIMITS:<input type="text" name="limit" /><br />
<input type="submit" value="CHANGE" />
</form>
</body>
</html>
==================================================
===================================
REMOVE BENEFICIARY (BENEFICIERY2.JSP)
35
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>
<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>
<li>Select benificiay to remove:</li>
<li><select name="AA" class="toolheader">
<option ></option>
<%
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
{
%>
36
EXIST")</script>
<script
type="text/javascript">alert("NO BENIFICIERY
<%
}
}
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>
</html>
==================================================
===================================
BILLPAYMENTS (TRANSBILL.JSP)
37
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>
<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>
==================================================
===================================
NEW ACCOUNT OPENING PAGE (NEWREGISTRATION.JSP)
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"
import= "java.sql.*" import= "java.util.*" import="p.*"
import="java.lang.*"%>
38
</script>
</head>
<body bgcolor="#E6E6FA">
<jsp:include page="include.jsp" flush="true"/>
<%
Integer i=(Integer)session.getAttribute("A");
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>
<form method="post" action="Controller" name="reg" >
<BR>LOGIN ID: <input type="text" name="log" ><br>
<BR>PASSWORD: <input type="password" name="pas" ><br>
<BR>RETYPE PASSWORD: <input type="password" name="rpas"><br>
39
==================================================
===================================
CONTROLLER
import java.io.IOException;
import java.util.*;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.*;
import p.*;
40
import javax.servlet.*;
import javax.servlet.http.*;
public class Controller extends javax.servlet.http.HttpServlet implements
javax.servlet.Servlet {
static final long serialVersionUID = 1L;
public Controller() {
super();
}
protected void function(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
String userAction=req.getParameter("action");
if(userAction.equals("LOGIN")){
search(req,res);
}
else if(userAction.equals("OPEN ACCOUNT")){
open(req,res);
}
else if(userAction.equals("PAY")){
pay(req,res);
}
else if(userAction.equals("TRANSFER")){
transfer(req,res);
}
else if(userAction.equals("CHANGE NAME")){
nameu(req,res);
}
41
42
}
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");
}
else if(userAction.equals("TYPE HERE TO PROCEED")){
req.setAttribute("file","login.jsp");
rd=req.getRequestDispatcher("main.jsp");
}
rd.forward(req,res);
}
}
protected void doGet(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
function(request,response);
}
protected void doPost(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
function(request,response);
}
protected void open(HttpServletRequest req,HttpServletResponse res)throws
ServletException, IOException {
43
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");
PDAO pdao=new PDAO();
Integer i=pdao.reg(personn,log,pas,nwac);
PDAOU pdaou=new PDAOU();
session.setAttribute("A",i);
PersonInfo person=new PersonInfo();
RequestDispatcher
rd=req.getRequestDispatcher("newregistration.jsp");
rd.forward(req,res);
}catch(Exception e){System.out.println(e);}
}
protected void transfer(HttpServletRequest req,HttpServletResponse
res)throws ServletException, IOException {
try{
PDAOU pdaou=new PDAOU();
PDAO pdao=new PDAO();
PersonInfo person=new PersonInfo();
float name=Float.parseFloat(req.getParameter("amt"));
Integer nam=Integer.parseInt(req.getParameter("option"));
44
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);}
}
protected void pay(HttpServletRequest req,HttpServletResponse res)throws
ServletException, IOException {
try{
PDAOU pdaou=new PDAOU();
PDAO pdao=new PDAO();
PersonInfo person=new PersonInfo();
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());
45
session.setAttribute("ATT", personlist);
RequestDispatcher
rd=req.getRequestDispatcher("afterlogin.jsp");
rd.forward(req,res);
}catch(Exception e){System.out.println(e);}
}
protected void emailu(HttpServletRequest req,HttpServletResponse
res)throws ServletException, IOException {
try{
PDAOU pdaou=new PDAOU();
PersonInfo person=new PersonInfo();
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");
46
rd.forward(req,res);
}catch(Exception e){System.out.println(e);}
}
protected void mobileu(HttpServletRequest req,HttpServletResponse
res)throws ServletException, IOException {
try{
PDAOU pdaou=new PDAOU();
PersonInfo person=new PersonInfo();
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);
47
}catch(Exception e){System.out.println(e);}
}
protected void nameu(HttpServletRequest req,HttpServletResponse
res)throws ServletException, IOException {
try{
PDAOU pdaou=new PDAOU();
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);}
}
48
}catch(Exception e){System.out.println(e);}
}
49
==================================================
===================================
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 class PDAO implements Serializable {
estabcon();
}
private void estabcon()
{
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con
=DriverManager.getConnection("jdbc:odbc:abc","root","root");
}catch(Exception e){ }
}
public int reg(ArrayList a,String log,String pass,Integer nwac) throws
SQLException
{
Integer i=0;
try{
if(!rs.next())
{
PersonInfo per=(PersonInfo)a.get(0);
sql="insert into custp values('"+log+"','"+pass+"')";
51
stmt=con.createStatement();
stmt.executeUpdate(sql);
sql="insert into cust values("+nwac+",'"+log+"')";
stmt=con.createStatement();
stmt.executeUpdate(sql);
sql="insert into custd values('"+log+"','"+per.getcname()
+"','"+per.getcadd()+"',"+per.getcmobile()+")";
stmt=con.createStatement();
stmt.executeUpdate(sql);
sql="insert into accd values("+nwac+",0,"+per.getbcode()
+")";
stmt=con.createStatement();
stmt.executeUpdate(sql);
sql="update acc set cac=cac+1";
stmt=con.createStatement();
stmt.executeUpdate(sql);
i= 1;
}
catch(Exception e){
52
System.out.println(e);
}
finally{
if(con!=null)
{
con.close();
}
}
return i;
}
public ArrayList<PersonInfo> retrieve(String id,String pass) throws
SQLException
{
ArrayList<PersonInfo> a=new ArrayList<PersonInfo>();
try{
53
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{
54
55
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);
}
56
}
}
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;
import java.util.*;
57
import java.text.*;
public class PDAOU implements Serializable{
}catch(Exception e){ }
}
/*
*
mysql> create table accd(cac integer(14),bal float(10,2),bcode
integer(5));
create table widep(cac integer(14),ddate date,dtime time,type
varchar(1),
amount float(10,2)
*/
58
try{
String sql="update accd set bal=bal-"+name+" where
cac=" + nname;
Statement stmt=con.createStatement();
stmt.executeUpdate(sql);
DateFormat dateFormat = new SimpleDateFormat("yyyyMM-dd");
Date date = new Date();
String dat=dateFormat.format(date);
dateFormat = new SimpleDateFormat("HH:mm:ss");
String tim=dateFormat.format(date);
sql="insert into widep
values("+nname+",'"+dat+"','"+tim+"','W',"+name+")";
stmt=con.createStatement();
stmt.executeUpdate(sql);
sql="update accd set bal=bal+"+name+" where cac=" +
rec;
stmt=con.createStatement();
stmt.executeUpdate(sql);
dateFormat = new SimpleDateFormat("yyyy-MM-dd");
date = new Date();
dat=dateFormat.format(date);
59
catch(Exception e){
System.out.println(e);
}
finally{
if(con!=null)
{
con.close();
}
}
return a;
}
public ArrayList uppay(Integer nname,Float name,ArrayList a) throws
SQLException
{
try{
String sql="update accd set bal=bal-"+name+" where
cac=" + nname;
Statement stmt=con.createStatement();
60
stmt.executeUpdate(sql);
DateFormat dateFormat = new SimpleDateFormat("yyyyMM-dd");
Date date = new Date();
String dat=dateFormat.format(date);
dateFormat = new SimpleDateFormat("HH:mm:ss");
String tim=dateFormat.format(date);
sql="insert into widep
values("+nname+",'"+dat+"','"+tim+"','W',"+name+")";
stmt=con.createStatement();
stmt.executeUpdate(sql);
}
catch(Exception e){
System.out.println(e);
}
finally{
if(con!=null)
{
con.close();
}
}
return a;
}
public void emailupd(String nname,String name) throws SQLException
{
61
try{
String sql="update custp set pass='"+name+"' where
cid=" + nname;
Statement stmt=con.createStatement();
stmt.executeUpdate(sql);
}
catch(Exception e){
System.out.println(e);
}
finally{
if(con!=null)
{
con.close();
}
}
}
public void nameupd(String nname,String name) throws SQLException
{
try{
String sql="update custd set cname='"+name+"' where
cid=" + nname;
Statement stmt=con.createStatement();
stmt.executeUpdate(sql);
62
catch(Exception e){
System.out.println(e);
}
finally{
if(con!=null)
{
con.close();
}
}
}
public void mobileupd(String nname,Long name) throws SQLException
{
try{
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)
{
63
con.close();
}
}
SNAP SHOTS
64
65
66
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.
67
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.
68