Chad Sample Guide
Chad is a simple voting service. It has two perspectives; a user
perspective & an administration perspective. The user perspective is the
default one, which allows a user to vote for a particular poll, as well as
view the results of a poll. In addition, in the administration perspective,
an authorized administrator can;
- Create new polls
- Start polls (which have been stopped)
- Stop polls (which are currently active)
- Create accounts for new administrators
one vote per poll is allowed for a particular IP
, and the poll results can be compared using the bar graphs
and the relevant percentages of votes each choice has received. If you try
voting again using the same IP you will be directed to the poll results page,
also including the line, "We have already received a vote for this poll from
your IP address. Hence you are not eligible for voting" below the results
- CARBON_HOME : Directory to which you installed WSO2 AppServer.
- MGT_CONSOLE_URL : This is the URL that will be used to access the
management console. This will be
https://localhost:9443/carbon. This can vary depending on your installation
type and the configuration.
- CHAD_URL : This URL is used to open the CHAD GUI Application. This will
DEPLOYING THE CHAD SERVICE
To build the samples you need the
- First install WSO2 AppServer (See
Installation Guide for details).
- In the command prompt go to
ant at the command prompt.
- Execute the WSO2 AppServer starting script.
- Check your WSO2 AppServer instance using this URL
Now you will have the Chad service deployed on WSO2 AppServer. You can check
this by going to the
and clicking on the "Manage -> Service -> List" link on
the left menu. If you see the Chad service listed here, then you know for
sure that Chad is active/deployed.
RUNNING THE WEB BASED CHAD CLIENT
You can run the client using a Web browser interface.
- Run the WSO2 AppServer Server (See
for instructions on installation)
- You can get to the WSO2 AppServer Management Console, sign in,
then click on "Manage -> Service -> List" link on the left menu. As Chad service is
already deployed you will see the service listed on the page.
To run the chad client visit
this url will take you to the web based UI of
(See User Guide for details for details)
- Now you will see the user view of the Chad system as shown below. If
there are no Active polls, then the page will read as "No polls present". An active poll is a poll open for voting. A normal user
can vote using the "Vote" action. He can also see
poll results by clicking on the particular poll title.
- Do an Administrator Login with the given default username and password
to have access to administrator privileges to the Chad system. Once
logged in as Admin you will have access to the following features
- Active polls- lists polls that are open for voting. Here you have
the option of either stopping the poll or
voting. If you click on the name of the poll it will list the
- Create a poll
available are 'Single Choice' where one
can only vote for a single choice and 'Multiple Choice' where one can
vote for one or more choices.
Note: Once a poll is created it is automatically open for voting.
Voting is open until explicitly closed using
- All Polls - lists all polls created
click on the particular poll
listed on any of the Polls lists pages. You will get a page as shown
action you can close voting after
which one cannot vote for that particular poll. Once stopped, the
link will appear under 'Action' column
replacing both Stop and Vote action links.
action reopens a poll for voting.
action will take you to a page as shown below
from which one can vote for his/her preferred choice. This can happen
for either a
single type vote
multiple type vote
For single type vote:
For multiple type vote:
Stopped polls- lists polls that have been closed for voting (polls
that one cannot vote for).
- Administrators - allows the user to add new administrators
Using this option you can add new administrators, as well as check the
list of current administrators.
Using mozilla firefox is recommended when running this sample.