SlideShare a Scribd company logo
1 of 69
WebServer Traffic & Analysis
1. INTRODUCTION
1.1 Project definition
 Webserver Traffic Tracking will also track total no. of visitors , individual visitors , most
popular page , par page visitors , hour bases track no. of visitors , daily bases track no. of visitors
, weekly bases ,time duration and through all information in graphical format file, pie chart, bar
chart etc.
 Webserver Traffic Tracking will try to analyse all run time errors that occur and will maintain
a log file that will produce to help the owner. Owner will also get notification via send Email and
SMS error occurred. log-file will contain name of page, line of code, root cost of exception ,
class , method , date and time so that helpful system admin solve the problem
 A log entry may be used to generate information about the number of hits, visitors, visitor
duration, most requested page, visitor IP address, browser type and version, platform and details
of interaction with the web site
 Many web applications owners has web server problem due to load and traffic on their websites.
Web-application some time hangs or work slow due to large nos. of web-application.
 Webserver Traffic Tracking also manage which users visiting webpage and how many time. ,
view full report to see all of the pages in your website.
ITM UNIVERSE(MCA) Page 1
WebServer Traffic & Analysis
1.2 Existing system
 Visitors whole information are display site owner and issue solver.
 Visitors which page visit , most popular page , per day visitors , per page visitors etc.
 Owner and issue solver receive message when run time errors occure.
1.3 Purpose
 Maintaining the traffic & Analysis.
 Track the traffic & control.
 It will try to analyse all run time errors that occur and will maintain a log file .that will produce
to help the owner & Owner will also get notification via send Email error occurred.
 Owner and issue solver receive message when run time errors occure.
 Issue solver send the message owner when error is solve.
 Owner get the information own site.
 Know the our web application site performance
ITM UNIVERSE(MCA) Page 2
WebServer Traffic & Analysis
1.4 Scope
 This system is basically for implementing at any web application.
 Issue solver solve system problem when run time bug is generate.
 Owner get the traffic details.
 Admin view details when visitor visit site.
 Individual visitor details are view.
1.5 Module of System
1.) Visitor traffic analysis
 Total number of visitors to a site
 Visitor IP address
 Browser type
 Platform
ITM UNIVERSE(MCA) Page 3
WebServer Traffic & Analysis
2.) Visited page traffic analysis
 Most requested pages
 Most requested entry pages
 Most requested exit pages
 Portions of a site visited
3.) Log file
 Time/date request
 duration of the visits
 Error generate
4.) Bug tracking
 Class
 Method
 Line no
 Message
 Page
 Data mismatch
 Error type
ITM UNIVERSE(MCA) Page 4
WebServer Traffic & Analysis
1.6 Advantages of the System
• The web server traffic tracking is an innovative system tool.
• It also provide use to solve the problem occur in web site through online feature.
• It provides to reduce the load on server.
• It is big help of the developer and issue solver because easily get the message on mobile.
• Help to save the time and costs of the issue solver and owner.
• Owner easily get the message or notification on mobile and E-mail.
1.7 Limitation the system
 Only java based applications can run on the system.
 No visitor interaction.
ITM UNIVERSE(MCA) Page 5
WebServer Traffic & Analysis
2 .Requirement Analysis
2.1 Requirement specification
• The analysis of webserver traffic & analysis examine the total number of visitors to a site, day of
site visitors , weekly and monthly visitor visit a site details.
• A log entry may be used to generate information about the number of hits, visitors, visitor
duration, visitor origin (sub domain, referral link), visitor ip_address, browser name and version,
platform, cookies, and details of interaction with the web site.
• Visitor come on site when generate a log file so that log file is contain the visitor sign in time and
sign out time entry generate.
• Log entry may be used to know as a most popular page , which page is most popular and most
exits page.
• Visitors report also get the site owner and when run time errors are occure issue solver get the
message on mobile and solve the problem at the time.
ITM UNIVERSE(MCA) Page 6
WebServer Traffic & Analysis
1. Functional Requirement specification
I. Traffic Analysis
 Admin view visitor details
• Number of hits
• Visitor duration
• Visitors IP address
• Browser types
• Platform
• Authentication user
• Average page duration
• sign in time
• sign-out time
• Total number of visitors sites
 Owner view the details
ITM UNIVERSE(MCA) Page 7
WebServer Traffic & Analysis
• Number of visits, and number of unique visitors
• Daily bases track no. Of visitors
• Weekly bases track no. Of visitors.
• Also get notification E-mail and SMS.
• Most popular page ,page_id and name
• Registered and un registered
• number of page views per visitor
II. Bug Analysis
Issue solver
• Package
• Class
• Method
• Error Line number
• Name of error
• Type of error
• Page name on error
• Error time and date
Owner
• Page name of error
• Error Message
ITM UNIVERSE(MCA) Page 8
WebServer Traffic & Analysis
• Error date & time
Visitor details
• System shall provide access visitor details from selecting ip_address .
• The system shall provide information about total number of visitor, average page view per visits,
average duration per page.
• System will also see view cookies details.
Visited page
• The system shall access visited page details like most entry page, most requested page, most
exits page.
• The system should make some visited path of visitor for viewing the page.
Log file details
• The system should provide a log_entry details of visitor.
ITM UNIVERSE(MCA) Page 9
WebServer Traffic & Analysis
• The system should save visitor information to log file.
• The system should access log file details for specific visitor & all visitor.
Bug management
• The system shall provide notification about bug to owner.
• The system will provide information about general and technical bug message to owner and
admin
2.2 Hardware and software requirement specification
Hardware Requirement
Server
• The minimum hardware as recommended by all of the software required on server side say
web server, operating system and development software
• Processing speed of 1.6 GHz
• 1 GB of RAM
• Network interface
Client
• The minimum hardware as recommended by all of the software required on client side say
web browser, operating system
ITM UNIVERSE(MCA) Page 10
WebServer Traffic & Analysis
• Minimum hardware depending on the operating system used User peripherals for better
interaction
Software Requirement
Server
• Web server software, Apache Tomcat
• Server side scripting tools: jsp , struts
Client side software
• Web browser supporting JavaScript, refer Browser Compatibility.
2.3 About the tool & Technology
 IDE -Net Beans IDE 8.0.2
 Code behind(Business Logic)- java
 View Technology - JSP
 Scripting Language - Java Script, Jquery
 Client Side Technology-CSS,Bootstrap
 Mark-up Language- HTML,XML
ITM UNIVERSE(MCA) Page 11
WebServer Traffic & Analysis
 Notification SMS gateway, Email gateway
 Run Time Environment-JDK 8
 Application Server-Apache Tomcat 6.0.1,Glassfish
 Database Server-MySQL Server 5.5
