Functional Specification

Under construction

Full user data logging

All available user data in request and session scope are recorded and store into the database.

Platform indepentence

JHttpLog is a portable Java library that can run on any Servlet 2.3 compliant J2EE servers. It will be tested in the follow J2EE platfroms:

Catagory Product Note Status
Commercial BEA Weblogic 7.0 The best J2EE Server To be tested
IBM Websphere 5.0 The 2nd best To be tested
Sun SunONE Application Server (platform edition) Free license commercial product To be tested
Public Apache Jakarta Tomcat 4.1 The most popular servlet engine Tested
Jetty Open source servlet engine To be tested


JHttpLog follows the following standards and is interoperable with any applications that support the standards

  1. JSR52 Java Servlet 2.3

    JHttpLog is fully compliant to JSR52 Java Servlet standards and works in any Java Servlet 2.3 compliant servlet engine

  2. JSR12 Java Data Object (JDO)

    Java Data Object. Any database can be used as long as it is supported by the JDO implementation

  3. IETF RFC 2068 HTTP 1.1 Protocol

    HTTP 1.1 Protocol

  4. W3C Common and Extended Log Format

    Log format. Not completed yet

Process Model

  • Session: Session ID, creation time, destroy time
  • HttpRequest: RFC 2068 data
  • (Optional) JavaScript collector
  • (Optional) Java Applet collector
  • Extract data from HttpSession and HttpRequest to Value Objects
  • (Optional) Perform query to Internet Address Registries
  • (Optional) Email notification
  • Return boolean value true if criterial processes are successful
  • Log application process to Log File, depends on the defined log level
  • Store all collected information to the database. One record for each session.

Implementation Details

  • Responsible for maintaining a list of active session and
  • Implement as a Singleton
  • Register an session to the LogManager
  • Notify the LogManager upon session destroy
  • Implements javax.servlet.http.HttpSessionListener
  • Process each request to get the first request for data collection
  • By default, it filters all requests. It is configurable to filter HTTP request to specific URL by URL Pattern to optimize performance. (it depends on the site design)
  • Implements javax.servlet.Filter


Description State Diagram

HTTP Logging Manager (manager) manages the HTTP Logging tasks throughout the lifecycle of a session.

  1. Initially, there is no existing HTTP Log Data (data)

  2. A session is registered to the manager. A piece of data is created for the session

  3. At the first request after the session is created, the request is passed to the manager and HTTP header data are extracted and stored to the piece of data .

  4. In proceeding request, no action is taken.

  5. Upon destroy of the session, the manager clean up the session entry by persisting the data and remove the session entry.