Professional Documents
Culture Documents
INTRODUCTION
1.1 Problem
This project ANS is a administrator assistant. Network monitoring is
handled in two modules namely LAN Monitoring and Application Monitoring.
LAN monitoring determines the host name, host address and type of address
assigned in LAN, the routing table, protocol statistics and h/w addresses in
LAN .In application monitoring it monitors application’s usage, session
maintenance and broadcasting.
6t7t7868dfhgfhgjhgjj
1.2 Software Tools
Operating System : Windows XP
Language : Java1.5, JSP2.0
Database : MS- Access
1
Java is object oriented
Java deals with classes and objects, pure and simple.
Java is safer and more reliable
Java won’t automatically convert data types. You have to explicitly
convert from one class to another. Complex printer arithmetic is avoided.
Java is secure
The java runtime system is designed to enforce a security policy that
prevents execution of malicious code. It does this by remembering how
objects are secure access to those objects according to its security rules. It
performs byte code. Verification by passing compiled classes through a
simple theorem proves that either proves that the code is secure or prevents
the code from being loaded and executed. The class is java’s basic execution
unit and security is implemented at the class level.
Java is interpreted and portable
FEATURES OF JSP
Java Server Pages (JSP) is a technology that lets you mix regular,
static HTML with dynamically generated HTML
JSP technology has facilitated the segregation of work profile of a Web
designer and a Web developer
A JSP page after compilation generates a servlet and incorporates all
servlet functionalities
Servlet and JSP thus share common features such as platform
independence, creation of database driven web Application and server side
programming capabilities.
2
1.3 PROBLEM STATEMENT
The main modules of this project Active Network System (ANS) are
• LAN monitoring
• Application Monitoring
1.3.1 LAN Monitoring
This module is designed as GUI Mode Application. So that it is very
easy to handle by end users.
This main objective of the project is used to avoid Data Collision / IP
Confliction between a System and another system of same or different block
when each blocks interconnected.
It is used to determine Host Names, Host Addresses of systems of in
this LAN and systems of different block when each block is interconnected. It
determines routing table of the server host, network protocol statistics in the
LAN and H/W address of each host in the LAN.
Also determines which type of IP Address assigned to a system or
group of systems of this LAN or different LAN when each block is
interconnected after the connection was established.
It involves establishing connection to the remote Host(s) given by the
user. It is possible to send messages between systems in LAN.
Additional features like Calculator and browser is included in this
project to improve the user interface.
3
1.4 METHODOLOGY
Action Listener
The action Listener is a key word for the concept of Event handling.
The event class is central to the JAVA window event generation and handling
mechanism. Event objects are generated by the user who interacts with a
JAVA window program or applet and by the JAVA runtime system. User
generated events occur when user make selection on a menu or press a key
Events generated by the runtime system include errors and Exceptions. They
are handled by the set of predefined event-handling methods that are defined
by the component class and its subclass.
Class<class name> implements Action Listener
{
St1;
St2;
}
Public void action performed (Action Event ae)
{
-----
-----
-----
}
4
Exceptions
JAVA handles potentially recoverable errors through exceptions a
special object class that handles virtually all errors in JAVA. Exception
handling code resides in the java. Lang package and is automatically included
in all compiled code. JAVA uses the try catch and throws keywords to do
actual exception handling. They are conceptually similar to switch statement.
Throw
The first concept in exception handling is throwing an exception. If the
error during reading the file ie says a method could not read the file because
the file did not exit, this would generate an IOException in JAVA terminology. It
is said that the method threw an IOException.
Catch
An exception catch is code that realizes the exception has occurred
and deals with it
Syntax
Public string getName( )
String S = Ia.getName( )
System.out.println(S);
getInetAddresses
Convenience method to return an enumeration will all or a sub set of
the InetAddresses bound to the network interface.
Syntax
InetAddress<array obj> = InetAddress.getInetAddress( )
getDisplayName
5
Get the display name of this network interface. A display name is a
human readable string describing the network device.
Syntax
Ia.getDisplayName( );
Where, Ia is object of the InetAddres class.
getByName
Searches for the network interface with the specified name.
syntax
Ia.getByName(<IPAddress>) / < Host Name> )
Where, ia is an object of the class InetAddress.
getByInetAddress
Convenience method to search for a network interface that has the
specified internet protocol (IP) address bound to it. If the specified (IP address
is bound to multiple network interfaces it is not defined which network
interface is returned.
Syntax
NetworkInterface getByInetAddress(Inet Address ia)
getNetworkInterfaces
Returns all the interfaces on this machine. Returns null if no network
interfaces could be found on this machine. If returns an enumeration of
network interfaces found on this machine.
getAllByName
This method returns all IP address of this machine or remote machine
it associates with InetAddress object.
Syntax
InetAddress ia.getAll By Name(charles);
getHostName
6
Returns a HostName of the given IP address is associates with
InetAddress object.
Ia.getHostName( )
getHostAddress
It returns IP address of the given HostName. It gets with the object of
InetAddress class
1.4.3 JAVA I/O PACKAGE
The java .io. Package contains various types of classes and its
respective packages. These packages used to read data from memory
devices such as floppy disk, Hard disk, CD Rom, Flash memory and also from
primary memory. Also write Data to memory devices such as FDD, HDD,
CDROM, etc.
Type of I/O streams:
There are various types of streams found in java.io.* package. They
are
1. ByteArrayInputStream:
Allows a buffer in memory to be used as an input stream
Methods:
available ( ), mark ( ), mark supported ( ), read ( ), insert ( ) & skip( )
2. FileInputStream:
For reading information from a file
Methods:
available ( ), close( ), finalize( ), read( ), skip( ).
3. FilterInputStream:
Abstract class providing an interface for useful functionality to the other
input stream classes.
Methods:
available ( ), close( ), mark( ), mark supported( ), skip( ), read( ),
reset( ).
4. ByteArrayOutputStream:
Creates a buffer in memory. All the data we send to stream is placed in
this buffer.
Methods:
7
reset(), size( ), toBytearray( ), tostring( ), write( ), writeto( ).
5. FileOutputStream:
For sending information to a file
Methods:
Close( ), finalize( ), write( ).
6. FilterOutputStream:
Abstract class providing an interface for useful functionality to the other
o/p stream classes.
Method:
Close( ), finalize( ), write( ).
7. FileReader:
The file reader class enables reading character files. It uses default
character encoding.
Constructor:
Public file reader (File f)
8. CharArrayReader:
The char array reader allows the usage of a character array as an input
stream. This class is similar to Byte Array Input stream.
Constructor:
Public char Array Reader (char ch []);
9. StringReader:
The string Reader class reads characters from a string.
Constructor:
Public string Reader (String s);
10. FileWriter:
The file writer allows writing character files. It uses the default encoding
character and buffer size. This class is similar to that of file output stream
class.
Constructor:
Public file writer (File f)
11. CharArrayWriter:
This class allows to use a character buffer as an o/p stream.
Constructor:
Public char Array writer( ).
8
12. BufferedWriter:
The buffered writer class buffers data to the character output stream.
Constructor:
Public buffered writer (writer w)
1.4.4 javax.swing PACKAGES
Swing Classes
Swing classes can be used to produce pure 100% java windowing
toolkit. Some swing classes and its descriptions are as follows.
1. JFrame
This class represents the swing frame that is more sophisticated than
the AWT frame. You can add components in layers, add a Manu bar, or paint
over the component.
Constructor
JFrame <object> = new J frame (<title>);
Ex.
JFrame Jfm = new J frame (“Remote Host Monitory System”);
2. Container
The container class have few layout managers by using any one of
these layout managers, a program can control the arrangement and sizes of
components to preserve the appearance of a user interface.
They are as follows:
Flow layout
Grid layout
Border layout
Grid Bag layout
Box layout
Overlay layout
Scroll pane layout
View port layout
Constructor
Container <obj> = <frame object> . get content pane ();
Ex
9
JFrame jfm = JFrame(“monitoring”);
Container cnr = jfm.getContentPane ();
Cnr.setlayout(null);
3. JMenuBar
A menu bar is a narrow rectangular component that is positioned at the
top edge of an applet or a frame. The menu bar contains the labels of drop
down menus that will be attached to if.
Constructor
JMenuBar <obj> = new JMenuBar();
Ex
JMenuBar jmb = new JMenuBar();
4. JMenu
Once a menu bar has been created you can add menus to it by using
the following constructors
Public JMenu ()
Public JMenu(String title)
Public JMenu(String label, Boolean turn_ off)
10
Ex
JMenuBar jmb = new JMenuBar()
JMenu JM = new JMenu(“File”)
JMenuItem jmi = new JMenuItem(“search”);
Cnr.add(jmb)
Jmb.add(jm)
6.JButton
The class represents swing buttons. These buttons can poses an icon
as well as text with suitable (absolute as well as relative) positioning.
Constructor
JButton <obj> = new JButton(<caption>)
Ex
JButton jbn = new JButton(“Ok”)
7. JLabel
This class represents swing labels that can display a place of text as
well as icons with suitable positioning. A label object can be created by using
the following statement:
Constructor
JLabel<obj> = new JLabel(text)
Ex. JLabel Jlb = new JLabel(“Enter your name”);
8. JComboBox
A swing combo box is an enhancement over the AWT component
called choice. The combo box is a pull down list with a capability to display the
selected item in a display area. You can also enter an item in the display area
to edit it info the list.
Constructor
JComboBox <obj> = new JComboBox( )
Ex. JComboBox jcb = new JComboBox( )
11
9. JTextField
The swing text field can be used to display or edit a single line of plain
text. The swing text field is a light weight component. A text field object is
created by using the class JText field, which is a direct subclass of JText
component.
Constructors
public JTextField( )
public JTextField(String text)
public JTextField(String text, int width)
public JTextField(Document model, string text, int width);
Ex.
JText Field JTF = new JText Field(“Welcomes you”);
12
1.5. PROBLEM DESCRIPTION
1.5.1 NETWORKING
Networking is the means by which computers share and exchange
information and resources across either short distances Local Area Network
(LAN) or globally wide Area Networks (WAN). Making the best use of
networking technology is about making better use of business resources,
enhancing productivity and efficiency, reducing costs and gaining competitive
advantage.
Networking enables everyone in an organization to communicate with
and share resources with everyone else-giving them access to data held in
individual PCs by remote office sites or external suppliers and giving users the
ability to share printers, fax, CD-ROM and Modem Technology, etc. networks
can be designed for organizations of all sizes from the small office with
between two and ten workstations to the largest international corporations
linking thousands of workstations.
1.5.1.1 Local Area Network (LAN)
A LAN is a group of desktop computers located relatively close to one
another and connected through cabling system to enable them to share
access to computing resources. LAN satisfies two fundamental requirements
(a) sharing information, and (b) sharing computer resources.
A LAN typically consists of PCs on the same floor in the same
buildings. It may even consist of computers which are with in the factory area,
but spread across various buildings like administrative block or production
block or warehouse, etc.
LANs consist of workstations which are connected to a central
computer called file server (special purpose computers). [Workstations are the
nodal computers on which users do their work-like executing their own
applications programs locally and sending request to the file server for any of
the network function and receiving the response from the file server. All
workstations on LAN would have a Network interface.
LAN’s topology is of 3 types (a) star, (b) Ring, and (c) Bus. LAN can be
connected to larger networks including mainframe computers. This gives the
user of LAN access to enormous computing power and excellent
13
communication facilities. The distinctive feature of LAN is its inherent
capability for distributed processing.
LANs use File servers to control and manage the network resources
which are shared by the Network users. These file servers are used to
perform (a) control of the traffic of requests and messages on the network, (b)
security requirements, (c) centralized Hard disk storage, and (d) control of
peripherals like printers, etc.
1.5.2 HOST AND NETWORKS
IP addressing is based on the concept of Host and networks. A host is
essentially anything on the network that is capable of receiving and
transmitting IP packets on the network servers and client workstations are IP
hosts.
The hosts are connected together by one or more networks the IP
address of any host consists of its network address plus its own host address
on the networks.
1.5.2.1 IP addressing and classes
14
1.5.2.2 Protocols
The most common higher level protocol in the suite is TCP. It provides
a reliable, connection-oriented packet delivery service on top of IP.
TCP guarantees the delivery of packet, ensure proper sequences of
the data, and provide a check sum secure that validates both the packet
heads and its data for accuracy.
This reliable makes TCP protocol of choice for session based data
transmission, client-server application and critical services, such as electronic
mail. Because TCP headers required additional bits to provide proper
sequencing of information, as well as a check sum to ensure reliability of both
the TCP packet header & the packet, TCP is slower than UDP
15
1.5.3.1 TCP PACKET STRUCTURE:
IP provides packet delivery for all higher level protocol within the suite.
It provides best efforts delivery of as unreliable and connection less nature.
Delivery is not guaranteed and a packet might be last, delivery out of
sequence duplicated or delayed.
16
being discarded, otherwise packets could
endlessly loop around an internet.
A router will decrease the TTL by at
Least 1 second when if handles the
Packet, and is required to decrement the
TTL by at least the time spent in the router.
17
CHAPTER -2
18
• 64 MB RAM
• Microsoft Windows XP
• Winsock 2.0
• SMTP
19
CHAPTER -3
20
3.1 SYSTEM FLOW DIAGRAM
21
in this module an application like Website is going to monitor.
The Application module helps the administrator to measure how
many users is using the application for the specified day or
specified period of time.
22
LOGIN NEW USER
ADMIN USER
TOTAL CLIENT NO OF
USERS AND MAILS
SERVER SEND
DETAILS
LOGOUT
23
24
3.3 DATA COLLECTION
Data was collected only for application module. MS Access was used
as the back end.
• Server details
• User details
• Messaging details
In server details static information like server version number and compatible
versions are stored. This information is essential for any new administrator for
accompanying the applications.
In User Details information like number of clients visited the application for
any particular date from the date of installing the application is maintained.
For any particular session login and logout time is maintained. This
information is utilized in instance control.
Details regarding existing users their authorized status and their password are
maintained. This criteria is for abstraction.
Facility for new user registration is also provided, so information regarding
new user is also maintained.
In Messaging Details, Details include the client who have messaged to the
admin, their message, message size, date of messaging are stored.
25
3.4 DATABASE DESIGN
• Table Name : Server Details
Table Description : This stores static server details
FIELDS DATATYPE
Servlet/JSP specification Text(15)
Version Text(15)
• Table Name : Number of users
Table Description : This is to find the number of users visited
the Application in a particular date.
FIELDS DATATYPE
S.No Auto Number
Date Text(15)
No.of .User Number
• Table Name : New user
Table Description : This stores registration information
FIELDS DATATYPE
Row id Auto Number
FName Text(20)
LName Text(20)
Pwd Text(6)
Age Number
Gender Text(6)
Address Text(50)
Phone Number
Mail-id Text(20)
• Table Name : Messaging Details
Table Description : This table contains data about the clients
Who messaged for the application admin
FIELDS DATATYPE
Row-id Number
To addr Text(15)
From Text(15)
addr
Subject Text(10)
Msg Text(100)
26
Msg Size Number
Date Text(10)
import java.lang.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
import javax.swing.event.*;
import java.net.*;
import java.io.*;
import java.net.InetAddress.*;
public class NetView extends JFrame
{
JButton jbn;
Icon icn;
NetView()
27
{
JMenuBar jmb=new JMenuBar();
Container cnr=this.getContentPane();
cnr.setLayout(null);
28
find.setMnemonic('S');
view.setMnemonic('V');
appl.setMnemonic('U');
help.setMnemonic('H');
mesg.setMnemonic('M');
eXit.setMnemonic('X');
Repo1.setMnemonic('C');
Repo2.setMnemonic('P');
Repo3.setMnemonic('F');
Calc.setMnemonic('C');
noTe.setMnemonic('B');
Read.setMnemonic('R');
mesg1.setMnemonic('S');
mesg2.setMnemonic('V');
mesg3.setMnemonic('M');
find.add(Myho);
find.add(ByHo);
find.add(ByIp);
find.add(Ipot1);
find.add(Ipot2);
file.add(find);
file.add(eXit);
view.add(Repo1);
view.add(Repo2);
view.add(Repo3);
mesg.add(mesg4);
mesg.add(mesg5);
mesg.add(mesg6);
mesg.add(mesg1);
mesg.add(mesg2);
mesg.add(mesg3);
appl.add(Calc);
29
appl.add(noTe);
help.add(Read);
ByIp.add(Sthi);
ByIp.add(Mthi);
Ipot1.add(Soth);
Ipot1.add(Moth);
icn=new ImageIcon("d:/lanmonitor/natpark.jpg");
jbn=new JButton("",icn);
jbn.setLocation(300,150);
jbn.setSize(240,240);
jmb.add(file);
jmb.add(view);
jmb.add(appl);
jmb.add(mesg);
jmb.add(help);
cnr.add(jbn);
Ipot2.addActionListener(new Action());
eXit.addActionListener(new Action());
ByHo.addActionListener(new Action());
Sthi.addActionListener(new Action());
Soth.addActionListener(new Action());
Mthi.addActionListener(new Action());
Moth.addActionListener(new Action());
Myho.addActionListener(new Action());
Repo1.addActionListener(new Action());
Repo2.addActionListener(new Action());
Repo3.addActionListener(new Action());
mesg1.addActionListener(new Action());
mesg2.addActionListener(new Action());
mesg3.addActionListener(new Action());
mesg4.addActionListener(new Action());
mesg5.addActionListener(new Action());
30
mesg6.addActionListener(new Action());
Calc.addActionListener(new Action());
noTe.addActionListener(new Action());
Read.addActionListener(new Action());
31
}
catch(Exception e1)
{
String act="Invalid Path/File Name";
ErrMsgWindow msg=new ErrMsgWindow();
msg.ErrorMesgWin(act);
}
}
if(s=="Calculator")
{ Runtime rt=Runtime.getRuntime();
try
{
rt.exec("u:/Calf.class");
}
catch(Exception e1)
{
String act="Invalid Path/File Name";
ErrMsgWindow msg=new ErrMsgWindow();
msg.ErrorMesgWin(act);
}
}
if(s=="Consolidate")
{
Runtime rt=Runtime.getRuntime();
Process p=null;
try
{
p=rt.exec("Wordpad d:\\ Consol.class");
p.waitFor();
}
catch(Exception e1)
{
String s1="Invalid Path/File Name";
ErrMsgWindow msg=new ErrMsgWindow();
32
msg.ErrorMesgWin(s1);
}
p.exitValue();
}
if(s=="Passed")
{
Runtime rt=Runtime.getRuntime();
Process p=null;
try
{
p=rt.exec("wordpad d:\\ Passed.class");
p.waitFor();
}
catch(Exception e1)
{
String s1="Invalid Path/File Name";
ErrMsgWindow msg=new ErrMsgWindow();
msg.ErrorMesgWin(s1);
}
p.exitValue();
}
if(s=="Failed")
{ Runtime rt=Runtime.getRuntime();
Process p=null;
try
{
p=rt.exec("wordpad.exe d:\\ Failed.class");
p.waitFor();
}
catch(Exception e1)
{
String s1="Invalid Path/File Name";
33
ErrMsgWindow msg=new ErrMsgWindow();
msg.ErrorMesgWin(s1);
}
p.exitValue();
}
if(s=="Sessioner")
{
Runtime rt;
Process p;
try
{
rt=Runtime.getRuntime();
p=rt.exec("d:/lanmonitor/session.bat");
p.waitFor();
p.exitValue();
rt.exec("notepad d\\Session.class");
}
catch(Exception e1)
{
String s1="Invalid Path/File Name";
ErrMsgWindow msg=new ErrMsgWindow();
msg.ErrorMesgWin(s1);
}
}
if(s=="Viewer")
{
Runtime rt;
Process p;
try
{
rt=Runtime.getRuntime();
p=rt.exec("d:/viewer.bat");
p.waitFor();
p.exitValue();
34
rt.exec("notepad d: \\SViewer.class");
}
catch(Exception e2)
{
String s1="Invalid Path/File Name";
ErrMsgWindow msg=new ErrMsgWindow();
msg.ErrorMesgWin(s1);
}
}
if(s=="Message")
{
MessageSender ms=new MessageSender();
ms.MsgSender();
}
if(s=="Read Me")
{
Runtime rt;
Process p;
try
{
rt=Runtime.getRuntime();
p=rt.exec("WordPad d:/lanmonitor/mainfiles/Readme.txt");
p.waitFor();
p.exitValue();
}
catch(Exception e1)
{
String s1="Invalid Path/File Name";
ErrMsgWindow msg=new ErrMsgWindow();
msg.ErrorMesgWin(s1);
}
}
if(s=="My Host")
{
35
MyHost mY=new MyHost();
mY.IamUrHost();
}
if(s=="By Host Name")
{
HostWise Hw=new HostWise();
Hw.HWisesrc();
}
if(s=="Single Host") //IP Local LAN <Single Host>
{
SglinLAN sgli=new SglinLAN();
sgli.SglInLAN();
}
if(s=="A Host") //IP Selective <Remote Host>
{
SgloutLAN sglo=new SgloutLAN();
sglo.SglOutLAN();
}
if(s=="Several Host") //IP Local LAN <Several Host>
{
LANin mni=new LANin();
mni.ManyInLAN();
}
if(s=="Hosts")
//IP Selective <Remote Hosts>
{
LANout mnyo=new LANout();
mnyo.ManyOutLAN();
}
36
}
if(s=="MAC_Addr")
{ Runtime rt=Runtime.getRuntime();
MACAddr mac=new MACAddr();
mac.MAC_tbl();
try
{
rt.exec("wordpad d:\\MACtbl.class");
}
catch(Exception e1)
{
String act="Invalid Path/File Name";
ErrMsgWindow msg=new ErrMsgWindow();
msg.ErrorMesgWin(act);
}
}
if(s=="Name_Tbl")
{
Runtime rt;
NameTable nt=new NameTable();
nt.Name_tbl();
try
{
rt=Runtime.getRuntime();
rt.exec("notepad d:\\Nametbl.class");
}
catch(Exception e1)
{
String act="Invalid Path/File Name";
ErrMsgWindow msg=new ErrMsgWindow();
msg.ErrorMesgWin(act);
}
}
37
if(s=="Proto_Statis")
{
Runtime rt=Runtime.getRuntime();
ProtocolViewer rout=new ProtocolViewer();
rout.ProtocolView();
try
{
rt.exec("notepad d:\\Status.class");
}
catch(Exception e1)
{
String act="Invalid Path/File Name";
ErrMsgWindow msg=new ErrMsgWindow();
msg.ErrorMesgWin(act);
}
}
}
}
class SgloutLAN implements ActionListener
{
JFrame jfm;
JTextField jtf;
JButton jbn1,jbn2,jbn3;
int count=0;
Counter cnt=new Counter();
public void SglOutLAN()
{
jfm=new JFrame("IP Selective <Remote Host>");
Container cnr=jfm.getContentPane();
cnr.setLayout(null);
38
jbn1=new JButton("Ok");
jbn1.setMnemonic('O');
jbn1.setLocation(200,130);
jbn1.setSize(100,25);
jbn1.addActionListener(this);
jtf=new JTextField();
jtf.setLocation(200,50);
jtf.setSize(250,25);
jbn2=new JButton("Cancel");
jbn2.setMnemonic('C');
jbn2.addActionListener(this);
jbn2.setLocation(350,130);
jbn2.setSize(100,25);
jbn3=new JButton("Continue");
jbn3.setMnemonic('n');
jbn3.setLocation(50,130);
jbn3.setSize(100,25);
jbn3.addActionListener(this);
cnr.add(jbn1);
cnr.add(jbn2);
cnr.add(jbn3);
cnr.add(jlb1);
cnr.add(jtf);
jfm.setLocation(150,200);
jfm.setSize(500,200);
jfm.setVisible(true);
}
public void actionPerformed(ActionEvent e1)
39
{
String s=e1.getActionCommand();
if(s=="Ok")
{
String s1=jtf.getText();
RemoteHost Rh=new RemoteHost();
Rh.RemoteID(s1);
}
if(s=="Continue")
{
count=cnt.Counting(count);
System.out.println("count "+count);
}
if(s=="Cancel");
{
jfm.setVisible(false);
}
}
}
class Counter
{
public int Counting(int i)
{
i+=1;
return i;
}
}
6.5.2 Sample Code in Application Module
40
String u=request.getParameter("uname");
String p =request.getParameter("pword");
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:eg");
Statement s=con.createStatement();
ResultSet r=s.executeQuery("select * from login where uname='"+u+"'
and pword='"+p+"'");
out.println("Hello");
if(!r.next())
{
out.println(" Invalid UserName ");
out.println(" Check Your UserName and PassWord !");
out.println("<a href=login.html> Login Again </a>");
}
else
session.putValue("uname",u);
%>
<jsp:forward page="ehome.jsp" />
String fname=request.getParameter("fname");
String lname=request.getParameter("lname");
String pword=request.getParameter("pword");
int age=Integer.parseInt(request.getParameter("age"));
String gender=request.getParameter("gender");
String addr=request.getParameter("addr");
long zipcode=Long.parseLong(request.getParameter("zipcode"));
41
long phone=Long.parseLong(request.getParameter("phone"));
String mailid=request.getParameter("mailid");
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("Jdbc:Odbc:eg");
String fname=request.getParameter("fname");
String lname=request.getParameter("lname");
String pword=request.getParameter("pword");
int age=Integer.parseInt(request.getParameter("age"));
42
String gender=request.getParameter("gender");
String addr=request.getParameter("addr");
long zipcode=Long.parseLong(request.getParameter("zipcode"));
long phone=Long.parseLong(request.getParameter("phone"));
String mailid=request.getParameter("mailid");
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("Jdbc:Odbc:eg");
String str="insert into
newuser(fname,lname,pword,age,gender,addr,zipcode,phone,mailid)
values('"+fname+"','"+lname+"','"+pword+"',"+age+",'"+gender+"','"+addr+"',"+z
ipcode+","+phone+",'"+mailid+ "')";
PreparedStatement s=con.prepareStatement(str);
n=s.executeUpdate();
if(n==0)
out.println("Error in insertion : 1");
n=s.executeUpdate();
if(n==0)
43
String fname=request.getParameter("fname");
String lname=request.getParameter("lname");
String pword=request.getParameter("pword");
int age=Integer.parseInt(request.getParameter("age"));
String gender=request.getParameter("gender");
String addr=request.getParameter("addr");
long zipcode=Long.parseLong(request.getParameter("zipcode"));
long phone=Long.parseLong(request.getParameter("phone"));
String mailid=request.getParameter("mailid");
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("Jdbc:Odbc:eg");
String str="insert into
newuser(fname,lname,pword,age,gender,addr,zipcode,phone,mailid)
values('"+fname+"','"+lname+"','"+pword+"',"+age+",'"+gender+"','"+add
r+"',"+zipcode+","+phone+",'"+mailid+ "')";
PreparedStatement s=con.prepareStatement(str);
n=s.executeUpdate();
if(n==0)
out.println("Error in insertion : 1");
str="insert into login(uname,pword)
values('"+fname+"','"+pword+"')";
s=con.prepareStatement(str);
n=s.executeUpdate();
if(n==0)
out.println("Error in insertion : 2");
%>
<jsp:forward page="ehome.jsp" />
44
45
CHAPTER -4
4. IMPLEMENTATION.
The main modules of this project Active Network System (ANS) are
• LAN monitoring
• Application Monitoring
4.1.1 LAN Monitoring
46
This module is designed as GUI Mode Application. So that it is very
easy to handle by end users.
This main objective of the project is used to avoid Data Collision / IP
Confliction between a System and another system of same or different block
when each blocks interconnected.
It is used to determine Host Names, Host Addresses of systems of in
this LAN and systems of different block when each block is interconnected. It
determines routing table of the server host, network protocol statistics in the
LAN and H/W address of each host in the LAN.
Also determines which type of IP Address assigned to a system or
group of systems of this LAN or different LAN when each block is
interconnected after the connection was established.
It involves establishing connection to the remote Host(s) given by the
user. It is possible to send messages between systems in LAN.
Additional features like Calculator and browser is included in this
project to improve the user interface.
47
48
CHAPTER -5
49
Though the test phase is often thought of as
separate and distinct from the development effort--first develop, and
then test--testing is a concurrent process that provides valuable
information for the development team.
They are
50
• A successful test is one that uncovers an undiscovered error.
51
‘Boundary Conditions’ are tested to ensure that
the module operates properly at boundaries established to limit or
restrict processing. All ‘independent paths’ through the control
structures are exercised to ensure that all statements in a module
have been executed at least once. Finally, all ‘error-handling paths’
are tested.
52
5.3.2.1. TOP-DOWN INTEGRATION
The process of
importing a test project and setting up a testing environment is the
same as the process for importing a project and setting up the
environment for development.
53
5.4. IMPLEMENTATION
When the initial design was done for the system, the
department was consulted for acceptance of the design so that
further proceedings of the system development can be carried on.
After the development of the system a demonstration was given to
them about working of the system. The aim of the system illustration
was to identify any malfunctioning of the system.
Initially the system was run parallel with manual system. The
system has been tested with data and has proved to be error-free and
user-friendly. Training was given to end -user about the software and
its features.
54
5.5 SCREEN SHOTS
55
Fig7.3 Search thru Host Name
56
Fig7.5 Searching several host
57
Fig7.8 View Menu
58
Fig 7.10 Net Shower menu
59
Fig 7.12 Net Shower
60
Fig 7.16 Messenger
61
Fig 7.19 Admin Details
62
Fig 7.20 User Details
63
Fig 7.21 for any Particular date –User details
64
Fig 7.23 Mailing details
65
CHAPTER -6
66
6. CONCLUSION & FUTURE ENHANCEMENT
6.1 CONCLUSION
The Active Network System is developed to successfully incorporate
the essential requirements. In this project monitoring is handled in two ways.
LAN Monitoring is highly administrator friendly. It is designed with java
swing, an efficient GUI environment is provided. It assists the administrator to
know about the active and inactive clients in the LAN network along with their
status.
Application Monitoring is highly beneficial for any application
administrator. In this project website is taken as the specific application. It is
efficient in Instance control and session maintenance.
67
6.3 BIBLIOGRAPHY
6.3.1 Books
68