3. Feasibility Analysis
1) Operational Feasibility
• Operational feasibility measures that how well the solution will work in the organization and also
how end-user will & other user’s feels about the system.
• On studying the operational feasibility of the project, following conclusion can be derived
developed system will provide all the information regarding visitor ,visitor page.
2) Technical Feasibility
• It is trie to answer the following questions to make the software feasible to develop.
• The software or tools necessary for building or running the application is easily available or
not?
• The compatibility amongst software exists or not?
ITM UNIVERSE(MCA) Page 12
WebServer Traffic & Analysis
• Developers aware of these technologies?
• What about the alternative of these chosen technologies?
• So, we should answer above question:
• The Developer environment we are using is JAVA, which is supporting flexibility,
portability and platform independent.
• Because it is made up from the scratch, it supports latest technologies like XML natively.
• Execution of the code is done in managed environment so that applications are safer and
reliable.
• Object oriented approach in most of the languages is like to give more robust coding.
• Moreover, it is supporting various platforms to deploy application.
3) Economically Feasibility
Economically Feasibility address to the following issues:
• Is the organization/owner having the suitable budget to develop the proposed system?
• How much profile can be earned from the system by an organization?
• Would it be cost – effective to develop the system or it is worthwhile to retain with current
system?
4) Time and Schedule Feasibility
• Projects are initiated with specific deadline. We need to evaluate whether the deadlines are
mandatory or desirable. Time is the one of the critical factor in the development of any
system but this kind of feasibility is hardly perfect in any system.
ITM UNIVERSE(MCA) Page 13
WebServer Traffic & Analysis
• We have been asked to complete the project within given period. In the project planning
section we elaborate our ideas to develop the system within the given period. Hence, it is
feasible to develop a system in predetermined time interval.
4. System design
ITM UNIVERSE(MCA) Page 14
WebServer Traffic & Analysis
UML USECASE DIAGRAM
4.1 Class diagram
ITM UNIVERSE(MCA) Page 15
WebServer Traffic & Analysis
4.2 Usecase diagram
ITM UNIVERSE(MCA) Page 16
WebServer Traffic & Analysis
Usecase diagram for visitor
ITM UNIVERSE(MCA) Page 17
WebServer Traffic & Analysis
Usecase diagram for visted page
ITM UNIVERSE(MCA) Page 18
WebServer Traffic & Analysis
Usecase diagram for logfile
ITM UNIVERSE(MCA) Page 19
WebServer Traffic & Analysis
Usecase diagram for Bug
ITM UNIVERSE(MCA) Page 20
WebServer Traffic & Analysis
4.3 Activity diagram
Activity diagram for visitor
ITM UNIVERSE(MCA) Page 21
WebServer Traffic & Analysis
Activity diagram for logfile
ITM UNIVERSE(MCA) Page 22
WebServer Traffic & Analysis
Activity diagram for page visited
ITM UNIVERSE(MCA) Page 23
WebServer Traffic & Analysis
Activity diagram for bug
ITM UNIVERSE(MCA) Page 24
WebServer Traffic & Analysis
4.4 Sequence diagram
Sequence diagram for bug handle
ITM UNIVERSE(MCA) Page 25
WebServer Traffic & Analysis
Sequence diagram for logfile
ITM UNIVERSE(MCA) Page 26
WebServer Traffic & Analysis
Sequence diagram for system
ITM UNIVERSE(MCA) Page 27
WebServer Traffic & Analysis
5. Data Dictionary
Visitor
Attributes Data type Constraints Description
Ip_address Varchar(30) Primary key Visiters Ipaddress
Browser_name Varchar(15) Not null Browser name
Plateform_name Varchar(15) Not null Os_name
Log Id
Attributes Data type Constraints Description
Log_id Integer(5) Primary key Id of log file
SignIn_time Time Not null Signin time
SignOut_time Time Not null Signout time
Date Date Not null Date
Ip_address Varchar(30) Foreign key refers
to Visitor (Ip_address)
Id of visitor
Page_id Integer(5) Foreign key refers
to Page (Page_id)
Page id
ITM UNIVERSE(MCA) Page 28
WebServer Traffic & Analysis
Page
Attributes Data type Constraints Description
Page_id Integer(5) Primary key id of page
Page_name Varchar(20) Not null name of Page
Hits Number Not null Number of hits on
page
Date Date Not null Page visit date
Ip_address Varchar(30) Foreign key refers
To Visitor (Ip_address)
Visiters Ipaddress
Fileupload(drive table)
Attributes Data type Constraints Description
File_id Integer(5) Primary key File id
File_version Varchar(30) Not null Name of file version
File _size LongBLOB Not null File size(4mb)
File_Type Varchar(20) Not null Doc/html etc.
Page_id Integer(5) Foreign key refers
to Page (Page_id)
Id of page
ITM UNIVERSE(MCA) Page 29
WebServer Traffic & Analysis
Bug
Attributes Data type Constraints Description
Bug_id Integer(5) Primary key Error id
Line of number Integer(5) Not null Error line number
Date Date Not null Date
Time Time Not null Time
Root cause
exception(bug type)
Varchar(30) Not null Error type
Error message Varchar(30) Not null Error msg
Page_id Integer(5) Foreign key refers
to Page (Page_id)
Id of page
Method_id Integer(5) Foreign key refers
to Method (Method_id)
Method id
Method
Attributes Data type Constraints Description
Method_id Integer(5) Primary key Method id
Method_name Varchar(15) Not null Method name
Class_id Integer(5) Foreign key refers
To class(class_id)
Class id
ITM UNIVERSE(MCA) Page 30
WebServer Traffic & Analysis
Class
Attributes Data type Constraints Description
Class_id Integer(5) Primary key Class id
Class_name Varchar(15) Not null Name of class
Package_id Integer(5) Foreign key refers
to
package(package_id)
Id of package
package
Attributes Data type Constraints Description
Package_id Integer(5) Primary key Package id
Package_name Varchar(15) Not null Package_name
Admin
Attributes Data type Constraints Description
Id Integer(5) Primary Admin id
Name varchar(20) Not null Name of issue
solver& owner
E-mail Varchar(30) Not null Email of issue
solver& owner
Person_contact
Attributes Data type Constraints Description
ITM UNIVERSE(MCA) Page 31
WebServer Traffic & Analysis
Id Integer(5) Foreign key refers to
admin(id)
Id issue solver &
owner
Contact_no Number Not null Mobil number
Issue solver
Attributes Data type Constraints Description
Id Integer(5) Foreign key refers to
admin(id)
Id of issue solver
Bug_id Integer(5) Foreign key refers to
Bug(bug_id)
Bug_id
Owner
Attributes Data type Constraints Description
Id Integer(5) Primary key Id of owner
ITM UNIVERSE(MCA) Page 32
WebServer Traffic & Analysis
ITM UNIVERSE(MCA) Page 33
WebServer Traffic & Analysis
ITM UNIVERSE(MCA) Page 34
WebServer Traffic & Analysis
Jar file coding
ITM UNIVERSE(MCA) Page 35
WebServer Traffic & Analysis
Create jar file
ITM UNIVERSE(MCA) Page 36
WebServer Traffic & Analysis
Test application
ITM UNIVERSE(MCA) Page 37
WebServer Traffic & Analysis
Website Owner login
ITM UNIVERSE(MCA) Page 38
WebServer Traffic & Analysis
ITM UNIVERSE(MCA) Page 39
WebServer Traffic & Analysis
All Visitor display ipaddress
ITM UNIVERSE(MCA) Page 40
WebServer Traffic & Analysis
Most popular page
ITM UNIVERSE(MCA) Page 41
WebServer Traffic & Analysis
All visitor daily no. of hits.
ITM UNIVERSE(MCA) Page 42
WebServer Traffic & Analysis
Particular visitor visited page
ITM UNIVERSE(MCA) Page 43
WebServer Traffic & Analysis
Particular page per hits
ITM UNIVERSE(MCA) Page 44
WebServer Traffic & Analysis
Date wise visited page
ITM UNIVERSE(MCA) Page 45
WebServer Traffic & Analysis
Error occur on page
ITM UNIVERSE(MCA) Page 46
WebServer Traffic & Analysis
Logfile create
ITM UNIVERSE(MCA) Page 47
WebServer Traffic & Analysis
Owner get the message
ITM UNIVERSE(MCA) Page 48
WebServer Traffic & Analysis
ITM UNIVERSE(MCA) Page 49
WebServer Traffic & Analysis
8. Testing
8.1 Testing Strategies
Testing strategies is a general approach to the testing process rather than method of
devising particular system or components test. Different testing strategies may be adopted
depending on the type of system to be tested and the develop process used. So considering
functional oriented nature of this nature of this software we adopted mixture of following
strategies.
Testing is advantageous in several ways. First, the detects found, help in the process of a
making software reliable. Second, defects found are not corrected, Third, over time, the record
of defects found reveals the most common kinds of defects , which can be used form developing
appropriate preventive measures such as training, proper design and reviewing.
The development process repeats this testing sub-process a number of times for the following
phases:
1. Unit testing
2. Integration testing
3. System testing
4. Acceptance testing
8.1.1 Testing Stage
1. Unit testing:
Unit testing focuses verification effort on the smallest unit of software design the software
component or module. In this type of testing individual modules were tested and verified
ITM UNIVERSE(MCA) Page 50
WebServer Traffic & Analysis
whether accurate output was made available or not. The modules were tested individually as they
could result into faster responses than they were integrated.
2. Integrated testing:
When the unit testing was over, all the modules were integrated one by one and tested as a
whole. If any error occur during testing then it is solved by this testing.
3. Validation testing
Validation testing can be defined in many ways but a simple definition is that a
definition is that a validation succeeds when the software functions in a manner that can be
reasonably accepted by the client.
4. Acceptance Testing
Before delivering the product to the client, it will be tested for stability and correctness of
results. By conducting the fore mentioned test cases, we should be able to conclude on the
reliability of the product before the client test it for acceptance. First tests will also include
testing on the entire database. The client will test the program for criteria mentioned in the next
section before accepting the product.
Specific acceptance criteria (the client expects the following):
• Conformity with the predefined requirements
• Correct data returned from the SQL Server searches.
• Functionality in multiple environments. Since this is a web product, it must be compatible to
various browsers on different systems.
ITM UNIVERSE(MCA) Page 51
WebServer Traffic & Analysis
8.2 Feature Level Testing:
8.2.1 Task-Oriented Functional Tests.
1. The mandatory fields must not be left empty
2. Email-id should contain’@’ and’.’ Characters
3. Date should be in DD/MM/YYYY format.
4. User name and password must match with registered details.
8.2.2 Integration Tests
Components or modules that should be tested independently are following.
1. Browser compatibility.
2. Hardware compatibility.
3. Interface testing.
4. User input testing.
8.2.3 System Level Tests
In system level tests we will use black-box testing since all independent modules or functionalities
are already tested before. System level tests will start after unit and integration testing gets
completed.
8.2.4 Performance Tests
System has certain features that highly affected their takeaway value. These features need to be
tested against its performance.
User response time- should be moderate. It should be in range of 1-5 seconds.
ITM UNIVERSE(MCA) Page 52
WebServer Traffic & Analysis
Basic Test Case
Test Case No Expected Output Actual Output Pass/Fail
1 Form is open Successfully Form is open
Successfully
Pass
2 Window is open normally Window is open
normally
Pass
3 Form looks properly and
uniformly
Form looks properly
and uniformly
Pass
4 Title caption are in normal
font
Title caption are in
normal font
Pass
5 Textbox are aligned
properly
Textbox are aligned
properly
Pass
6 Character Fields are
central justified
Character Fields are
central justified
Pass
7 Buttons are central
justified
Buttons are central
justified
Pass
8 Fonts of all labels and
buttons are same
Fonts of all labels and
buttons are same
Pass
9 Tab order is proper Tab order is proper Pass
10 Form is close successfully
(Using exit Button)
Form is close
successfully
Pass
Test case
Test case
name
Actual Input Expected Output Actual Output Pass/Fail
ITM UNIVERSE(MCA) Page 53
WebServer Traffic & Analysis
Login Email Id and
Password
If valid redirect to
home page.
If not valid give
message to re-
enter username
and password
Successfully
redirect to home
page
Pass
Add Select category,
Company for add
If for given
selection data is
present then
display output or
Add for different
category will be
displayed on Page
in grid.
Pass
Master of
Admin
(Owner , Issue
solver)
Click on any of
these two master
& then can view
data
If user visit a site
then owner get the
details in grid
own panel .
Display details in
grid.
Pass
Log file Visitor visit a site
when error occur.
Error entry in log
file. When run
time error is occur
error entry in
Logfile.txt Pass
Message
Visitor visit a site
when error is
occur.so send the
message in
mobile or email
Get the error
message in
mobile ,which
line no ,and which
error name
Get mail or
message on
mobile..
pass
Graph
Pie chart,
Bar chart,
Multi-line
chart
Graph will show
as per data
retrieved from
database.
Show Chart after
clicking on action
link.
Show the chart in
as per data in
visitor
pass
9. Source code
package projectfiles;
import com.opensymphony.xwork2.ActionSupport;
ITM UNIVERSE(MCA) Page 54
WebServer Traffic & Analysis
public class loginAction extends ActionSupport{
String unm, pwd;
String un="admin";
String pw="admin";
public String login() {
return "login";
}
public String getmenu(){
if(un.equals(unm) && pw.equals(pwd))
{
return SUCCESS;
}
else
{
return ERROR;
} }
// getter and setter -----------------------
public String getUnm() {
return unm;
}
public void setUnm(String unm) {
this.unm = unm;
}
public String getPwd() {
ITM UNIVERSE(MCA) Page 55
WebServer Traffic & Analysis
return pwd;
}
public void setPwd(String pwd) {
this.pwd = pwd;
}
}
Display grap // Owner site
package ActionClass;
import Pojo.visitor_page;
import static com.opensymphony.xwork2.Action.SUCCESS;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;
import java.util.ArrayList;
import javax.servlet.http.HttpServletRequest;
import ChartGrid.*;
public class GridAction extends ActionSupport implements ModelDriven{
private visitor_page bg=new visitor_page();
HttpServletRequest servletRequest;
ArrayList al,al11;
public visitor_page getBg() {
return bg;
}
ITM UNIVERSE(MCA) Page 56
WebServer Traffic & Analysis
public void setBg(visitor_page bg) {
this.bg = bg;
}
public ArrayList getAl() {
return al;
}
public void setAl(ArrayList al) {
this.al = al;
}
public ArrayList getAl11() {
return al11;
}
public void setAl11(ArrayList al11) {
this.al11 = al11;
}
@Override
public visitor_page getModel()
{
return bg;
}
public String GridView()
{
counter_op go=new counter_op();
al=go.view();
ITM UNIVERSE(MCA) Page 57
WebServer Traffic & Analysis
return SUCCESS;
}
}
Method in data grid
public class counter_op {
public ArrayList view() {
SessionFactory sf = new Configuration().configure("hibernate.cfg.xml").buildSessionFactory();
Session session = sf.openSession();
Transaction t = session.beginTransaction();
String hql = "from visitor_page";
System.out.println("----30----");
Query q = session.createQuery(hql);
ArrayList al =(ArrayList)q.list();
return al;
}
public ArrayList Perticular_page_view(String page_name) {
SessionFactory sf = new Configuration().configure("hibernate.cfg.xml").buildSessionFactory();
Session session = sf.openSession();
Transaction t = session.beginTransaction();
String hql = "from visitor_page ac where ac.page_name='"+page_name+"'";
System.out.println("----30----"+hql);
Query q = session.createQuery(hql);
ITM UNIVERSE(MCA) Page 58
WebServer Traffic & Analysis
ArrayList al1 =(ArrayList)q.list();
System.out.println("----30----"+al1);
return al1;
}
public ArrayList Visitior_grid(String ipaddress) {
SessionFactory sf = new Configuration().configure("hibernate.cfg.xml").buildSessionFactory();
Session session = sf.openSession();
Transaction t = session.beginTransaction();
String hql = "from visitor_page ac where ac.ipaddress='"+ipaddress+"'";
System.out.println("----30----"+hql);
Query q = session.createQuery(hql);
ArrayList al11 =(ArrayList)q.list();
return al11;
}
public ArrayList getPiePageHits() {
SessionFactory sf = new Configuration().configure("hibernate.cfg.xml").buildSessionFactory();
Session session = sf.openSession();
Transaction t = session.beginTransaction();
String hql = "from visitor_page ac";
System.out.println("----30----"+hql);
ITM UNIVERSE(MCA) Page 59
WebServer Traffic & Analysis
Query q = session.createQuery(hql);
ArrayList al2 =(ArrayList)q.list();
return al2;
}
}
public String[] getInfo(Exception e) // error class name,method name , line no
{
String msg=e.getMessage();
String classname = e.getStackTrace()[0].getClassName();
String method =e.getStackTrace()[0].getMethodName();
String data[]={msg,classname,method};
System.out.println(" "+msg+" "+classname+" "+method);
return data;
}
E-mail send
public void sendEmail(String to,String from,String pass,String smtp,String port,String msg)
ITM UNIVERSE(MCA) Page 60
WebServer Traffic & Analysis
{
//Get the session object
Properties props = new Properties();
props.put("mail.smtp.host", smtp);
props.put("mail.smtp.socketFactory.port", port);
props.put("mail.smtp.socketFactory.class",
"javax.net.ssl.SSLSocketFactory");
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.port", port);
Session session = Session.getInstance(props,new javax.mail.Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(from,pass);//change accordingly
}
});
Logentry en=new Logentry(ctx);
StackTraceElement l =e.getStackTrace()[0];
en.printintoLog("CLASS NAME:="+l.getClassName());
en.printintoLog("METHOD NAME:="+l.getMethodName());
en.printintoLog("LINE NO:="+l.getLineNumber());
en.writeIntoLog("CLASS NAME:="+l.getClassName()+"n");
en.writeIntoLog("METHOD NAME:="+l.getMethodName()+"n");
ITM UNIVERSE(MCA) Page 61
WebServer Traffic & Analysis
en.writeIntoLog("LINE NO:="+l.getLineNumber()+"n");
en.printintoLog("Log is create ");
en.printintoLog("--------------------------");
String msg=e.getMessage();
HttpSession hs=req.getSession();
String pname=(String) hs.getAttribute("pagename");
Sms s1=new Sms();
Email e1 = new Email();
e1.sendEmail("nitesh.kanojiya2416@gmail.com", "nitesh.kanojiya2416@gmail.com", "niteshexam",
"smtp.gmail.com","465","laundrycare Error msg:"+msg+"n"+
"pagename:"+pname+"n"+
"Class Name:"+l.getClassName()+"n"+
"Method name:"+l.getMethodName()+"n"+
"Line no:"+l.getLineNumber()+"n");
s1.sendSMS("918401405806","laundrycare Error msg:"+msg+"n"+"pagename:"+pname+"n"+
"Class Name:"+l.getClassName()+"n"+
"Method name:"+l.getMethodName()+"n"+
"Line no:"+l.getLineNumber()+"n");
LogEntry
ITM UNIVERSE(MCA) Page 62
WebServer Traffic & Analysis
public class Logentry {
static String logFileName; // both package level to enable testing
static String errorLogFileName;
static FileWriter logWriter;
static FileWriter errorWriter;
DataOutputStream dos;
BufferedWriter br=null;
//For use in Servlet Context Logging
static ServletContext innerContext;
public Logentry(ServletContext inServletContext) throws IOException {
//Store incoming Context + Set Logging Flag
this.innerContext= inServletContext;
logFileName= this.innerContext.getRealPath("/")+"LogFile.txt";
errorLogFileName = this.innerContext.getRealPath("/")+"ErrorLogFile.txt";
//Create the files
logWriter = new FileWriter(logFileName,true); //append data
errorWriter = new FileWriter(errorLogFileName,true); //append
dos=new DataOutputStream(new FileOutputStream(errorLogFileName,true));
br=new BufferedWriter(logWriter);
}
public void writeIntoLog(Object inObject) {
ITM UNIVERSE(MCA) Page 63
WebServer Traffic & Analysis
Date d=new Date();
String cd=d.getDate()+"/"+d.getMonth()+"/"+d.getYear();
if(inObject instanceof Throwable )
{ try
{
br.append(((Exception)inObject).toString()+" "+cd);
br.newLine();
br.flush();
}
catch(Exception e)
{
}
}
else
{
try
{System.out.println("-----"+inObject.toString());
logWriter.write("n"+inObject.toString()+" "+d);
logWriter.flush();
System.out.println("-----"+inObject.toString());
logWriter.write("n");
}
catch(Exception e)
{
System.out.println(e.getMessage());
}
ITM UNIVERSE(MCA) Page 64
WebServer Traffic & Analysis
}
}
public void printintoLog(Object object)
{
if(object instanceof Throwable )
{
innerContext.log(((Exception)object).toString());
}
else
{
innerContext.log(object.toString());
}
}
}
10. Future enhancement
ITM UNIVERSE(MCA) Page 65
WebServer Traffic & Analysis
• memory management
• how much memory is consumed by a single user at given time interval(hourly , daily , monthly
basis)
• how much memory consumed by application
• what is to total heap memory used
• notification when application crosses given memory limit..
ITM UNIVERSE(MCA) Page 66
WebServer Traffic & Analysis
12. Conclusion
ITM UNIVERSE(MCA) Page 67
WebServer Traffic & Analysis
 Maintain the load on server & control traffic.
 Solve run time errors and will maintain a log file.
 Provide online help & send notification to owner about bugs.
 So, that we are implementing this application for better use to all in future.
