You are on page 1of 55

1.

Introduction
1.1 About Project

Back to my Village is a web application where the charity group of professionals


will communicate over the internet to plan and track the developmental activities
which are undertaken by the organization. The members should actively participate in
the meetings and formulation of the developmental activities which are to be
implemented. The members should contribute funds for the financial support of the
organization to implement the developmental activities. The people can also take part
in the organizational activity by joining as volunteers in the organization and can
actively participate in the group meetings and other activities. The group also runs a
monthly magazine which is mailed to all the members and anyone who visits the
website can subscribe it for free.

The anonymous user can check for the updates in the site and can join as the
volunteer in the organization. Feedback can be given by any person who has visited
the web site.

The application is completely developed in struts framework and it uses the


database to store the details of the members and other organizational details.

2. Project Analysis
2.1 Purpose of the Project
Back to my Village is a web application where the charity group of professionals
will communicate over the internet to plan and track the developmental activities
which are undertaken by the organization. The members should actively participate in
the meetings and formulation of the developmental activities which are to be
implemented.
The main purpose of the project is to facilitate the communication between the
members in the organization. The members will communicate through the discussion
forum through the website. The group also runs a monthly magazine which is mailed
to all the registered members and anyone who has subscribed it.
2.2 Existing System
The existing system has only the functionalities of viewing the organizational
details and check for the updates which are updated in the website. It does not allow
the registered members to communicate with one another over the internet. It is only
an information provider but does not help in assessing the current situation and to
chalk out the plans of action for the future.
2.2.1. Problem in Existing System
 Lack of membership and login facility in the website.
 Lack of registration and profile management
 There is no communication between the members
 The course of development of plan of action is not automated.
 Feedback is not considered.
2.3 Proposed System
Proposed system provides a solution to existing system by extending its facilities
as follows:
 Members can be registered and can login with their accounts.
 Secure registration and profile management.
 The members can communicate over the internet using the discussion
forum
 The plan of actions can be chalked out over the internet
 Feedback can be given by anyone who has visited the website

3. Requirement Analysis
3.1 Purpose and Scope
Purpose:
Providing online communication facility to the members of the organization.
Scope:
Providing accessibility to all members who have registered. This system also
provides the following facilities such as:
 Subscription of newsletter by any user.
 Feedback can be given by anyone who visited the system
 View the organizational information
3.2 Users of the System
 Anonymous
 Group member
 Volunteer
 Administrator
1. Secure registration and profile management facilities for group members
Every group member and volunteer has a secure registration form which has
server side validations. The values are dynamically stored in the database and also
provided with the facility of editing the profiles.
2. Tracking member’s activities and progress.
The members can be in touch with one another over the internet and keep
track the activities which are done by the other members.
3. Facilitating communication - Discussion forum/chat/mail – very important
The registered members are facilitated with the discussion forum where they
can communicate about the plans. They can add topics for discussions and can
also add post to the existing topics.
4. Assessment of current situation: With the help of online questionnaires,
members need to access the maturity of primary education, health facilities
etc. and based on the assessment need to categorize (total 5 categories) and
chalk out a plan of actions by choosing from system suggested activities.
By assessing the current situation, the group decides to launch the programs
depending on the need and the condition of the village. There are total seven
activities which are implemented by the group which covers the primary
education, health facilities, financial help etc.
5. Each plan of actions would be shared with other members before execution
so that they can share their experiences, feedbacks and suggestions.
Feedback can be given by anyone who has visited the system. The views of
the members can be shared in the discussion forum.
6. Group promotes its activities by providing online information and Face-to-
face meetings with professionals to raise funds.
The meetings are conducted to raise the funds and to launch the new
activities in the villages. The date of the meeting is announced prior to the
meeting so that everybody can freely participate in the meetings.
7. Members are advised to develop a volunteers group in the village so that
they can monitor, stabilize the changes and report to you.
The volunteers are also encouraged to join in the group by providing the
login for them to access the web site. They can actively participate in the
developmental activities.
8. Group also runs a monthly magazine and mails it to all members and those
who had subscribed. Anyone can subscribe for it for free.
The group runs a monthly magazine which is mailed to all the registered
members. It can also be subscribed by the anonymous user for free.

4. Specific Requirements
4.1Functional and Non- Functional Requirements
Functional Requirements:
 Secure registration and profile management facilities for group members

 Tracking member’s activities and progress.


 Facilitating communication - Discussion forum/chat/mail – very
important

 Assessment of current situation: With the help of online questionnaires,


members need to access the mature ness of primary education, health
facilities etc. and based on the assessment need to categorize (total 5
categories) and chalk out a plan of actions by choosing from system
suggested activities.

 Each plan of action would be shared with other members before execution
so that they can share their experiences, feedbacks and suggestions.

 Your creativity is required to frame the activities in each field. For


example, to promote child education one can start giving scholarship to
top 3 students in each class, you can also award best teachers on the basis
of class result etc. These activities may be executed in many phases.

 Group promotes its activities by providing online information and Face-to-


face meetings with professionals to raise funds. They create case studies
and share with everyone to motivate them to contribute.

 Members are advised to develop a volunteers group in the village so that


they can monitor, stabilize the changes and report to you.

 Group also runs a monthly magazine and mails it to all members and those
