You are on page 1of 23

AMBEDKAR INSTITUTE OF TECHNOLOGY DELHI

----------------------------------------------------------------------------------------------------------------------------------------------------

PROJECT REPORT
----------------------------------------------------------------------------------------------------------------------------------------------------

MINOR PROJECT: WEBLOGGER

Team members:
Mayank tanwar Gurudev jayant Ravi raj

Mentor: Deva nand meena

ACKNOWLEDGEMENT
The satisfaction that accompanies that the successful completion of any task would be incomplete without the mention of people whose ceaseless cooperation made it possible, whose constant guidance and encouragement crown all efforts with success. We are grateful to our project guide Mr. Prakash sir for the guidance, inspiration and constructive suggestions that helpful us in the preparation of this project.We also thank our colleagues who have helped in successful completion of the project.

Mayank tanwar Gurudev jayant

Ravi raj

Content:
1. Objective 2. Architecture 3. Feasibility Study
4.

Machine specification

5. Working of Present System


6.

Screen shots

7. Diagrams
a)

Data Flow Diagram

b) E-R Diagram
c)

Sequence Diagram

8. Conclusion 9. Bibliography

OBJECTIVES:
Want to know who's been accessing your website? Want to track them by IP address, browser type, even username? Web Logger lets you log information about the people who come to a website, without their knowledge. Unless you tell them, they have no way of knowing that they've been tracked as you log their time of access, where on your site they went, what their username is (if they logged in to your website, as you're going to see how to do), what their IP address is (and if they have cable access, they have a fixed IP address), how long they worked with the web page they accessed, and what type of browser they have. Want to get a handle on who comes to your site and how long they stay? Then Web Loggers for you. Using Web Logger, you can track users as they move around your site. In fact, you can even block access if you want. What does the user see? Where the user is accessing a page called target.jspexcept for the text Web Logger has added to the bottom of the page. Unless that added text informed the user that he was being tracked (and, of course, you can remove that text from Web Logger), he would have no way of knowing it.

ARCHITECTURE
DIAGRAM: WEBLOGGER

EXPLAINATION: Here's the information that's logged for each user:


Access time Authentication type Username User IP address URL accessed Browser Milliseconds used

Here's what the report will look like. You can have this logged in the web server's logs or in a separate log file of your own creationWebLogger lets you do either: User access at Mon Mar 07 15:47:53 EST 2006 Authentication type: BASIC User name: Steve User IP: 127.0.0.1 Accessing: /logger/targets Host: 127.0.0.1 Browser: Internet Explorer Milliseconds used: 109 To make what it does possible, Web Logger uses a filter. You can get your hands on the data sent to JSPs and servlets, and on the data they return, using filters. All you have to do is to write your filter, compile it, and install it so that the web server only grants access to the web resource you're filtering through that filter. And that gives you complete control.

FEASIBILITY STUDY :
The weblogger module will display the empty boxes for user name and password. The user will enter the details and press the submit button. In case there is any change to be made, cancel button can be pressed so that the details entered already will be cleared.

Technical Feasibility The technology suggested for implementing the project is Login system with web server (Internet Authentication Server) and SMS server. The data will be collected in XML format through web using java technology. The system will be hosted through a Web Server. The hardware requirements are a robust server and leased line connectivity. The project proposed will involve procurement of one robust webserver. The database also can be stored in the same server. Other requirements are Leased line connectivity for internet, development of Webpage with

java technology for checking and uploading data to database and a SMS server to receive and reply SMS queries. Operational Feasibility Initial development of application needs to be done through external agency with annual maintenance contract. Further improvements to the system and maintenance could be done internally. A few days orientation training on the new system will be sufficient to enhance the operating skills of the users

MACHINE SPECIFICATION:
TOOLS, PLATFORM & LANGUAGE TO BE USED

TOOLS: FRONT-END PLATFORM: WINDOW NT 4.0 /XP : JAVA NET BEANS 7

HARDWARE AND SOFTWARE ENVIRONMENT

MINIMUM HARDWARE RECOMMENDATION: PROCESSOR : Pentium iv

RAM STORAGE CAPACITY CONNECTIVITY SOFTWARE RECOMMENDATION: OPERATING SYSTEM

: : :

128 MB 10 GB LAN or Internet (minimum speed : 512Kbps)

WINDOW NT 4.0 /9X/ XP/VISTA/7.

Working of present system :


Simple Filter
A lot of filter technology is needed to build Web logger. WebLogger works with both the request object holding the data sent from the browser and the response object sending data back to the browser. So how do you work with, for example, the response object to send data back to the browser? Say that you want to filter access to a JSP page named simple.jsp and that you want a filter to add some text to the output of this JSP sent back to the browser. Here's what that JSP page looks likeas it stands, all this page does is to display the text "Using a filter" in an <H1> HTML header. Because you have access to the data sent to and from this JSP page in a filter, you can display your own text in the web page . In this figure, a filter attached to simple.jsp wrote the text "The filter wrote this," just as WebLogger added the warning about logging user access . Note that the URL still points to simple.jsp; there's nothing to indicate that the page is being filtered.

Significant Methods of the javax.servlet.http.ServletRequest Class

java.lang.Object getAttribute(java.lang.String name) java.util.Enumeration getAttributeNames()

Returns the value of the named attribute Returns a Java Enumeration holding the names of the attributes in the request Returns the character encoding used in the request's body Returns the length of the request body. Returns -1 if the length is not known Returns the MIME type of the body of the request Returns the locale of the client browser Returns a Java Enumeration of Locale objects giving the preferred locales of the client Returns the IP port number where the request was received Returns the value of a request parameter, such as the contents of an HTML control Returns a Java Enumeration holding the names of the parameters contained in this request. Returns an array of strings holding the values in the specified request parameter Returns the body of the request using a BufferedReader Returns the IP address of the client that sent the request Returns the name of the client that sent the request Returns the IP port of the client that sent the request Returns the name of the Internet scheme of this request, such as HTTP, HTTPS, or FTP

java.lang.String getCharacterEncoding() int getContentLength()

java.lang.String getContentType() java.util.Locale getLocale() java.util.Enumeration getLocales()

int getLocalPort() java.lang.String getParameter(java.lang.String name)

java.util.Enumeration getParameterNames()

java.lang.String[] getParameterValues(java.lang.String name)

java.io.BufferedReader getReader() java.lang.String getRemoteAddr() java.lang.String getRemoteHost() int getRemotePort() java.lang.String getScheme()

java.lang.String getServerName() int getServerPort() boolean isSecure()

Returns the name of the server where the request was sent Returns the port number where the request was sent Returns TRue if this request was made using a secure channel, such as HTTPS Removes an attribute from this request Stores an attribute in this request

void removeAttribute(java.lang.String name) void setAttribute(java.lang.String name, java.lang.Object o)

Significant Methods of the javax.servlet.http.ServletResponse Class


void flushBuffer() int getBufferSize() java.lang.String getCharacterEncoding() java.lang.String getContentType() java.util.Locale getLocale() ServletOutputStream getOutputStream() java.io.PrintWriter getWriter() void reset() void resetBuffer() void setBufferSize(int size) void setCharacterEncoding(java.lang.String charset)

Flushes any content in the buffer so it is written to the client browser Returns the buffer size used for the response, in bytes Returns the name of the encoding used in the body of this response Returns the content type used for the MIME body sent in this response Returns the locale given for this response Returns a ServletOutputStream you can use for writing binary data to the client Returns a PrintWriter object you can use to send text to the client Resets any data in the buffer, including the status code and headers Resets the data in the buffer, without resetting the status code and headers Sets the preferred buffer size for the response Sets the character encoding of the response, such as UTF-8

void setContentLength(int len) void setContentType(java.lang.String type) void setLocale(java.util.Locale loc)

Sets the length of the content in the response Sets the content type Sets the locale of the response

Restricting Access Based on Time of Day


The list of things you can do with filters is endless. You can convert, for example, the data sent to a servlet from XML to HTML, or even from French to English. You can add a common header or footer to all web pages in your site. You can use a single filter as a gateway to your entire site. You can restrict access to a JSP or servlet in case multithreading issues become a problem (on most web servers, multiple threads from multiple users can execute the same servlet or JSP code at the same time). You can even restrict access to a resource based on the time of day. Say you have a company full of employees and don't want them to access a game on your site during the day. Here's what the restricted starting page of the game, game.jsp, might look like:

Restricting Access Based on Password


At this point, you've made use of the response object in filters, but filters can also work with the request object, as WebLogger does. Using the request object lets you handle data on its way to the filtered web resource. For instance, one of the most popular uses of filters is to restrict access to web resources based on password . If the user enters the correct password, he's OK'd by the filter, which passes control on to a JSP named loggedin.jsp. On the other hand, if the user enters the wrong password, the filter denies access and displays the error page. interesting thing here is that you're reading data from HTML controlsa password control in this casein the filter. The data in the password control isn't even used in the target JSP. In the first HTML page the user sees, login.html, the password control is simply named password.

Screen shots:

WebLogger at work

Reading a password .

Restricting access based on time of day with a filter


Slapping a filter on game.jsp will make it inaccessible during working hours

Restricting access-based passwords with a filter


If the user enters the correct password, he's OK'd by the filter, which passes control on to a JSP named loggedin.jsp

Denying access for an incorrect password.


If the user enters the wrong password, the filter denies access and displays the error page

Diagrams:
Data Flow Diagram

Sequence Diagram

conclusions:

To log accesses to a web resource, you don't have to change that web resource; you can use a filter in Java-enabled web servers. To create a filter, you have to create a Java class that implements the Filter interface, which includes the init, doFilter, and destroy methods. When the user accesses the resource you're filtering, the doFilter method gets control, gaining access to the request object sent to the resource and the response object the resource sends back to the browser. WebLogger uses the request object to get its information about the user, reading the URL the user is accessing, the user's IP address, hostname, and browser type. If the user is logged in using HTTP authentication, WebLogger records the type of authentication used and records the username. It also logs the time of the user's access, as well as the time he spent accessing the web resource you're filtering. You've got options when it comes to where you want the log text sent with WebLogger. If you use Tomcat, that text is stored in stdout.log by default. But as discussed in this chapter, you can specify the log file you want to use. As also covered, you can create your own files, writing to them as you please. WebLogger is a powerful project that lets you keep track of who's been visiting your site and log that information. Not bad.

bibliography:

1. Java Server programming Ivan Bayross 2. The complete reference java

Future Scope
Scope of this project is very broad in terms of other manually taking exams. Few of them are:1.

This can be used for Security in defferent systems as well as in corporate world. Can be used at servers of a organisations as it is a web based application.

2.

You might also like