13. BIBILIOGRAPHY
ITM UNIVERSE(MCA) Page 68
WebServer Traffic & Analysis
Reference Website:
[1] jQuery- http://www.w3schools.com/
[2] java code- http://www.javatutorialpoint.net
[3] www.mkyong.com
And the search engine which helped us a lot
www.google.com
THANK YOU
ITM UNIVERSE(MCA) Page 69

More Related Content

What's hot

Web servers (l6)
Web servers (l6)Web servers (l6)
Web servers (l6)
Nanhi Sinha
 

What's hot (20)

Core defense mechanisms against security attacks on web applications
Core defense mechanisms against security attacks on web applicationsCore defense mechanisms against security attacks on web applications
Core defense mechanisms against security attacks on web applications
 
CNIT 129S: 11: Attacking Application Logic
CNIT 129S: 11: Attacking Application LogicCNIT 129S: 11: Attacking Application Logic
CNIT 129S: 11: Attacking Application Logic
 
CNIT 129S: 13: Attacking Users: Other Techniques (Part 1 of 2)
CNIT 129S: 13: Attacking Users: Other Techniques (Part 1 of 2)CNIT 129S: 13: Attacking Users: Other Techniques (Part 1 of 2)
CNIT 129S: 13: Attacking Users: Other Techniques (Part 1 of 2)
 