who had subscribed. Anyone can subscribe for it for free.
Non-functional Requirements:
 24*7 availability
 Better component design to get better performance at peak time
 Flexible service based architecture will highly desirable for future
extension.
4.2User Interface Requirements
 Professional look and feel
 Use of AJAX at least with all registration forms
 Browser testing and support for IE, NN, Mozilla, and Fire fox.
 Reports exportable in .XLS, or any other desirable format.

4.3 System Architecture:


HOME
PAGE

LOGIN PAGE MEMBER


FEED BACK

REGISTE
R FUNDS

MEETINGS
MEMBER TRAINING

MEDICARE
PROFILE

CATEGORIES ACTIVITIES

TOPICS HELP DESK GRAMEEN SWAGRUHA


A LOAN

MISSION
POSTS HELP DESK
PURIFICATION
5. System Requirements
5.1. Technologies Used:
 UML
 J2EE
 XML
 JavaScript
 Structs
UML:
The Unified Modeling Language (UML) is an open method used to specify,
visualize, construct and document the artifacts of an object-oriented software-
intensive system under development.[1] UML offers a standard way to write a
system's blueprints, including conceptual components such as:
 Actors,
 Business processes and
 System’s components and activities

J2EE:
Java Platform, Enterprise Edition or Java EE is a widely used platform for server
programming in the Java programming language. The Java EE Platform differs from
the Java Standard Edition Platform (Java SE) in that it adds libraries which provide
functionality to deploy fault-tolerant, distributed, multi-tier Java software, based
largely on modular components running on an application server.

XML:
XML (Extensible Markup Language) is a general-purpose specification for
creating custom markup languages. It is classified as an extensible language, because
it allows the user to define the mark-up elements. XML's purpose is to aid
information systems in sharing structured data, especially via the Internet.
5.2. Tools Used:
 Eclipse 3.3
 Tomcat 5.5
 Oracle 10G
 Rational Rose 98

ECLIPSE 3.3:
Eclipse is a multi-language software development platform comprising an IDE
and a plug-in system to extend it. It is written primarily in Java and is used to develop
applications in this language and, by means of the various plug-ins, in other
languages as well—C/C++, Cobol, Python, Perl, PHP and more.

TOMCAT 5.5:
Apache Tomcat (or Jakarta Tomcat or simply Tomcat) is an open source Servlet
container developed by the Apache Software Foundation (ASF). Tomcat implements
the Java Servlet and the JavaServer Pages (JSP) specifications from Sun
Microsystems, and provides a "pure Java" HTTP web server environment for Java
code to run.

ORACLE 10G:
The Oracle Database (commonly referred to as Oracle RDBMS or simply Oracle)
consists of a relational database management system (RDBMS) produced and
marketed by Oracle Corporation. Oracle had become a major presence in database
computing.

RATIONAL ROSE 98:


The Rational Rose Family of products is the Market-leading UML modeling tools
for software design. The IBM Rational Rose family is IBM’s classic UML modeling
and model-driven development solution, and is ideal for customers wishing to
integrate with legacy integrated development environments or languages.
6. System Design
6.1Data Flow Diagrams:
6.1.1 E- R Diagrams:

user

i
s
a
member Administrato Anonymus
r

i
s
a Ad
updat ds/
es del
Group volenteer
Member etes

vie
ws
ha Activities
s Village profile

comm
unicat
ess
Village Attribute1 Attri
name bute3
populatio
Discussion n
forms
Attribute
profiles Sarpanch 2
name
catageory
profil
topic e phone
s

login email
6.2. Behavioral Diagrams
6.2.1. Use Case Diagrams
A use case is a methodology used in system analysis in identify, clarify, and
organize system requirements. The use case is made up of a set of possible
sequences of interactions between systems and users in a particular environment
and related to a particular goal.
Use-case diagram:

stores information updates


data base
Attend meetings

retrive information

Raises funds
user
handle data base

plans activities
Administrator manage groups

runs a monthly magazine add/delete members

Anonymous views information

subscribe monthly magazine

Fig :6.2.1.Use Case diagram for Back To My Village

Description:
Name of the Use Case: views information
Description: Every user of BTMV should be able to know information about
developmental activities so that awareness can be increased
Post condition: Information about the vllage details will be displayed
Flow of events:
 Select the District
 Select the village
Name of the Use Case: view own details
Description: Every registered member can view his own details like profile
Pre Condition: The user must already be registered one.
Post condition: Profile of user is displayed
Flow of events:
 Click on login by providing userid and password.
 If valid then profile page is displayed with a link to edit profile.
Alternative Flow of Events:
 If the user doesn’t exist then goto registration page to get
registered.
 If the User Forgot password he can retain the password by clicking
on Forgot Password link.
.
6.2.2 Class Diagram
A class diagram is an illustration of the relationships and source code
dependencies among classes in the unified modeling language. In this context, a
class defines the methods and variables in an object, which is a specific entity in a
program or the unit of code representing that entity.
Class diagram
Member
(from reflect)
Admin
member id name
password id
password
get info()
submit()

adds

Group member volunter


first name first name Village profile
last name last name updates village name
has
email id email id sarpanch
phone no phone population

get info() get info() add()


