1.ABSTRACT
2.INTRODUCTION
3.ABOUT ORGANISATION
4.SRS DOCUMENT
5.DESIGN PRINCIPLES & EXPLANATION
6.DESIGN DOCUMENT
6.1 SYSTEM DESIGN
6.2 FEASIBILITY STUDY
7.PROJECT DICTIONARY
7.1 UML DIAGRAMS
7.2 E-R DIAGRAMS
8.FORMS & REPORTS
8.1 I/O SPECIMENS
8.2 I/O SAMPLES
9.TESTING
ShoutBox
CONCLUSION
12.
BIBLIOGRAPHY
ShoutBox
ShoutBox
group
(many-to-many)
communication
in
collaborative
meetings.
System
work
user
can
sessions
open
or
and
online
control
4
ShoutBox
needs
Servlets/JSP.
Client
side
could
be
is
fast,
reliable,
scalable,
fully
over
the
internet
or
your
local
office
computer network
This application is totally web-based, making it the
thinnest client possible. It's simple to install on the
ShoutBox
Administration
panel:
in
config.
file.
One
web
page
to
open
room.
One
web
page
to
add/remove/update
moderators.
One
web
page
to
update/close/monitor
page
to
backup
chatrooms.
One
web
chatrooms.
Multiple
chatrooms:
ShoutBox
Blacklist
is
available
for
each
chatroom too.
subject,
messages
and
(allowed
or
max.
users,
not),
private
display
mode
URL Filter
hyperlink
in
the
chatroom
content)
and
moderators.
Users management :
Moderator users can list users per chatroom.
They
can
(temporary)
ban
(definitively)
some
users.
Kicked
or
kickoff
users
are
ShoutBox
System
management:
login,
password,
filename
and
users
others
timeout,
advanced
Clients:
Basically, ShoutBox provides 4 HTML/JavaScript
skins: Mutlilanguage, classic (simple text skin),
mIRC (mIRC look and feel), j-TV (graphical
skin).
It
also
(Multilanguage,
Comics).
Clients
includes
eXtremeSUN,
could
be
Applet
skins
Manga
FLASH5&6
and
or
ShoutBox
ShoutBox
Existing System:
There is no existing system. Here we have
developed this application just to provide chat
rooms to chat different kind of moderators. This
is a system provides all the basic features of a
Chatting System.
Proposed System:
The first step of analysis process involves the
identification of need. The success of a system
depends largely on how accurately a problem is
defined, thoroughly investigated and properly
carried out through the choice of solution.
ShoutBox supports multiple chatrooms. You
can open new chatroom by following "open a
chatroom" link. You can manage a chatroom by
selecting the chatroom in the list box named
"Manage chatroom". You can backup all
chatrooms by following "Backup chatrooms"
link.
You can add/remove/update moderators. A
moderator is defined by an username (login), a
password and an email. Email field is not
mandatory. Links between moderators and
chatrooms could be configured in chatroom
10
ShoutBox
ShoutBox
12
ShoutBox
13
ShoutBox
14
ShoutBox
Introduction
Purpose: The purpose of this
document is to describe all external
requirements for the ShoutBox. It also
describes the interfaces for the system.
1.1
15
ShoutBox
ShoutBox
application
Tested platforms :
Servlet
Engine
WebServer
JVM
OS
SUN Win32
1.2.2_007
Tomcat
Apache
SUN - Solaris
3.2.4
1.3.14
1.3_01
2.7
Tomcat
Apache
SUN - Solaris
3.3.1
1.3.14
1.3_01
2.7
Tomcat
Tomcat
SUN Win32
4.0.3
4.0.3
1.3_02
Tomcat
Apache
SUN - Solaris
4.0.6
1.3.17
1.4.1
2.7
Tomcat
Tomcat
SUN Win32
4.1.18
4.1.18
1.3.0
Tomcat
Tomcat
SUN Win32
5.0.16
5.0.16
1.4.1
SUN Resin 1.2.3 Resin 1.2.3
Win32
1.2.2_007
SUN Resin 2.1.6 Resin 2.1.6
Win32
1.3_02
SUN JRun 3.01 JRun 3.01
Win32
1.2.2_007
SUN JRun 4.0
JRun 4.0
Win32
1.3_02
ServletExec NES-IPlanet SUN Win32
3.1
4.1 SP5 1.2.2_006
SunONE SunONE 7.0 SUN - Win32
Tomcat 3.1 Tomcat 3.1
17
ShoutBox
7.0
Weblogic
5.1 SP9
Weblogic
6.0 SP2
Weblogic
6.1
Weblogic
7.0 SP1
WebLogic
5.1 SP9
WebLogic
6.0 SP2
WebLogic
6.1
Weblogic
7.0 SP1
WTE 3.5.3
WTE 3.5.3
1.3.1
SUN Win32
1.2.2_007
SUN Win32
1.3.0
SUN Win32
1.3.1
BEA Win32
1.3.1
IBM Win32
1.2.2
IBM HTTP
IBM Server
1.2.2
1.3.12
IBM HTTP
WebSphere
Server
IBM - 1.3
4.0.2
1.3.19
WebSphere WebSphere
IBM - 1.3
5.0
5.0
SUN Orion 1.5.2 Orion 1.5.2
1.3.1
WebSphere
3.5.3
Win32
Win32
Win32
Win32
18
ShoutBox
timeout,
user
session
id,
default
language, updated password.etc.
1.4
Reference: Not Applicable.
1.5
Developers
Responsibilities
overview: The points that mentioned in
system requirements specification are
An introductory nature describing
mainly the
1.
Purpose
of
requirements
document.
Outlining
the
the
system
specifications
scope
of
the
envisaged application.
Describes the iterations of the
system with its environment without
going into the internals of the system.
Also describes the constraints imposed
on the system. Thus it is out side the
envisaged application. The assumptions
made are also listed. It is supported by
the
2.
UML Diagrams
19
ShoutBox
Deals
with
performance
requirements of the system. Contains
the design constraints composing of
software constraints and hardware
constraints.
5.
2.
General Description
Application
functional
overview:
ShoutBox
you
can
launch
it
and
create/manager/monitor chat rooms. You
20
ShoutBox
2.3
21
ShoutBox
Function Requirements
22
ShoutBox
4.
23
ShoutBox
Performance Requirements
24
ShoutBox
25
ShoutBox
6.
Design constraints
6.1
Software constraints
Operating System
:
Windows2000 Server/
XP.
Reports
: General Reports
Other Applications
:
Tomcat WebServer or
BEA WebLogic
Server
6.2
7.
Hardware Constraints
Pentium Processor
Intel 2.0 GHZ
RAM
Hard Disk
CD/ROM Drive
52 Bit
VDU
Key Board
Standard
:
:
:
256MB
40 GB
:
:
:
VGA
101
Acceptance Criteria
26
ShoutBox
SERVLETS
Introduction to web applications:
HTTP is used by the browsers to communicate with
the web servers. In place of browser we can develop
our own programs using Socket API to communicate
with a web server.
According to HTTP the user agent/http client/browser
sends a request for a resource and gets back
response. According to the protocol the web
server/http server sends the response with a status
code. Most of the web servers are configured not to
list the contents of a directory. Almost every web
server provides an option of defining a list of files as
welcome files.
TOMCAT:
Tomcat_home is a directory in which TOMCAT is
installed. Ex:
C:\Tomcat\Tomcat5.0 (most it look like C:\ jakartatomcat-5.0.19/jakartatomcat27
ShoutBox
ShoutBox
ShoutBox
30
ShoutBox
ShoutBox
32
ShoutBox
Copy
the
servlet
classes
under
WEB_APP_ROOT/WEB-INF/classes
Modify web.xml by adding the information about
the servlet element as
<servlet>
<servlet-name>servlet1</servlet-name>
<servlet-class>class of servlet</servlet-class>
33
ShoutBox
</servlet>
<!-- mapping our servlet -->
<servlet-mapping>
<servlet-name>servlet1</servlet-name>
<url-pattern>/serv1</url-pattern>
</servlet-mapping>
We can use any url pattern like * or *.do or *.xyz
etc ex:
<url-pattern>/*</url-pattern>
To get the name of the user agent we can use
stringbuffer = request.getHeader(USER_AGENT);
We can get the list of all headers using
Java.util.Enumuration
list
=
request.getHeaderNames
To invoke a servlet from our applications
( standalone java apps/applets/ servlet/ejb )
Establish a socket connection with web server
Send http request to the server
Read the response
Servlets are initially designed to extend any type of
server (web server/ ftp server / smtp ) but almost
all the companies has implemented this technology
to extend http servers.
In object oriented projects to eliminate redundancy
we will be using class hierarchy as,
34
ShoutBox
35
ShoutBox
ShoutBox
HttpServletRequest
and
HttpServletResponce
contains methods specific to http and same as with
ftp. If we create a servlet as subclass of
GenericServlet we may need to write common code
like converting the reference of type ServletRequest,
ServletResponce
to
HttpServletRequest
and
HttpServletResponce.
This can be eliminated by creating our servlet as a
subclass of javax.servlet.http.HttpServlet. Inside the
servlet containers our servlets are pointing by using
reference of type javax.servlet.Servlet.
Whenever a method is called on an object the JVM
will start searching for the method from the class
based on which the object is created. If it is not
available then the method will be searched in the
super class. The containers always calls the methods
exposed by Servlet interface.
init(ServletConfig) {
init() }
37
ShoutBox
service(ServletRequest, ServletResponce) {
service(HttpServletRequest,HttpServletResponce) }
service(HttpServletRequest,HttpServletResponce) {
doXXX() }
The
implementation
of
doXXX
methods
of
HttpServlet sends an error to the user agent. To
report an error from our servlets we can use
response.SendError(status code)
Before we start development of any solution we need
to understand the business requirements and
functional
specifications.
We
can
use
request.getParameter to get values sumbitted using
a form. Instead of using System.out for debugging
its better to use log method. The data will be stored
in a destination like in a log file or as database. To
know the location of log file we need to read the
documentation of the container.
Typical sequence of steps we carry out in a servlet to
process the form
Read the input parameters
Validate the input
Process the input
Generate the view.
Instead of hard coding we can place the information
as servlet initialization parameters or context
parameters.
If multiple servlets uses the same set of parameters
instead of placing them as servlet initialization
parameters we can use context parameters.
<context-param>
38
ShoutBox
<param-name>name1</param-name>
<param-value>value1</param-value>
</context-param>
getInitparameter() available in ServletContext will be
getting the initialization parameters configured as
context parameters.
ServletContext scon = getServletContext();
url = scon.getInitParameter(dburl)
1st line gets the reference of servlet context
2nd line gets context parameter.
We can add any no of context parameters in web.xml
file. The web container is responsible for reading
context parameters from web.xml and places them
in ServletContext. For every servlet the container is
responsible for creating ServletConfig and stores the
init parameters in this object.
public class init extends HttpServlet {
public void doGet() {
HttpServletRequest req;
HttpServletResponce res;
out.getInitParameters(name);
}
public void init(ServletConfig config) throws
ServletException{
System.out.println(ServletConfig.getInitParameter(
name);
}
Above code in doGet() will be failing to get the initial
parameters. To avoid this failure we need to add
super.init(config) if init method is overridden.
39
ShoutBox
ShoutBox
Cookies
Sessions using cookies
Sessions using URL rewriting.
We can use <input type= hidden name=n1
value=v1> as part of our html forms. Browser will
not be developing the info about the hidden fields. If
there are too many no of forms more amount of N/W
traffic will be generated if we use hidden fields.
Cookie is a piece of info set by the server on the
client using http. We can use response.setCookie() to
set a cookie on a browser, to get the cookies we can
use request.getCookie()
Steps to set cookie:
Create a cookie object cookie c1 = new
cookie(name, value)
Add the cookie response.addCookie(name)
Cookies are mainly used to serve personalized
content according to user requirement.
Problems:
If used heavily this generate more N/W traffic
There are some limitations in some browsers in
maximum no of cookies per domain.
It is not advisable to store sensitive info using
cookie. When we execute response.addCookie(), it
adds set-cookie header to the response. Browser
sends back the cookie as part of request header as,
cookies
name1=value1&name2=value2
Most of the browsers provide an option of allowing or
denying the cookies. Most of web application
developers display a message saying that their web
application works properly if the cookies are allowed.
41
ShoutBox
ShoutBox
ShoutBox
44
ShoutBox
ShoutBox
ShoutBox
47
ShoutBox
JSP
Most of the web developers deploying web
applications
using servlets mixes the presentation logic and
business logic. Separation of business logic from
presentation logic helps us in simplifying the
development of application( web authors can
48
ShoutBox
49
ShoutBox
ShoutBox
51
ShoutBox
ShoutBox
ShoutBox
54
ShoutBox
55
ShoutBox
ShoutBox
ShoutBox
58
ShoutBox
59
ShoutBox
60
ShoutBox
ShoutBox
components.
The
highest-level
62
ShoutBox
modules,
the
bottom-up
approach
is
63
ShoutBox
64
ShoutBox
65
ShoutBox
66
ShoutBox
Function specification
Desig
n
Behavioral specification
Code
Test
Procedural design
67
ShoutBox
Primary
design
is
concerned
with
the
to
68
ShoutBox
69
ShoutBox
tool in the
projects.
construction
of
large
software
ShoutBox
ShoutBox
methods
presentation
are
of
processing
completely
acceptable
and
by
72
ShoutBox
clients
have
been
involved
during
system
will
certainly
objectives
and
it
will
satisfy
also
the
enhance
their capability.
The
system
current
operation
documentation
can
is
and
be best
requires
needed
to
fitted
little
make
into
bit
our
proposed
system
is
completely
user
friendly.
Economical Feasibility: This includes an
evaluation of all incremental costs and
73
ShoutBox
ShoutBox
75
ShoutBox
MODERATORS
76
ShoutBox
CHATROOMS
ShoutBox supports multiple chatrooms. You
can open new chatroom by following "open a
chatroom" link. You can manage a chatroom by
selecting the chatroom in the list box named
"Manage chatroom". You can backup all
chatrooms by following "Backup chatrooms" link.
See the screen below to locate these features.
Note that you can logout the administration
77
ShoutBox
OPEN A CHATROOM
You need severals parameters (basics and
advanced) to open a new chatroom :
Name : The name of the chatroom.
Subject : The subject of the chatroom.
78
ShoutBox
ShoutBox
80
ShoutBox
MANAGE A CHATROOM
Once the chatroom is opened you can update
some parameters : Subject, History, Refresh
Model, Refresh Limit, Private Messages,
Language, Filters and Moderators. The update
occurs in real time, as soon as you click on
"Update" button.
You can generate a transcript (text file dump) of
the chatroom through the Transcript form. Fill in a
transcript filename and click on "Generate". The
81
ShoutBox
82
ShoutBox
USERS
You can list users through "Users" link. You will
learn about Name, IP Address, User Agent
(Netscape, Internet Explorer,...) and last
accessed time (in seconds) of any logged user.
You can also kickoff or ban any user. "kickoff"
means that the user will be kicked off the
chatroom for a few seconds only. He could join the
chatroom again. "ban" means that user's IP
Address will be banned. He couldn't join the
83
ShoutBox
SYSTEM PROPERTIES
You can modify ShoutBox system properties
(ShoutBox.xml) through the administration GUI
below. Once saved, modifications will be taken into
account on the next login.
Backup file : Backup filename of ShoutBox.
Chatrooms' dump will be stored there.
Log folder : Log folder of ShoutBox. Log files will
be stored there.
System login : SYSTEM login. Default is system.
You should modify it.
System email : SYSTEM email.
TimeOut : User's session timeout in seconds.
(e.g. if an user closes its browser then he will
84
ShoutBox
85
ShoutBox
86
ShoutBox
UML Diagrams
87
ShoutBox
88
ShoutBox
89
ShoutBox
90
ShoutBox
91
ShoutBox
92
ShoutBox
ShoutBox
ShoutBox
ShoutBox
ShoutBox
97
ShoutBox
98
ShoutBox
99
ShoutBox
project
is
developed
using
JSPs/Java
deportment
of
SAPARNA
100
ShoutBox
time
as
well
as
manpower. The
time
for
101
ShoutBox
102
ShoutBox
: Thinking in JAVA
( Bruce Eckel )
: Wrox Publications
Volume I and II
An Integrated Approach to
Software Engineering : Pankaj Jalote
103
ShoutBox
Introduction to System
Analysis and Design
: I.T.Hawryszkiewycz
: UML in 24 Hours
Book
Some preferred websites
www.bruceeckel.com
www.sun.com/j2ee/mailapi
www.sun.com/j2se
104