CNIT 129S - Ch 6a: Attacking Authentication
CNIT 129S - Ch 6a: Attacking AuthenticationCNIT 129S - Ch 6a: Attacking Authentication
CNIT 129S - Ch 6a: Attacking Authentication
 
Ch 5: Bypassing Client-Side Controls
Ch 5: Bypassing Client-Side ControlsCh 5: Bypassing Client-Side Controls
Ch 5: Bypassing Client-Side Controls
 
Ch 1: Web Application (In)security & Ch 2: Core Defense Mechanisms
Ch 1: Web Application (In)security & Ch 2: Core Defense MechanismsCh 1: Web Application (In)security & Ch 2: Core Defense Mechanisms
Ch 1: Web Application (In)security & Ch 2: Core Defense Mechanisms
 
CNIT 129S: Ch 7: Attacking Session Management
CNIT 129S: Ch 7: Attacking Session Management CNIT 129S: Ch 7: Attacking Session Management
CNIT 129S: Ch 7: Attacking Session Management
 
Presentation on Web Attacks
Presentation on Web AttacksPresentation on Web Attacks
Presentation on Web Attacks
 
CNIT 129S: 8: Attacking Access Controls
CNIT 129S: 8: Attacking Access ControlsCNIT 129S: 8: Attacking Access Controls
CNIT 129S: 8: Attacking Access Controls
 
Web server
Web serverWeb server
Web server
 
CNIT 129S: Ch 4: Mapping the Application
CNIT 129S: Ch 4: Mapping the ApplicationCNIT 129S: Ch 4: Mapping the Application
CNIT 129S: Ch 4: Mapping the Application
 
CNIT 129S: 10: Attacking Back-End Components
CNIT 129S: 10: Attacking Back-End ComponentsCNIT 129S: 10: Attacking Back-End Components
CNIT 129S: 10: Attacking Back-End Components
 
CNIT 128 8: Mobile development security
CNIT 128 8: Mobile development securityCNIT 128 8: Mobile development security
CNIT 128 8: Mobile development security
 
Web application attacks
Web application attacksWeb application attacks
Web application attacks
 
Web Performance Hacks
Web Performance HacksWeb Performance Hacks
Web Performance Hacks
 
It and ej
It and ejIt and ej
It and ej
 
Building a secure BFF at Postman
Building a secure BFF at PostmanBuilding a secure BFF at Postman
Building a secure BFF at Postman
 
Web Server-Side Programming Techniques
Web Server-Side Programming TechniquesWeb Server-Side Programming Techniques
Web Server-Side Programming Techniques
 
Web servers (l6)
Web servers (l6)Web servers (l6)
Web servers (l6)
 
Mobile code mining for discovery and exploits nullcongoa2013
Mobile code mining for discovery and exploits nullcongoa2013Mobile code mining for discovery and exploits nullcongoa2013
Mobile code mining for discovery and exploits nullcongoa2013
 

Viewers also liked

Establishing background knowledge patrick henry
Establishing background knowledge  patrick henryEstablishing background knowledge  patrick henry
Establishing background knowledge patrick henry
travelntchr
 
Analytical Report (1)
Analytical Report (1)Analytical Report (1)
Analytical Report (1)
Kade Schmitz
 

Viewers also liked (19)

Establishing background knowledge patrick henry
Establishing background knowledge  patrick henryEstablishing background knowledge  patrick henry
Establishing background knowledge patrick henry
 
How to be a WINNER at your next Career Fair!!
How to be a WINNER at your next Career Fair!!How to be a WINNER at your next Career Fair!!
How to be a WINNER at your next Career Fair!!
 
«О качестве стали и необходимости сквозной классификации дефектов на всех пер...
«О качестве стали и необходимости сквозной классификации дефектов на всех пер...«О качестве стали и необходимости сквозной классификации дефектов на всех пер...
«О качестве стали и необходимости сквозной классификации дефектов на всех пер...
 
Maquines2 a
Maquines2 aMaquines2 a
Maquines2 a
 
Meeting Content Demand in Regulated Industries through Social Media
Meeting Content Demand in Regulated Industries through Social MediaMeeting Content Demand in Regulated Industries through Social Media
Meeting Content Demand in Regulated Industries through Social Media
 