communicates through views
has has

Discussion Form
Activity
catagery
profile attribute1
topics
posts first name attribute2
last name attribute3
comunicate() email id
phone add activity()

show info()

Fig 6.2.2: Class Diagram for Back To My Village


6.2.3. Collaboration Diagram
A collaboration diagram also called a communication diagram or interaction
diagram is an illustration of the relationships and interactions among software
objects in the unified modeling language.

Members:

5: Plans Activities

1: login
Member Website

4: gets info

3: Display information 2: requests information


6: Implements Activities
7: Returns Progress

DataBase
Activity

Fig 6.2.3.1: Members


Administrator:

1: Log in
Administrator
Website

5: gets information

4: Shows Request
2: Update DataBase

6: Handle Request
3: Checks Request
DataBase

7: Sends information
user

Fig 6.2.3.2: Administrator


6.2.4 Sequence Diagrams
Sequence diagram is a diagram that shows object interactions arranged in
time sequence. In particular it shows objects participating in the interaction and the
sequence of messages exchanged.
Sequence diagram for Member

Member Website DataBase Activity

login requests information

Display information

gets info

Plans Activities

Implements Activities

Returns Progress

Fig6.2.4.1: Sequence diagram for member registration and login


Sequence diagram for Administrator:

Administrator Website DataBase user

Log in
Update DataBase

Checks Request
Shows Request

gets information

Handle Request
Sends information

Fig6.2.4.2: Sequence diagram for administrator


6.2.5Activity Diagrams
These diagrams illustrates the behavior corresponding to an interface,
Collaboration or a class hence in this way it reflects the dynamic aspects of a
system of a given system to be modeled.

Members:

Enter id and
Password

Checks
NO YES Performs his
works

Fig6.2.5.1: Activity diagram for Member


Administrator:

Administrator
Login

Views Logs

Wants to modify YES Provide necessary


inputs to the site

Controll
database

NO

Fig6.2.5.2: Activity diagram for administrator


6.3 System Specific Modules
There are five modules in our project. They are:
1. REGISTRATION
 Group Member or volunteer who ever want to get services from
our website are to be registered
 They can view their profile and update it.
2. AUTHENTICATION
 User must provide valid userid and password to login to system
 The userid password entered will be checked with database.They
must match with userid and password given during registration
time.
 If they are matched user is authenticated and access is granted
3. ANONYMOUS
 Anonymous can view the organizational information
 Can select the village and district to know the details.
 Can subscribe the newsletter.
 User can know about the recent updates.
4. DONATE
 This is a part of members module.
 Whenever the user wants to donate, a form appears.
 After filling the details ,the values are dynamically updated
5. DISCUSSION FORUM
 This is a part of members module.
 The members communicate through the discussion forum
 They can add new topics.
 They can post their replies for the existing topics.
 They can also view the existing replies and posts.
7. Screens:
Home

Login page:
Group Member Registration:

G
Volunteer Registration:

Funds:
Meetings:
Activities:
Feedback:

Feedback Accepted:
Village Details:
Members Page:

Donate List:
New Donate:

Profile:
Discussion forum:

Add Topic:
8. Source code

Feedback.jsp:
<%@ page contentType="text/html; charset=Cp1252" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-nested" prefix="nested" %>
<%@page import="java.sql.Connection"%>
<%@page import="java.sql.Statement"%>
<%@page import="java.sql.ResultSet"%>

<%@page import="Registration.Connection1"%>
<html:html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=Cp1252"/>
<title></title>
<script src="SpryAssets/SpryMenuBar.js"
type="text/javascript"></script>

<script type="text/javascript" src="date.js"></script>


