50% found this document useful (10 votes)
3K views55 pages

Back To My Village

The document describes a web application called "Back to my Village" that allows members of a charity group to communicate online to plan and track developmental activities. Key features of the application include secure member registration and profiles, a discussion forum for communication, and assessing situations in villages to plan activities. The application is developed using Java technologies like Struts framework, and stores data in an Oracle database. It aims to address limitations in the existing system like a lack of member communication and feedback.

Uploaded by

Ramesh Gavva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
50% found this document useful (10 votes)
3K views55 pages

Back To My Village

The document describes a web application called "Back to my Village" that allows members of a charity group to communicate online to plan and track developmental activities. Key features of the application include secure member registration and profiles, a discussion forum for communication, and assessing situations in villages to plan activities. The application is developed using Java technologies like Struts framework, and stores data in an Oracle database. It aims to address limitations in the existing system like a lack of member communication and feedback.

Uploaded by

Ramesh Gavva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 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 members 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-toface 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 members 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-toface 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
ACTIVITIES

CATEGORIES

TOPICS

POSTS

HELP DESK
MISSION
PURIFICATION

GRAMEEN
A LOAN

SWAGRUHA

HELP DESK

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 softwareintensive system under development.[1] UML offers a standard way to write a
system's blueprints, including conceptual components such as:
Actors,
Business processes and
Systems 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 wellC/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 IBMs 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
r

Anonymus

i
s
a
Group
Member

updat
es
volenteer

Ad
ds/
del
etes

vie
ws
ha
s

Village profile

comm
unicat
ess

Attribute1

Village
name

populatio
n

Discussion
forms
profiles

Sarpanch
name

catageory
profil
e

topic
s
login

phone

email

Activities

Attri
bute3

Attribute
2

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
Attend meetings

data base

updates

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 doesnt 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

Admin
name
id
password

(from reflect)

member id
password
get info()

submit()
adds

Group member
first name
last name
email id
phone no

volunter
first name
last name
email id
phone

get info()
communicates through

get info()
has

Discussion Form
catagery
topics
posts
comunicate()

has

updates

Village profile
village name
sarpanch
population
add()

views
has

profile
first name
last name
email id
phone
show info()

Fig 6.2.2: Class Diagram for Back To My Village

Activity
attribute1
attribute2
attribute3
add activity()

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
Website

Member
4: gets info

3: Display information

2: requests information

6: Implements Activities
7: Returns Progress

DataBase

Activity

Fig 6.2.3.1: Members

Administrator:

Administrator

1: Log in
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
login

DataBase

requests information
Display information

gets info

Plans Activities

Implements Activities

Returns Progress

Fig6.2.4.1: Sequence diagram for member registration and login

Activity

Sequence diagram for Administrator:

Administrator

Website

DataBase

user

Log in
Update DataBase

Shows Request

Checks 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

NO

Checks
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
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">
<tr>
<td><a
</tr>
<tr>
<td><a
</tr>
<tr>
<td><a
</tr>
<tr>
<td><a
</tr>
</table>

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


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

</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/strutsconfig_1_2.dtd">

<struts-config>
<data-sources>
</data-sources>
<form-beans>
<form-bean name="subscribe" type="subscribe.subscribeform"></formbean>
<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/tilesdefs.xml"/>
<set-property property="moduleAware" value="true"/>
</plug-in>
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames" value="/WEB-INF/validatorrules.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 strutsblank.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 /WEBINF/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


S.NO

TESTCASE NAME

INPUT

Firstname values

Kriz#jsa
krishna

Lastname values

Pras#ad
prasad

Desired Loginname
verified with database

kittu

krishnakittu

Email value

Abc.mail.com

abc@gmail

[email protected]

EXPECTED
OUTPUT
First name
should contain
only characters
First name
should contain
only characters
Last name
should contain
only characters
Last name
should contain
only characters
It checks with
the database
weather this
name already
taken by other
user then valid
It checks with
the database
weather this
name already
taken by other
user then valid
Mail id should
be in format of
[email protected]
or
[email protected]
Mail id should
be in format of
[email protected]
or
[email protected]
Mail id should
be in format of
[email protected]
or
[email protected]

ACTUAL
OUTPUT
Invalid
firstname
entered
Firstname
value is a
valid one
Invalid
lastname
entered
Lastname
value is a
valid one
Login name
already
taken
invalid

VALID/INVALID
invalid
Valid
invalid
valid
invalid

Login name
already
taken
invalid

valid

Invalid mail
id entered

invalid

Invalid mail
id entered

invalid

Valid email
id

vaild

Cheque number

Amount

56576

Cheque number
should be in the
form of six
numbers

Gh6789

Cheque number
should be in
numbers

123456

Cheque number
should be in the
form of six
numbers

jdskf

Amount should
be in numbers
greater than 0

10000

0000

Address

Phone number

Near
Markendeya
Temple,Eluru.
56576

Gh6789

1234567890

invalid

Amount should
be in numbers
and greater than
0
Amount should
be in numbers
and greater than
0
Address Should
not be empty

The entered
Cheque
number
value is
invalid
The entered
Cheque
number
value is
invalid
The entered
Cheque
number
value is
valid
The entered
Amount
value is
invalid
The entered
Amount
value is
valid
The entered
Amount
value is
invalid
Address is
required