ivan
ivanivan
ivan
 
Gustavo
GustavoGustavo
Gustavo
 
TehnoTiiger lendab lennumasinaga 2009
  TehnoTiiger lendab lennumasinaga 2009  TehnoTiiger lendab lennumasinaga 2009
TehnoTiiger lendab lennumasinaga 2009
 
A D Hollinsworth 2015
A D Hollinsworth 2015A D Hollinsworth 2015
A D Hollinsworth 2015
 
Analytical Report (1)
Analytical Report (1)Analytical Report (1)
Analytical Report (1)
 
For IFAs & Financial Advisers: How to Plan, Promote and Present Successful S...
For IFAs & Financial Advisers:  How to Plan, Promote and Present Successful S...For IFAs & Financial Advisers:  How to Plan, Promote and Present Successful S...
For IFAs & Financial Advisers: How to Plan, Promote and Present Successful S...
 
Geological Map of Strath, Isle of Skye
Geological Map of Strath, Isle of SkyeGeological Map of Strath, Isle of Skye
Geological Map of Strath, Isle of Skye
 
Rubrics: the good, the bad, the ugly
Rubrics: the good, the bad, the uglyRubrics: the good, the bad, the ugly
Rubrics: the good, the bad, the ugly
 
Social Media Week London Presentation
Social Media Week London PresentationSocial Media Week London Presentation
Social Media Week London Presentation
 
Supply Chain Design Fundamentals
Supply Chain Design FundamentalsSupply Chain Design Fundamentals
Supply Chain Design Fundamentals
 
Amy Dalrymple
Amy DalrympleAmy Dalrymple
Amy Dalrymple
 
Nokia fall down
Nokia fall downNokia fall down
Nokia fall down
 
Product complexity and supply chain design.
 Product complexity and supply chain design. Product complexity and supply chain design.
Product complexity and supply chain design.
 
Aquis search presentation
Aquis search presentationAquis search presentation
Aquis search presentation
 

Similar to webservertrafficanalysis

Generating Insights from WSO2 API Manager Statistics
Generating Insights from WSO2 API Manager StatisticsGenerating Insights from WSO2 API Manager Statistics
Generating Insights from WSO2 API Manager Statistics
WSO2
 
Web Server Hardware and Software
Web Server Hardware and SoftwareWeb Server Hardware and Software
Web Server Hardware and Software
webhostingguy
 

Similar to webservertrafficanalysis (20)

ATAGTR2017 Unified APM: The new age performance monitoring for production sys...
ATAGTR2017 Unified APM: The new age performance monitoring for production sys...ATAGTR2017 Unified APM: The new age performance monitoring for production sys...
ATAGTR2017 Unified APM: The new age performance monitoring for production sys...
 
Closing the door on application performance problems
Closing the door on application performance problemsClosing the door on application performance problems
Closing the door on application performance problems
 
Web Analytics Primer
Web Analytics PrimerWeb Analytics Primer
Web Analytics Primer
 
End user-experience monitoring
End user-experience monitoring End user-experience monitoring
End user-experience monitoring
 
most common Web Testing interview questions and answers.pptx
most common Web Testing interview questions and answers.pptxmost common Web Testing interview questions and answers.pptx
most common Web Testing interview questions and answers.pptx
 
ASP.pptx
ASP.pptxASP.pptx
ASP.pptx
 
A Comparative Study of Recommendation System Using Web Usage Mining
A Comparative Study of Recommendation System Using Web Usage Mining A Comparative Study of Recommendation System Using Web Usage Mining
A Comparative Study of Recommendation System Using Web Usage Mining
 
1. web technology basics
1. web technology basics1. web technology basics
1. web technology basics
 
A Real Time Web Analytics System
A Real Time Web Analytics SystemA Real Time Web Analytics System
A Real Time Web Analytics System
 
Web Log Files
Web Log FilesWeb Log Files
Web Log Files
 
StatsCraft 2015: Introduction to monitoring - Yoav Abrahami and Mark Sonis
StatsCraft 2015: Introduction to monitoring - Yoav Abrahami and Mark SonisStatsCraft 2015: Introduction to monitoring - Yoav Abrahami and Mark Sonis
StatsCraft 2015: Introduction to monitoring - Yoav Abrahami and Mark Sonis
 
Applications manager 1 - Middle East Workshop
Applications manager 1 - Middle East WorkshopApplications manager 1 - Middle East Workshop
Applications manager 1 - Middle East Workshop
 
Cyber bidding gateway report on ASP .net
Cyber bidding gateway report on ASP .netCyber bidding gateway report on ASP .net
Cyber bidding gateway report on ASP .net
 
IWMW 1999: Browser management
IWMW 1999: Browser managementIWMW 1999: Browser management
IWMW 1999: Browser management
 
IRJET- Crime Management System
IRJET- Crime Management SystemIRJET- Crime Management System
IRJET- Crime Management System
 
Generating Insights from WSO2 API Manager Statistics
Generating Insights from WSO2 API Manager StatisticsGenerating Insights from WSO2 API Manager Statistics
Generating Insights from WSO2 API Manager Statistics
 
Web Server Hardware and Software
Web Server Hardware and SoftwareWeb Server Hardware and Software
Web Server Hardware and Software
 
Web Developer Tools
Web Developer ToolsWeb Developer Tools
Web Developer Tools
 
Free Netflow analyzer training - diagnosing_and_troubleshooting
Free Netflow analyzer  training - diagnosing_and_troubleshootingFree Netflow analyzer  training - diagnosing_and_troubleshooting
Free Netflow analyzer training - diagnosing_and_troubleshooting
 
Real User Monitoring (RUM)
Real User Monitoring (RUM)Real User Monitoring (RUM)
Real User Monitoring (RUM)
 