<script type="text/javascript"
src="scrpt.js"></script>
<link href="SpryAssets/SpryMenuBarHorizontal.css"
rel="stylesheet" type="text/css" />
<link href="SpryAssets/SpryTabbedPanels.css"
rel="stylesheet" type="text/css" />
<link href="style.css" rel="stylesheet" type="text/css"
media="screen" />
<style type="text/css">
<!--
.style3 {font-size: 18px}
.style4 {color: #FF0000}
-->
</style>
</head>
<body>
<div id="main">
<!-- start header -->
<div id="header">
<div id="logo">
<h1>Back To My Village</h1>
<h2>-empowering villages</h2>
</div>
<table width="983" BORDER="0" cellpadding="0"
cellspacing="0">
<tr>
<td width="159" height="39">&nbsp;</td>
<td width="818"><ul id="MenuBar1"
class="MenuBarHorizontal">
<li><a href="./home.jsp">Home</a> </li>
<li><a href="./login.jsp">Login</a></li>
<li><a class="MenuBarItemSubmenu" href="#">Members</a>
<ul>
<li><a class="MenuBarItemSubmenu" href="#">Join
as</a>
<ul>
<li><a href="./registrationmember.jsp">Group
Member</a></li>
<li><a
href="./registrationvalanteer.jsp">Volunteer</a></li>
</ul>
</li>
<li><a href="./memberlist.jsp">Members List</a></li>
<li><a href="./photogallery.htm">Photo Gallery</a></li>
<li><a href="./funds.jsp">Funds</a></li>
<li><a href="./meetings.jsp">Meetings</a></li>
</ul>
</li>
<li><a href="#" class="MenuBarItemSubmenu">Activities</a>
<ul>
<li><a href="./activities.jsp?cat=a1">Teach For India</a></li>
<li><a href="./activities.jsp?cat=a2">Mission
Purification</a></li>
<li><a href="./activities.jsp?cat=a3">MediCare</a></li>
<li><a href="./activities.jsp?cat=a4">Grameen Loan</a></li>
<li><a href="./activities.jsp?cat=a5">Swagruha</a></li>
<li><a href="./activities.jsp?cat=a6">Help Desk</a></li>
<li><a href="./activities.jsp?cat=a7">Training</a></li>
</ul>
</li>
<li><a href="./feedback.jsp">Feedback</a> </li>
</ul></td>
</tr>
</table>
</div>
<div id="page">
<!-- start leftbar -->
<div id="leftbar" class="sidebar">
<%String loggedin3=(String)session.getAttribute("loginname") ;
if(loggedin3==null) {%>
<h2>Latest News</h2>
<div class="back">

<table width="200" border="0">


<tr>
<td><a href="./meetings.jsp">A meet on "Swagruha"</a></td>
</tr>
<tr>
<td><a href="./meetings.jsp">Launching "Training" in Tanuku</a></td>
</tr>
<tr>
<td><a href="./funds.jsp">New Donations for the BTMV</td>
</tr>
<tr>
<td><a href="./memberslist.jsp">Check out the members</td>
</tr>
</table>

</div>
<%}else{ %>
<%
String posi=request.getParameter("uid");
System.out.println(posi);
String user="";
String pname="";
if(posi==null)
user=(String)session.getAttribute("loginname");
else{
user=posi;
try{
Connection1 a=new Connection1();
Connection con=a.getConnection();
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select loginname from
btmv_registration where userid='"+user+"'");
rs.next();
user=rs.getString(1);
}catch(Exception e){
e.printStackTrace();
}
}
int i=0;
try{
Connection1 a=new Connection1();
Connection con=a.getConnection();
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select userid,photoname from
btmv_registration where loginname='"+user+"'");
rs.next();
i=rs.getInt("userid");
pname=rs.getString(2);
}catch(Exception e){
System.out.print("executed in catcg");
}
%>
<h2>Profile</h2>

<div class="back">

<table width="200" border="0">

<tr>
<td height="221">&nbsp;<center><a href="./profile.jsp?uid=<
%=i %>"><img src="./users/<%=pname %>" width="150" height="150"
border="0"> </a></center></td>

</tr>

<tr>
<td><div align="center"><a href="profile.jsp?uid=<%=i
%>">Profile</a></div></td>
</tr>
<tr>
<td><div align="center"><a
href="donate.jsp">Donate</a></div></td>
</tr>

</table></div>
<%} %>
<div class="bottom"></div>
<h2>Google Search</h2>
<div class="back">
<form id="form1" name="form1" method="post"
action="http://www.google.com/search">
<table width="200" BORDER="0" cellpadding="0" cellspacing="0">

<tr>
<td align="center"><label>
<input type="text" name="search" id="search" />
</label></td></tr>
<tr>
<td align="center"><label>
<input type="submit" name="button" id="button"
value="Search" />
</label></td>
</tr>
</table>
</form></div>
<div class="bottom"></div>
</div>
<div id="content">
<div class="post">
<p class="style3">&nbsp;</p>
<html:form action="/feedback" method="POST">
<table width="397" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2"><div align="center">Feedback</div></td>
</tr>
<tr>
<td width="175"><div align="right">Name :</div></td>
<td width="216"><label>
<html:text property="name"></html:text><font
color="red"><html:errors property="name" /></font>
</label></td>
</tr>
<tr>
<td><div align="right">Email :</div></td>
<td><label>
<html:text property="email"></html:text><font
color="red"><html:errors property="email" /></font>
</label></td>
</tr>
<tr>
<td><div align="right">Comment :</div></td>
<td><label>
<html:textarea property="comment"></html:textarea><font
color="red"><html:errors property="comment" /></font>
</label></td>
</tr>
<tr>
<td colspan="2"><label>
<div align="center">
<html:submit></html:submit>
</div>
</label></td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</html:form>
</div></div>

<div id="rightbar" class="sidebar">


<h2>Village Details</h2>
<div class="back">
<html:form action="/villagedetails">
<table width="200" BORDER="0" cellpadding="0" cellspacing="0">
<tr>
<td width="58" align="right">District</td>
<td width="78" align="left"><label>
<html:select property="district"
onchange="fun(this.value)">
<html:option value="0">Select</html:option>
<%try{
Connection1 a=new Connection1();
Connection con=a.getConnection();
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select
distinct(district) from btmv_villageprofile order by district asc");
while(rs.next()){String district=rs.getString(1);%>
<html:option value="<%=district %>"><%=district %>
</html:option><%

}
}catch(Exception e){

e.printStackTrace();
}%>
</html:select>
</label></td>
</tr>
<tr>
<td align="right">Village</td>
<td align="left"><label>
<html:select property="village1" onchange="x()">
<html:option value="0">select</html:option>
</html:select>
</label></td>
</tr>
<tr>
<%String
loggedin2=(String)session.getAttribute("loginname");
if(loggedin2==null){
%>

<td colspan="2"><div align="center"><html:link


action="beavalanteer">Be a Valanteer</html:link></div></td>
<%} %>
</tr>
</table>
</html:form>
</div>

<%String loggedin1=(String)session.getAttribute("loginname") ;
if(loggedin1==null) {%>
<div class="bottom"></div>
<h2>Newsletter</h2>
<div class="back">
<html:form action="/subscrib" onsubmit="return check1()">
<table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><label>
<html:text property="email" value=""></html:text>
</label></td>
</tr>
<tr>
<td align="center"><label>
<html:submit value="Subscribe"></html:submit>
</label></td>
</tr>
</table>
</html:form></div><div class="bottom"></div>
</div>
<%}else{ %>
<% String user1=(String)session.getAttribute("loginname");
int j=0;String fullname="";
try{
Connection1 a=new Connection1();
Connection con=a.getConnection();
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select userid,firstname,lastname
from btmv_registration where loginname='"+user1+"'");
rs.next();
j=rs.getInt(1);
String firstname=rs.getString("firstname");
String lastname=rs.getString("lastname");
System.out.println("executed");
fullname=firstname+" "+lastname;
}catch(Exception e){
System.out.print("Cach Block");

}%>
<div class="bottom"></div>
<h2>Profile Manager</h2>
<div class="back">
<table width="200" border="0" cellpadding="0" cellspacing="0">

<tr>
<td><div align="center"><a href="./login.jsp"><%=fullname
%></a>[<a href="./logout.jsp">Sign out</a>]</div></td>
</tr>
<tr>
<td><div align="center"><a href="./forum.jsp">Discussion
Forum</a></div></td>
</tr>
<tr>
<td><div align="center"><a
href="./donate.jsp">Donate</a></div></td>
</tr>
<tr>
<td><div align="center"><a href="./editprofile1.jsp">Edit
Profile</a></div></td>
</tr>
</table>
</div><div class="bottom"></div>
</div>
<%} %>
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end page -->
<div id="footer">
<p align="center">BTMV:ILLUMINATORS2010</p>
</div>

<script type="text/javascript">
<!--
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1",
{imgDown:"SpryAssets/SpryMenuBarDownHover.gif",
imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
//-->
</script>
</body>
</html:html>

Feedbackbean.java:
package feedback;
import java.util.regex.Pattern;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
public class feedbackbean extends ActionForm {
public feedbackbean() {
// TODO Auto-generated constructor stub
}
String name,email,comment;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getComment() {
return comment;
}
public void setComment(String comment) {
this.comment = comment;
}
public ActionErrors validate(ActionMapping map,HttpServletRequest req){
ActionErrors actionErrors = new ActionErrors();
if(name==null||name.equals(""))
actionErrors.add("name",new ActionMessage("name"));
if(email==null||email.equals(""))
actionErrors.add("email",new ActionMessage("emailblank"));
else{
Pattern patte=Pattern.compile("[a-z|A-Z][a-z|A-Z|0-9|_|.]*@[a-z|
A-Z]+.[a-z|A-Z|.]+");
java.util.regex.Matcher mat=patte.matcher(email);
int i=0;
String sub="";
int count=0;
for(i=0;i<email.length()-2;i++){
sub=email.substring(i, i+2);
System.out.println(sub);
if(sub.equals("@"))
count++;
if(sub.equals("..")||sub.equals("._")||sub.equals("_.")||
sub.equals("__")){
actionErrors.add("email",new
ActionMessage("emoginse"));
i=1;
break;
}}
if(count>2&&i!=1)
actionErrors.add("email",new
ActionMessage("emailcount"));
if(!mat.matches()&&i!=1)
actionErrors.add("email",new
ActionMessage("emailinvalid"));
}
if(comment==null||comment.equals(""))
actionErrors.add("comment",new ActionMessage("comment"));
return actionErrors;
}
}

FeedbackAction.java:
package feedback;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import Registration.Connection1;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
public class feedbackAction extends Action {
public ActionForward execute(ActionMapping map,ActionForm
f,HttpServletRequest req,HttpServletResponse res){
feedbackbean b=(feedbackbean)f;
String name=b.getName();
String email=b.getEmail();
String comment=b.getComment();
int i=0;
try{
Connection1 obj=new Connection1();
Connection con=obj.getConnection();
Statement st=con.createStatement();
i=st.executeUpdate("insert into btmv_feedback
(name,emailid,comments)values('"+name+"','"+email+"','"+comment+"')");
}catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}
if(i==1)
return map.findForward("success");
else
return map.findForward("failure");

}
struts-config.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD
Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-
config_1_2.dtd">
<struts-config>
<data-sources>
</data-sources>
<form-beans>
<form-bean name="subscribe" type="subscribe.subscribeform"></form-
bean>
<form-bean name="sample" type="Registration.RegidsterBean"/>
<form-bean name="valanteer" type="Registration.valanteerbean"/>
<form-bean name="sample3" type="feedback.feedbackbean"/>
<form-bean name="sample2" type="Registration.LoginBean"></form-bean>
<form-bean name="sample1" type="addtopic.addtopicbean"></form-bean>
<form-bean name="postbean" type="addpost.addpostbean"></form-bean>
<form-bean name="update" type="updateprofile.updateBean"></form-bean>
<form-bean name="village"
type="villagedetails.villagedetailsbean"></form-bean>
<form-bean name="photoupdate"
type="photochange.photochangeBean"></form-bean>
<form-bean name="donate" type="donate.donateBean"></form-bean>
</form-beans>
<global-exceptions>
</global-exceptions>
<global-forwards>
</global-forwards>
<action-mappings>
<action path="/login" forward="/login.jsp">
</action>
<action path="/newdonate" forward="/newdonate.jsp"></action>
<action path="/beavalanteer"
forward="/registrationvalanteer.jsp"></action>
<action path="/Registration" name="sample"
type="Registration.RegisterAction" scope="request" validate="true"
input="/registrationmember.jsp">
<forward name="success" redirect="true" path="/newuser.jsp"/>
<forward name="failure" redirect="true" path="/failure.jsp"/>
</action>
<action path="/logincheck" type="Registration.Loginnameverify">
<forward name="success" path="/response.jsp"/>
</action>
<action path="/loginuser" name="sample2"
type="Registration.LoginAction" scope="request" validate="true"
input="/login.jsp">
<forward name="success" path="/login.jsp" redirect="true"></forward>
<forward name="failure" path="/login.jsp" redirect="true"></forward>
</action>
<action path="/subscrib" name="subscribe"
type="subscribe.subscribeaction">
<forward name="success" path="/thanku_subscribe.jsp"
redirect="true"></forward>
</action>
<action path="/valanteer1" name="valanteer"
type="Registration.valanteerAction" scope="request" validate="true"
input="/registrationvalanteer.jsp">
<forward name="success" redirect="true" path="/newuser.jsp"/>
<forward name="failure" redirect="true" path="/failure.jsp"/>
</action>
<action path="/feedback" name="sample3"
type="feedback.feedbackAction" scope="request" validate="true"
input="/feedback.jsp">
<forward name="success" redirect="true"
path="/thanku_feedback.jsp"/>
<forward name="failure" path="/failure.jsp"/>
</action>
<action path="/category" forward="/topics.jsp"></action>
<action path="/posts" forward="/posts.jsp"></action>
<action path="/home" forward="/forum.jsp" ></action>
<action path="/addtopic" forward="/addtopic.jsp"></action>
<action path="/add" name="sample1" type="addtopic.addtopicaction">
<forward name="success" path="/topics.jsp"></forward>
<forward name="failure" path="/failure.jsp"></forward>
</action>
<action path="/addpost" name="postbean" type="addpost.addpostaction">
<forward name="success" path="/posts.jsp"></forward>
<forward name="failure" path="/failure.jsp"></forward>
</action>
<action path="/update" name="update" type="updateprofile.updateAction"
validate="true" scope="request" input="/editprofile1.jsp">
<forward name="success" path="/profile.jsp"></forward>
</action>
<action path="/donate" name="donate" type="donate.donateAction"
scope="request" validate="true" input="/newdonate.jsp">
<forward name="success" path="/donate.jsp" redirect="true"></forward>
</action>
<action path="/getvillages" type="villagedetails.addvillages">
<forward name="success" path="/response1.jsp"></forward>
</action>
<action path="/villagedetails" name="village"
type="villagedetails.villagedetailsaction">
<forward name="success" path="/villagedetails1.jsp"
redirect="true"></forward>
</action>
<action path="/changephoto" forward="/changephoto.jsp"></action>
<action path="/removephoto" type="updateprofile.photoremove">
<forward name="success" path="/profile.jsp" redirect="true"></forward>
</action>
<action path="/photoupdate" name="photoupdate"
type="photochange.photochangeAction">
<forward name="success" path="/profile.jsp" redirect="true"></forward>

</action>
</action-mappings>
<controller
processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>
<message-resources parameter="MessageResources"/>
<plug-in className="org.apache.struts.tiles.TilesPlugin">
<set-property property="definitions-config" value="/WEB-INF/tiles-
defs.xml"/>
<set-property property="moduleAware" value="true"/>
</plug-in>
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames" value="/WEB-INF/validator-
rules.xml,/WEB-INF/validation.xml"/>
</plug-in>
</struts-config>

MessageResources.properties:
# -- standard errors --
errors.header=<UL>
errors.prefix=<LI>
errors.suffix=</LI>
errors.footer=</UL>
# -- validator --
errors.invalid={0} is invalid.
errors.maxlength={0} can not be greater than {1} characters.
errors.minlength={0} can not be less than {1} characters.
errors.range={0} is not in the range {1} through {2}.
errors.required={0} is required.
errors.byte={0} must be an byte.
errors.date={0} is not a date.
errors.double={0} must be an double.
errors.float={0} must be an float.
errors.integer={0} must be an integer.
errors.long={0} must be an long.
errors.short={0} must be an short.
errors.creditcard={0} is not a valid credit card number.
errors.email={0} is an invalid e-mail address.
# -- other --
errors.cancel=Operation cancelled.
errors.detail={0}
errors.general=The process did not complete. Details should follow.
errors.token=Request could not be completed. Operation is not in
sequence.
# -- welcome --
welcome.title=Struts Blank Application
welcome.heading=Welcome!
welcome.message=To get started on your own application, copy the struts-
blank.war to a new WAR file using the name for your application. Place
it in your container's "webapp" folder (or equivalent), and let your
container auto-deploy the application. Edit the skeleton configuration
files as needed, restart your container, and you are on your way! (You
can find the application.properties file with this message in the /WEB-
INF/src/java/resources folder.)
firstname=Firstname is required
lastname=Lastname is required
sex=Gender is Required
date=Invalid Date of Birth
emailblank=Email Required
emailinvalid=Invalid Email
address=Address is Required
citytown=City/Town is Required
pin=Pin is Required
pininvalid=Pin Number should be in digits
pinstart=Starting number should not be zero
pno=Phone No is Required
pnosize=Phone no should be in 10 digits
pnochar=phone no should be in digits
finvalid=first name should be charecters
linvalid=Last name should be charecters
dlogin=Login name is required
dloginsp=No special charecters are allowed.
dloginse=Two subsequent .'s are not allowed
dloginsev=Login name should not start with a number
emoginse=No Two Subsequent .,_'s are not allowed
emailcount=Two @'s are not allowed
cheainvalid=Cheque no is Required
cheainvalid1=Invalid Cheque no
cheaa=Cheque no is Required
district=Ditrict is Required
bank=Please Select Bank
amount=Amount is Required
amounts=Amount should be in digits
dloginavailable=UserName already Exist
username=username is required
password=password is required
comment=comment is required
name=name is required

9. Testing
Test case no: 1 Module: Registration
EXPECTED ACTUAL
S.NO TESTCASE NAME INPUT VALID/INVALID
OUTPUT OUTPUT
1 Firstname values Kriz#jsa First name Invalid invalid
should contain firstname
only characters entered
krishna First name Firstname Valid
should contain value is a
only characters valid one
2 Lastname values Pras#ad Last name Invalid invalid
should contain lastname
only characters entered
prasad Last name Lastname valid
should contain value is a
only characters valid one
3 Desired Loginname kittu It checks with Login name invalid
verified with database the database already
weather this taken
name already invalid
taken by other
user then valid
krishnakittu It checks with Login name valid
the database already
weather this taken
name already invalid
taken by other
user then valid
4 Email value Abc.mail.com Mail id should Invalid mail invalid
be in format of id entered
abc@gmail.com
or
abc@yahoo.com
abc@gmail Mail id should Invalid mail invalid
be in format of id entered
abc@gmail.com
or
abc@yahoo.com

abc@gmail.com Mail id should Valid email vaild


be in format of id
abc@gmail.com
or
abc@yahoo.com
5 Cheque number 56576 Cheque number The entered invalid
should be in the Cheque
form of six number
numbers value is
invalid
Gh6789 Cheque number The entered invalid
should be in Cheque
numbers number
value is
invalid
123456 Cheque number The entered valid
should be in the Cheque
form of six number
numbers value is
valid
6 Amount jdskf Amount should The entered invalid
be in numbers Amount
greater than 0 value is
invalid
10000 Amount should The entered valid
be in numbers Amount
and greater than value is
0 valid
0000 Amount should The entered invalid
be in numbers Amount
and greater than value is
0 invalid
7 Address Address Should Address is invalid
not be empty required
Near Address Should Address is valid
Markendeya not be empty vaild
Temple,Eluru.
8 Phone number 56576 Phone number The entered invalid
should be in the phone
form of ten number
numbers starts value is
with 9 invalid
Gh6789 Phone number The entered invalid
should be in Phone
numbers number
value is
invalid
1234567890 Phone number The entered invalid
should be in the Phone
form of ten number
numbers starts value is
with 9 invalid
9999999999 Phone number The entered valid
should be in the Phone
form of ten number
numbers starts value is
with 9 valid

Test case no: 2 Module: Registration


EXPECTED ACTUAL
S.NO TESTCASE NAME INPUT VALID/INVALID
OUTPUT OUTPUT
1 Firstname values Kriz#jsa First name Invalid invalid
should contain firstname
only characters entered
krishna First name Firstname Valid
should contain value is a
only characters valid one
2 Lastname values Pras#ad Last name Invalid invalid
should contain lastname
only characters entered
prasad Last name Lastname valid
should contain value is a
only characters valid one
3 Desired Loginname kittu It checks with Login name invalid
verified with database the database already
weather this taken
name already invalid
taken by other
user then valid
krishnakittu It checks with Login name valid
the database already
weather this taken
name already invalid
taken by other
user then valid
4 Email value Abc.mail.com Mail id should Invalid mail invalid
be in format of id entered
abc@gmail.com
or
abc@yahoo.com
abc@gmail Mail id should Invalid mail invalid
be in format of id entered
abc@gmail.com
or
abc@yahoo.com
abc@gmail.com Mail id should Valid email valid
be in format of id
abc@gmail.com
or
abc@yahoo.com

5 Address Address Should Address is invalid


not be empty required
Near Address Should Address is valid
Markendeya not be empty valid
Temple,Eluru.
6 Phone number 56576 Phone number The entered invalid
should be in the phone
form of ten number
numbers starts value is
with 9 invalid
Gh6789 Phone number The entered invalid
should be in Phone
numbers number
value is
invalid
1234567890 Phone number The entered invalid
should be in the Phone
form of ten number
numbers starts value is
with 9 invalid
9999999999 Phone number The entered valid
should be in the Phone
form of ten number
numbers starts value is
with 9 valid

Test case no: 3 Module: Feedback


EXPECTED ACTUAL
S.NO TESTCASE NAME INPUT VALID/INVALID
OUTPUT OUTPUT
1 Name values Kriz#jsa Name should Invalid invalid
contain only Name
characters entered
krishna First name Name value Valid
should contain is a valid
only characters one
2 Email value Abc.mail.com Mail id should Invalid mail invalid
be in format of id entered
abc@gmail.com
or
abc@yahoo.com
abc@gmail Mail id should Invalid mail invalid
be in format of id entered
abc@gmail.com
or
abc@yahoo.com

abc@gmail.com Mail id should Valid email vaild


be in format of id
abc@gmail.com
or
abc@yahoo.com

3 Comments Comments Comments invalid


Should not be is required
empty
It is a nice idea Copmments Comments valid
and it is a very Should not be is valid
good project. empty

Test case no: 4 Module: Subscribe


EXPECTED ACTUAL
S.NO TESTCASE NAME INPUT VALID/INVALID
OUTPUT OUTPUT
1 Email value Abc.mail.com Mail id should Invalid mail invalid
be in format of id entered
abc@gmail.com
or
abc@yahoo.com
abc@gmail Mail id should Invalid mail invalid
be in format of id entered
abc@gmail.com
or
abc@yahoo.com
abc@gmail.com Mail id should Valid email vaild
be in format of id
abc@gmail.com
or
abc@yahoo.com

Test case no: 5 Module: Login


EXPECTED ACTUAL
S.NO TESTCASE NAME INPUT VALID/INVALID
OUTPUT OUTPUT
1 Userid and password Krishna The userid and There is no invalid
values kittu password values values in
in database table database it
should match is invalid
then it is valid
Krishna The userid and Userid and Valid
krishnakittu password values password
in database table exist it is
should match valid
then it is valid

10. Conclusion:

The entire project has been developed and deployed as per the requirements stated
by the user, it is found to be bug free as per the testing standards that are implemented.
Any specification – untraced errors will be concentrated in the coming versions, which
are planned to be developed in the near future. The system at present does not take care
of lower level check constraints in accessing the file types in distributed environments,
which is to be considered in the future up gradations.

As per the present status the project is well equipped to handle the central file
system of an organization in the server and provide access to the users with various
privileges as prescribed in the system.

11. Appendix A - Hardware and Software Configurations

Software requirements

Operating system : windows XP/linux

Programming language : JAVA

Serverside script : Jsp,servlets,struts

Clientside script : HTML,javascript

IDE : eclipse

Webserver : Tomcat
Hardware Requirements

Processor : Pentium IV

RAM : 512mb

Harddisk : 40 GB

Appendix B – Data Base Tables


1.btmv_registration:

userid firstnam lastna login pass sex dateof email addre distri type logint photo
e me name word birth ss ct ime name

2.btmv_funds:
userid chequeno amount bank deposittime

3. btmv_subscribers:
emailid subdate
4. btmv_feedback:
name emailid comments

5. btmv_meetings:
activity meetingdate place district

6. btmv_villageprofile:
villaganame District Population Sarpanchname membersinvolved

7.btmv_teachforindia:

villagenam Distric schoolnam noofstudent totalstaff timing amountinvested


e t e s s

8.btmv_missionpurification:

villagename district nooflitres capacity amountinvested

9.btmv_swagruha:

villagename district interestrates noofgroups noofhouses amountinvetsed

10.btmv_grameenloan:

villagename district agriculturalloan smallscaleloan noofgroups amountinvested

11.btmv_medicare:

villagenam distric hospitalnam docto timing avgpatientvisi amountinvested


e t e r s t

12.btmv_helpdesk:

villagename district location peopleemployed amountivested

13.btmv_training:

villagename district period noofgroups activities amountinvested

14.btmv_categories:
sno categoryname categorydesc

15.btmv_topics:

sno b_csno tname tdesc createdtime views userid

16.btmv_posts:

sno b_tsno b_csno postdata posttime userid

17.btmv_albums:

aid aname adesc cdate udate

18.btmv_photos:

pid pname pdes aid udate

Appendix C-Limitations and Enhancements


Limitations:
 Administrator role is not complete.
 Photo Gallery is not up to the mark.
 The role of the member should be much more improved.
 Donate facility for the anonymous should be kept
Enhancements:
 Chatting facility is provided for the members.
 Case studies are designed to generate funds.
 Mail facility is also provided for members.
 Tracking member’s activities.
12. References

The following books and manuals provided a lot of help to us in making this
project a reality.

 The complete Reference Java2 By Patrick Naughton and Herbert Schildt, TMH
Publishing Company Ltd.

 Java How To Program By H.M.Dietel and P.J.Dietel,Pearson Education/PHI

 Data Base Management Systems,Raghurama Krishnan, Johannes Gerhrke,TATA


McGraw-Hill

 Software Engineering By Roger S.Pressman,McGraw Hill International Edition


Pressman

You might also like