Address Should
not be empty

Address is
vaild

valid

Phone number
should be in the
form of ten
numbers starts
with 9
Phone number
should be in
numbers

The entered
phone
number
value is
invalid
The entered
Phone
number
value is
invalid
The entered
Phone
number

invalid

Phone number
should be in the
form of ten

invalid

valid

invalid

valid

invalid

invalid

invalid

invalid

9999999999

numbers starts
with 9

value is
invalid

Phone number
should be in the
form of ten
numbers starts
with 9

The entered
Phone
number
value is
valid

valid

Test case no: 2 Module: Registration


S.NO

TESTCASE NAME

INPUT

Firstname values

Kriz#jsa
krishna

Lastname values

Pras#ad
prasad

Desired Loginname
verified with database

kittu

krishnakittu

Email value

Abc.mail.com

abc@gmail

EXPECTED
OUTPUT
First name
should contain
only characters
First name
should contain
only characters
Last name
should contain
only characters
Last name
should contain
only characters
It checks with
the database
weather this
name already
taken by other
user then valid
It checks with
the database
weather this
name already
taken by other
user then valid
Mail id should
be in format of
[email protected]
or
[email protected]
Mail id should
be in format of
[email protected]
or
[email protected]

ACTUAL
OUTPUT
Invalid
firstname
entered
Firstname
value is a
valid one
Invalid
lastname
entered
Lastname
value is a
valid one
Login name
already
taken
invalid

VALID/INVALID
invalid
Valid
invalid
valid
invalid

Login name
already
taken
invalid

valid

Invalid mail
id entered

invalid

Invalid mail
id entered

invalid

[email protected]

Address
Near
Markendeya
Temple,Eluru.
56576

Phone number

Gh6789

1234567890

9999999999

Mail id should
be in format of
[email protected]
or
[email protected]

Valid email
id

valid

Address Should
not be empty

Address is
required

invalid

Address Should
not be empty

Address is
valid

valid

Phone number
should be in the
form of ten
numbers starts
with 9
Phone number
should be in
numbers

The entered
phone
number
value is
invalid
The entered
Phone
number
value is
invalid
The entered
Phone
number
value is
invalid
The entered
Phone
number
value is
valid

invalid

Phone number
should be in the
form of ten
numbers starts
with 9
Phone number
should be in the
form of ten
numbers starts
with 9

invalid

invalid

valid

Test case no: 3 Module: Feedback


S.NO

TESTCASE NAME

INPUT

EXPECTED
OUTPUT

ACTUAL
OUTPUT

VALID/INVALID

Name values

Kriz#jsa
krishna

Email value

Abc.mail.com

abc@gmail

[email protected]

Comments
It is a nice idea
and it is a very
good project.

Name should
Invalid
contain only
Name
characters
entered
First name
Name value
should contain
is a valid
only characters
one
Mail id should
Invalid mail
be in format of
id entered
[email protected]
or
[email protected]
Mail id should
Invalid mail
be in format of
id entered
[email protected]
or
[email protected]

invalid
Valid
invalid

invalid

Mail id should
be in format of
[email protected]
or
[email protected]

Valid email
id

vaild

Comments
Should not be
empty
Copmments
Should not be
empty

Comments
is required

invalid

Comments
is valid

valid

Test case no: 4 Module: Subscribe


S.NO

TESTCASE NAME

INPUT

Email value

Abc.mail.com

abc@gmail

EXPECTED
OUTPUT
Mail id should
be in format of
[email protected]
or
[email protected]
Mail id should
be in format of
[email protected]
or
[email protected]

ACTUAL
OUTPUT
Invalid mail
id entered

Invalid mail
id entered

VALID/INVALID
invalid

invalid

[email protected]

Mail id should
be in format of
[email protected]
or
[email protected]

Valid email
id

vaild

Test case no: 5 Module: Login


S.NO

TESTCASE NAME

INPUT

Userid and password


values

Krishna
kittu

Krishna
krishnakittu

EXPECTED
OUTPUT
The userid and
password values
in database table
should match
then it is valid
The userid and
password values
in database table
should match
then it is valid

ACTUAL
OUTPUT
There is no
values in
database it
is invalid

VALID/INVALID

Userid and
password
exist 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

invalid

Valid

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

me

name

word

sex

dateof

email

birth

addre

distri

ss

ct

2.btmv_funds:
userid

chequeno

3. btmv_subscribers:
emailid

subdate

amount

bank

deposittime

type

logint photo
ime

name

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
e

Distric
t

schoolnam
e

noofstudent
s

totalstaff

timing
s

amountinvested

8.btmv_missionpurification:
villagename

district

nooflitres

capacity

amountinvested

9.btmv_swagruha:
villagename

district

interestrates

noofgroups

noofhouses

amountinvetsed

noofgroups

amountinvested

avgpatientvisi
t

amountinvested

10.btmv_grameenloan:
villagename

district

agriculturalloan smallscaleloan

11.btmv_medicare:
villagenam
e

distric
t

hospitalnam
e

docto
r

timing
s

12.btmv_helpdesk:
villagename

district

location

peopleemployed

amountivested

13.btmv_training:
villagename

district

14.btmv_categories:

period

noofgroups

activities

amountinvested

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

pname

pdes

aid

udate

18.btmv_photos:
pid

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 members 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