webservertrafficanalysis

  • 1. WebServer Traffic & Analysis 1. INTRODUCTION 1.1 Project definition  Webserver Traffic Tracking will also track total no. of visitors , individual visitors , most popular page , par page visitors , hour bases track no. of visitors , daily bases track no. of visitors , weekly bases ,time duration and through all information in graphical format file, pie chart, bar chart etc.  Webserver Traffic Tracking will try to analyse all run time errors that occur and will maintain a log file that will produce to help the owner. Owner will also get notification via send Email and SMS error occurred. log-file will contain name of page, line of code, root cost of exception , class , method , date and time so that helpful system admin solve the problem  A log entry may be used to generate information about the number of hits, visitors, visitor duration, most requested page, visitor IP address, browser type and version, platform and details of interaction with the web site  Many web applications owners has web server problem due to load and traffic on their websites. Web-application some time hangs or work slow due to large nos. of web-application.  Webserver Traffic Tracking also manage which users visiting webpage and how many time. , view full report to see all of the pages in your website. ITM UNIVERSE(MCA) Page 1
  • 2. WebServer Traffic & Analysis 1.2 Existing system  Visitors whole information are display site owner and issue solver.  Visitors which page visit , most popular page , per day visitors , per page visitors etc.  Owner and issue solver receive message when run time errors occure. 1.3 Purpose  Maintaining the traffic & Analysis.  Track the traffic & control.  It will try to analyse all run time errors that occur and will maintain a log file .that will produce to help the owner & Owner will also get notification via send Email error occurred.  Owner and issue solver receive message when run time errors occure.  Issue solver send the message owner when error is solve.  Owner get the information own site.  Know the our web application site performance ITM UNIVERSE(MCA) Page 2
  • 3. WebServer Traffic & Analysis 1.4 Scope  This system is basically for implementing at any web application.  Issue solver solve system problem when run time bug is generate.  Owner get the traffic details.  Admin view details when visitor visit site.  Individual visitor details are view. 1.5 Module of System 1.) Visitor traffic analysis  Total number of visitors to a site  Visitor IP address  Browser type  Platform ITM UNIVERSE(MCA) Page 3
  • 4. WebServer Traffic & Analysis 2.) Visited page traffic analysis  Most requested pages  Most requested entry pages  Most requested exit pages  Portions of a site visited 3.) Log file  Time/date request  duration of the visits  Error generate 4.) Bug tracking  Class  Method  Line no  Message  Page  Data mismatch  Error type ITM UNIVERSE(MCA) Page 4
  • 5. WebServer Traffic & Analysis 1.6 Advantages of the System • The web server traffic tracking is an innovative system tool. • It also provide use to solve the problem occur in web site through online feature. • It provides to reduce the load on server. • It is big help of the developer and issue solver because easily get the message on mobile. • Help to save the time and costs of the issue solver and owner. • Owner easily get the message or notification on mobile and E-mail. 1.7 Limitation the system  Only java based applications can run on the system.  No visitor interaction. ITM UNIVERSE(MCA) Page 5
  • 6. WebServer Traffic & Analysis 2 .Requirement Analysis 2.1 Requirement specification • The analysis of webserver traffic & analysis examine the total number of visitors to a site, day of site visitors , weekly and monthly visitor visit a site details. • A log entry may be used to generate information about the number of hits, visitors, visitor duration, visitor origin (sub domain, referral link), visitor ip_address, browser name and version, platform, cookies, and details of interaction with the web site. • Visitor come on site when generate a log file so that log file is contain the visitor sign in time and sign out time entry generate. • Log entry may be used to know as a most popular page , which page is most popular and most exits page. • Visitors report also get the site owner and when run time errors are occure issue solver get the message on mobile and solve the problem at the time. ITM UNIVERSE(MCA) Page 6
  • 7. WebServer Traffic & Analysis 1. Functional Requirement specification I. Traffic Analysis  Admin view visitor details • Number of hits • Visitor duration • Visitors IP address • Browser types • Platform • Authentication user • Average page duration • sign in time • sign-out time • Total number of visitors sites  Owner view the details ITM UNIVERSE(MCA) Page 7
  • 8. WebServer Traffic & Analysis • Number of visits, and number of unique visitors • Daily bases track no. Of visitors • Weekly bases track no. Of visitors. • Also get notification E-mail and SMS. • Most popular page ,page_id and name • Registered and un registered • number of page views per visitor II. Bug Analysis Issue solver • Package • Class • Method • Error Line number • Name of error • Type of error • Page name on error • Error time and date Owner • Page name of error • Error Message ITM UNIVERSE(MCA) Page 8
  • 9. WebServer Traffic & Analysis • Error date & time Visitor details • System shall provide access visitor details from selecting ip_address . • The system shall provide information about total number of visitor, average page view per visits, average duration per page. • System will also see view cookies details. Visited page • The system shall access visited page details like most entry page, most requested page, most exits page. • The system should make some visited path of visitor for viewing the page. Log file details • The system should provide a log_entry details of visitor. ITM UNIVERSE(MCA) Page 9
  • 10. WebServer Traffic & Analysis • The system should save visitor information to log file. • The system should access log file details for specific visitor & all visitor. Bug management • The system shall provide notification about bug to owner. • The system will provide information about general and technical bug message to owner and admin 2.2 Hardware and software requirement specification Hardware Requirement Server • The minimum hardware as recommended by all of the software required on server side say web server, operating system and development software • Processing speed of 1.6 GHz • 1 GB of RAM • Network interface Client • The minimum hardware as recommended by all of the software required on client side say web browser, operating system ITM UNIVERSE(MCA) Page 10
  • 11. WebServer Traffic & Analysis • Minimum hardware depending on the operating system used User peripherals for better interaction Software Requirement Server • Web server software, Apache Tomcat • Server side scripting tools: jsp , struts Client side software • Web browser supporting JavaScript, refer Browser Compatibility. 2.3 About the tool & Technology  IDE -Net Beans IDE 8.0.2  Code behind(Business Logic)- java  View Technology - JSP  Scripting Language - Java Script, Jquery  Client Side Technology-CSS,Bootstrap  Mark-up Language- HTML,XML ITM UNIVERSE(MCA) Page 11
  • 12. WebServer Traffic & Analysis  Notification SMS gateway, Email gateway  Run Time Environment-JDK 8  Application Server-Apache Tomcat 6.0.1,Glassfish  Database Server-MySQL Server 5.5 3. Feasibility Analysis 1) Operational Feasibility • Operational feasibility measures that how well the solution will work in the organization and also how end-user will & other user’s feels about the system. • On studying the operational feasibility of the project, following conclusion can be derived developed system will provide all the information regarding visitor ,visitor page. 2) Technical Feasibility • It is trie to answer the following questions to make the software feasible to develop. • The software or tools necessary for building or running the application is easily available or not? • The compatibility amongst software exists or not? ITM UNIVERSE(MCA) Page 12
  • 13. WebServer Traffic & Analysis • Developers aware of these technologies? • What about the alternative of these chosen technologies? • So, we should answer above question: • The Developer environment we are using is JAVA, which is supporting flexibility, portability and platform independent. • Because it is made up from the scratch, it supports latest technologies like XML natively. • Execution of the code is done in managed environment so that applications are safer and reliable. • Object oriented approach in most of the languages is like to give more robust coding. • Moreover, it is supporting various platforms to deploy application. 3) Economically Feasibility Economically Feasibility address to the following issues: • Is the organization/owner having the suitable budget to develop the proposed system? • How much profile can be earned from the system by an organization? • Would it be cost – effective to develop the system or it is worthwhile to retain with current system? 4) Time and Schedule Feasibility • Projects are initiated with specific deadline. We need to evaluate whether the deadlines are mandatory or desirable. Time is the one of the critical factor in the development of any system but this kind of feasibility is hardly perfect in any system. ITM UNIVERSE(MCA) Page 13
  • 14. WebServer Traffic & Analysis • We have been asked to complete the project within given period. In the project planning section we elaborate our ideas to develop the system within the given period. Hence, it is feasible to develop a system in predetermined time interval. 4. System design ITM UNIVERSE(MCA) Page 14
  • 15. WebServer Traffic & Analysis UML USECASE DIAGRAM 4.1 Class diagram ITM UNIVERSE(MCA) Page 15
  • 16. WebServer Traffic & Analysis 4.2 Usecase diagram ITM UNIVERSE(MCA) Page 16
  • 17. WebServer Traffic & Analysis Usecase diagram for visitor ITM UNIVERSE(MCA) Page 17
  • 18. WebServer Traffic & Analysis Usecase diagram for visted page ITM UNIVERSE(MCA) Page 18
  • 19. WebServer Traffic & Analysis Usecase diagram for logfile ITM UNIVERSE(MCA) Page 19
  • 20. WebServer Traffic & Analysis Usecase diagram for Bug ITM UNIVERSE(MCA) Page 20
  • 21. WebServer Traffic & Analysis 4.3 Activity diagram Activity diagram for visitor ITM UNIVERSE(MCA) Page 21
  • 22. WebServer Traffic & Analysis Activity diagram for logfile ITM UNIVERSE(MCA) Page 22
  • 23. WebServer Traffic & Analysis Activity diagram for page visited ITM UNIVERSE(MCA) Page 23
  • 24. WebServer Traffic & Analysis Activity diagram for bug ITM UNIVERSE(MCA) Page 24
  • 25. WebServer Traffic & Analysis 4.4 Sequence diagram Sequence diagram for bug handle ITM UNIVERSE(MCA) Page 25
  • 26. WebServer Traffic & Analysis Sequence diagram for logfile ITM UNIVERSE(MCA) Page 26
  • 27. WebServer Traffic & Analysis Sequence diagram for system ITM UNIVERSE(MCA) Page 27
  • 28. WebServer Traffic & Analysis 5. Data Dictionary Visitor Attributes Data type Constraints Description Ip_address Varchar(30) Primary key Visiters Ipaddress Browser_name Varchar(15) Not null Browser name Plateform_name Varchar(15) Not null Os_name Log Id Attributes Data type Constraints Description Log_id Integer(5) Primary key Id of log file SignIn_time Time Not null Signin time SignOut_time Time Not null Signout time Date Date Not null Date Ip_address Varchar(30) Foreign key refers to Visitor (Ip_address) Id of visitor Page_id Integer(5) Foreign key refers to Page (Page_id) Page id ITM UNIVERSE(MCA) Page 28
  • 29. WebServer Traffic & Analysis Page Attributes Data type Constraints Description Page_id Integer(5) Primary key id of page Page_name Varchar(20) Not null name of Page Hits Number Not null Number of hits on page Date Date Not null Page visit date Ip_address Varchar(30) Foreign key refers To Visitor (Ip_address) Visiters Ipaddress Fileupload(drive table) Attributes Data type Constraints Description File_id Integer(5) Primary key File id File_version Varchar(30) Not null Name of file version File _size LongBLOB Not null File size(4mb) File_Type Varchar(20) Not null Doc/html etc. Page_id Integer(5) Foreign key refers to Page (Page_id) Id of page ITM UNIVERSE(MCA) Page 29
  • 30. WebServer Traffic & Analysis Bug Attributes Data type Constraints Description Bug_id Integer(5) Primary key Error id Line of number Integer(5) Not null Error line number Date Date Not null Date Time Time Not null Time Root cause exception(bug type) Varchar(30) Not null Error type Error message Varchar(30) Not null Error msg Page_id Integer(5) Foreign key refers to Page (Page_id) Id of page Method_id Integer(5) Foreign key refers to Method (Method_id) Method id Method Attributes Data type Constraints Description Method_id Integer(5) Primary key Method id Method_name Varchar(15) Not null Method name Class_id Integer(5) Foreign key refers To class(class_id) Class id ITM UNIVERSE(MCA) Page 30
  • 31. WebServer Traffic & Analysis Class Attributes Data type Constraints Description Class_id Integer(5) Primary key Class id Class_name Varchar(15) Not null Name of class Package_id Integer(5) Foreign key refers to package(package_id) Id of package package Attributes Data type Constraints Description Package_id Integer(5) Primary key Package id Package_name Varchar(15) Not null Package_name Admin Attributes Data type Constraints Description Id Integer(5) Primary Admin id Name varchar(20) Not null Name of issue solver& owner E-mail Varchar(30) Not null Email of issue solver& owner Person_contact Attributes Data type Constraints Description ITM UNIVERSE(MCA) Page 31
  • 32. WebServer Traffic & Analysis Id Integer(5) Foreign key refers to admin(id) Id issue solver & owner Contact_no Number Not null Mobil number Issue solver Attributes Data type Constraints Description Id Integer(5) Foreign key refers to admin(id) Id of issue solver Bug_id Integer(5) Foreign key refers to Bug(bug_id) Bug_id Owner Attributes Data type Constraints Description Id Integer(5) Primary key Id of owner ITM UNIVERSE(MCA) Page 32
  • 33. WebServer Traffic & Analysis ITM UNIVERSE(MCA) Page 33
  • 34. WebServer Traffic & Analysis ITM UNIVERSE(MCA) Page 34
  • 35. WebServer Traffic & Analysis Jar file coding ITM UNIVERSE(MCA) Page 35
  • 36. WebServer Traffic & Analysis Create jar file ITM UNIVERSE(MCA) Page 36
  • 37. WebServer Traffic & Analysis Test application ITM UNIVERSE(MCA) Page 37
  • 38. WebServer Traffic & Analysis Website Owner login ITM UNIVERSE(MCA) Page 38
  • 39. WebServer Traffic & Analysis ITM UNIVERSE(MCA) Page 39
  • 40. WebServer Traffic & Analysis All Visitor display ipaddress ITM UNIVERSE(MCA) Page 40
  • 41. WebServer Traffic & Analysis Most popular page ITM UNIVERSE(MCA) Page 41
  • 42. WebServer Traffic & Analysis All visitor daily no. of hits. ITM UNIVERSE(MCA) Page 42
  • 43. WebServer Traffic & Analysis Particular visitor visited page ITM UNIVERSE(MCA) Page 43
  • 44. WebServer Traffic & Analysis Particular page per hits ITM UNIVERSE(MCA) Page 44
  • 45. WebServer Traffic & Analysis Date wise visited page ITM UNIVERSE(MCA) Page 45
  • 46. WebServer Traffic & Analysis Error occur on page ITM UNIVERSE(MCA) Page 46
  • 47. WebServer Traffic & Analysis Logfile create ITM UNIVERSE(MCA) Page 47
  • 48. WebServer Traffic & Analysis Owner get the message ITM UNIVERSE(MCA) Page 48
  • 49. WebServer Traffic & Analysis ITM UNIVERSE(MCA) Page 49
  • 50. WebServer Traffic & Analysis 8. Testing 8.1 Testing Strategies Testing strategies is a general approach to the testing process rather than method of devising particular system or components test. Different testing strategies may be adopted depending on the type of system to be tested and the develop process used. So considering functional oriented nature of this nature of this software we adopted mixture of following strategies. Testing is advantageous in several ways. First, the detects found, help in the process of a making software reliable. Second, defects found are not corrected, Third, over time, the record of defects found reveals the most common kinds of defects , which can be used form developing appropriate preventive measures such as training, proper design and reviewing. The development process repeats this testing sub-process a number of times for the following phases: 1. Unit testing 2. Integration testing 3. System testing 4. Acceptance testing 8.1.1 Testing Stage 1. Unit testing: Unit testing focuses verification effort on the smallest unit of software design the software component or module. In this type of testing individual modules were tested and verified ITM UNIVERSE(MCA) Page 50
  • 51. WebServer Traffic & Analysis whether accurate output was made available or not. The modules were tested individually as they could result into faster responses than they were integrated. 2. Integrated testing: When the unit testing was over, all the modules were integrated one by one and tested as a whole. If any error occur during testing then it is solved by this testing. 3. Validation testing Validation testing can be defined in many ways but a simple definition is that a definition is that a validation succeeds when the software functions in a manner that can be reasonably accepted by the client. 4. Acceptance Testing Before delivering the product to the client, it will be tested for stability and correctness of results. By conducting the fore mentioned test cases, we should be able to conclude on the reliability of the product before the client test it for acceptance. First tests will also include testing on the entire database. The client will test the program for criteria mentioned in the next section before accepting the product. Specific acceptance criteria (the client expects the following): • Conformity with the predefined requirements • Correct data returned from the SQL Server searches. • Functionality in multiple environments. Since this is a web product, it must be compatible to various browsers on different systems. ITM UNIVERSE(MCA) Page 51
  • 52. WebServer Traffic & Analysis 8.2 Feature Level Testing: 8.2.1 Task-Oriented Functional Tests. 1. The mandatory fields must not be left empty 2. Email-id should contain’@’ and’.’ Characters 3. Date should be in DD/MM/YYYY format. 4. User name and password must match with registered details. 8.2.2 Integration Tests Components or modules that should be tested independently are following. 1. Browser compatibility. 2. Hardware compatibility. 3. Interface testing. 4. User input testing. 8.2.3 System Level Tests In system level tests we will use black-box testing since all independent modules or functionalities are already tested before. System level tests will start after unit and integration testing gets completed. 8.2.4 Performance Tests System has certain features that highly affected their takeaway value. These features need to be tested against its performance. User response time- should be moderate. It should be in range of 1-5 seconds. ITM UNIVERSE(MCA) Page 52
  • 53. WebServer Traffic & Analysis Basic Test Case Test Case No Expected Output Actual Output Pass/Fail 1 Form is open Successfully Form is open Successfully Pass 2 Window is open normally Window is open normally Pass 3 Form looks properly and uniformly Form looks properly and uniformly Pass 4 Title caption are in normal font Title caption are in normal font Pass 5 Textbox are aligned properly Textbox are aligned properly Pass 6 Character Fields are central justified Character Fields are central justified Pass 7 Buttons are central justified Buttons are central justified Pass 8 Fonts of all labels and buttons are same Fonts of all labels and buttons are same Pass 9 Tab order is proper Tab order is proper Pass 10 Form is close successfully (Using exit Button) Form is close successfully Pass Test case Test case name Actual Input Expected Output Actual Output Pass/Fail ITM UNIVERSE(MCA) Page 53
  • 54. WebServer Traffic & Analysis Login Email Id and Password If valid redirect to home page. If not valid give message to re- enter username and password Successfully redirect to home page Pass Add Select category, Company for add If for given selection data is present then display output or Add for different category will be displayed on Page in grid. Pass Master of Admin (Owner , Issue solver) Click on any of these two master & then can view data If user visit a site then owner get the details in grid own panel . Display details in grid. Pass Log file Visitor visit a site when error occur. Error entry in log file. When run time error is occur error entry in Logfile.txt Pass Message Visitor visit a site when error is occur.so send the message in mobile or email Get the error message in mobile ,which line no ,and which error name Get mail or message on mobile.. pass Graph Pie chart, Bar chart, Multi-line chart Graph will show as per data retrieved from database. Show Chart after clicking on action link. Show the chart in as per data in visitor pass 9. Source code package projectfiles; import com.opensymphony.xwork2.ActionSupport; ITM UNIVERSE(MCA) Page 54
  • 55. WebServer Traffic & Analysis public class loginAction extends ActionSupport{ String unm, pwd; String un="admin"; String pw="admin"; public String login() { return "login"; } public String getmenu(){ if(un.equals(unm) && pw.equals(pwd)) { return SUCCESS; } else { return ERROR; } } // getter and setter ----------------------- public String getUnm() { return unm; } public void setUnm(String unm) { this.unm = unm; } public String getPwd() { ITM UNIVERSE(MCA) Page 55
  • 56. WebServer Traffic & Analysis return pwd; } public void setPwd(String pwd) { this.pwd = pwd; } } Display grap // Owner site package ActionClass; import Pojo.visitor_page; import static com.opensymphony.xwork2.Action.SUCCESS; import com.opensymphony.xwork2.ActionSupport; import com.opensymphony.xwork2.ModelDriven; import java.util.ArrayList; import javax.servlet.http.HttpServletRequest; import ChartGrid.*; public class GridAction extends ActionSupport implements ModelDriven{ private visitor_page bg=new visitor_page(); HttpServletRequest servletRequest; ArrayList al,al11; public visitor_page getBg() { return bg; } ITM UNIVERSE(MCA) Page 56
  • 57. WebServer Traffic & Analysis public void setBg(visitor_page bg) { this.bg = bg; } public ArrayList getAl() { return al; } public void setAl(ArrayList al) { this.al = al; } public ArrayList getAl11() { return al11; } public void setAl11(ArrayList al11) { this.al11 = al11; } @Override public visitor_page getModel() { return bg; } public String GridView() { counter_op go=new counter_op(); al=go.view(); ITM UNIVERSE(MCA) Page 57
  • 58. WebServer Traffic & Analysis return SUCCESS; } } Method in data grid public class counter_op { public ArrayList view() { SessionFactory sf = new Configuration().configure("hibernate.cfg.xml").buildSessionFactory(); Session session = sf.openSession(); Transaction t = session.beginTransaction(); String hql = "from visitor_page"; System.out.println("----30----"); Query q = session.createQuery(hql); ArrayList al =(ArrayList)q.list(); return al; } public ArrayList Perticular_page_view(String page_name) { SessionFactory sf = new Configuration().configure("hibernate.cfg.xml").buildSessionFactory(); Session session = sf.openSession(); Transaction t = session.beginTransaction(); String hql = "from visitor_page ac where ac.page_name='"+page_name+"'"; System.out.println("----30----"+hql); Query q = session.createQuery(hql); ITM UNIVERSE(MCA) Page 58
  • 59. WebServer Traffic & Analysis ArrayList al1 =(ArrayList)q.list(); System.out.println("----30----"+al1); return al1; } public ArrayList Visitior_grid(String ipaddress) { SessionFactory sf = new Configuration().configure("hibernate.cfg.xml").buildSessionFactory(); Session session = sf.openSession(); Transaction t = session.beginTransaction(); String hql = "from visitor_page ac where ac.ipaddress='"+ipaddress+"'"; System.out.println("----30----"+hql); Query q = session.createQuery(hql); ArrayList al11 =(ArrayList)q.list(); return al11; } public ArrayList getPiePageHits() { SessionFactory sf = new Configuration().configure("hibernate.cfg.xml").buildSessionFactory(); Session session = sf.openSession(); Transaction t = session.beginTransaction(); String hql = "from visitor_page ac"; System.out.println("----30----"+hql); ITM UNIVERSE(MCA) Page 59
  • 60. WebServer Traffic & Analysis Query q = session.createQuery(hql); ArrayList al2 =(ArrayList)q.list(); return al2; } } public String[] getInfo(Exception e) // error class name,method name , line no { String msg=e.getMessage(); String classname = e.getStackTrace()[0].getClassName(); String method =e.getStackTrace()[0].getMethodName(); String data[]={msg,classname,method}; System.out.println(" "+msg+" "+classname+" "+method); return data; } E-mail send public void sendEmail(String to,String from,String pass,String smtp,String port,String msg) ITM UNIVERSE(MCA) Page 60
  • 61. WebServer Traffic & Analysis { //Get the session object Properties props = new Properties(); props.put("mail.smtp.host", smtp); props.put("mail.smtp.socketFactory.port", port); props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory"); props.put("mail.smtp.auth", "true"); props.put("mail.smtp.port", port); Session session = Session.getInstance(props,new javax.mail.Authenticator() { @Override protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(from,pass);//change accordingly } }); Logentry en=new Logentry(ctx); StackTraceElement l =e.getStackTrace()[0]; en.printintoLog("CLASS NAME:="+l.getClassName()); en.printintoLog("METHOD NAME:="+l.getMethodName()); en.printintoLog("LINE NO:="+l.getLineNumber()); en.writeIntoLog("CLASS NAME:="+l.getClassName()+"n"); en.writeIntoLog("METHOD NAME:="+l.getMethodName()+"n"); ITM UNIVERSE(MCA) Page 61
  • 62. WebServer Traffic & Analysis en.writeIntoLog("LINE NO:="+l.getLineNumber()+"n"); en.printintoLog("Log is create "); en.printintoLog("--------------------------"); String msg=e.getMessage(); HttpSession hs=req.getSession(); String pname=(String) hs.getAttribute("pagename"); Sms s1=new Sms(); Email e1 = new Email(); e1.sendEmail("nitesh.kanojiya2416@gmail.com", "nitesh.kanojiya2416@gmail.com", "niteshexam", "smtp.gmail.com","465","laundrycare Error msg:"+msg+"n"+ "pagename:"+pname+"n"+ "Class Name:"+l.getClassName()+"n"+ "Method name:"+l.getMethodName()+"n"+ "Line no:"+l.getLineNumber()+"n"); s1.sendSMS("918401405806","laundrycare Error msg:"+msg+"n"+"pagename:"+pname+"n"+ "Class Name:"+l.getClassName()+"n"+ "Method name:"+l.getMethodName()+"n"+ "Line no:"+l.getLineNumber()+"n"); LogEntry ITM UNIVERSE(MCA) Page 62
  • 63. WebServer Traffic & Analysis public class Logentry { static String logFileName; // both package level to enable testing static String errorLogFileName; static FileWriter logWriter; static FileWriter errorWriter; DataOutputStream dos; BufferedWriter br=null; //For use in Servlet Context Logging static ServletContext innerContext; public Logentry(ServletContext inServletContext) throws IOException { //Store incoming Context + Set Logging Flag this.innerContext= inServletContext; logFileName= this.innerContext.getRealPath("/")+"LogFile.txt"; errorLogFileName = this.innerContext.getRealPath("/")+"ErrorLogFile.txt"; //Create the files logWriter = new FileWriter(logFileName,true); //append data errorWriter = new FileWriter(errorLogFileName,true); //append dos=new DataOutputStream(new FileOutputStream(errorLogFileName,true)); br=new BufferedWriter(logWriter); } public void writeIntoLog(Object inObject) { ITM UNIVERSE(MCA) Page 63
  • 64. WebServer Traffic & Analysis Date d=new Date(); String cd=d.getDate()+"/"+d.getMonth()+"/"+d.getYear(); if(inObject instanceof Throwable ) { try { br.append(((Exception)inObject).toString()+" "+cd); br.newLine(); br.flush(); } catch(Exception e) { } } else { try {System.out.println("-----"+inObject.toString()); logWriter.write("n"+inObject.toString()+" "+d); logWriter.flush(); System.out.println("-----"+inObject.toString()); logWriter.write("n"); } catch(Exception e) { System.out.println(e.getMessage()); } ITM UNIVERSE(MCA) Page 64
  • 65. WebServer Traffic & Analysis } } public void printintoLog(Object object) { if(object instanceof Throwable ) { innerContext.log(((Exception)object).toString()); } else { innerContext.log(object.toString()); } } } 10. Future enhancement ITM UNIVERSE(MCA) Page 65
  • 66. WebServer Traffic & Analysis • memory management • how much memory is consumed by a single user at given time interval(hourly , daily , monthly basis) • how much memory consumed by application • what is to total heap memory used • notification when application crosses given memory limit.. ITM UNIVERSE(MCA) Page 66
  • 67. WebServer Traffic & Analysis 12. Conclusion ITM UNIVERSE(MCA) Page 67
  • 68. WebServer Traffic & Analysis  Maintain the load on server & control traffic.  Solve run time errors and will maintain a log file.  Provide online help & send notification to owner about bugs.  So, that we are implementing this application for better use to all in future. 13. BIBILIOGRAPHY ITM UNIVERSE(MCA) Page 68
  • 69. WebServer Traffic & Analysis Reference Website: [1] jQuery- http://www.w3schools.com/ [2] java code- http://www.javatutorialpoint.net [3] www.mkyong.com And the search engine which helped us a lot www.google.com THANK YOU ITM UNIVERSE(MCA) Page 69