Contact Us
  
 
 
    SearchSearch   RegisterRegister   Log inLog in 

Know how many clients and IPs are access to server

Know how many clients and IPs are access to server

 
Post new topic   Reply to topic     Forum Index -> Java,Struts framework, Velocity, JSF, Hibernate, Servlet, JSP, javaBeans
View previous topic :: View next topic  
Author Message
juniormember



Joined: 28 Jun 2008
Posts: 154

PostPosted: Tue Nov 25, 2008 11:42 am    Post subject: Know how many clients and IPs are access to server Reply with quote

Hi

Is any code or class which can inform how many clients are accessing server in java. I want IP address also of client which is accessing server. Which time they connected to server and idle or busy (quering or using)
Back to top
View user's profile Send private message
seniormember
Site Admin


Joined: 20 Jul 2008
Posts: 77

PostPosted: Thu Dec 04, 2008 1:16 pm    Post subject: Reply with quote

Class and certain code I dont know can give information of logging IP address to server,

Web server can give important information of logging IP address to server. Apache web server can use Apache Module mod_log_config and provide logging of client requests in customizable format and save in file. File will be log file and can save user defined path.

http://httpd.apache.org/docs/2.0/mod/mod_log_config.html

Tomcat have also logging facility and store information in log file of client request through logging API.

http://wiki.apache.org/tomcat/FAQ/Logging

http://tomcat.apache.org/tomcat-5.5-doc/logging.html

Log4J API from apache helps to store IP address and request of client with exception in log file.

http://logging.apache.org/log4j/

Download log4j and implement in application.

Second You can use session object with hashmap or hashtable to store IP address who logged on to server or logged out from server.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Java,Struts framework, Velocity, JSF, Hibernate, Servlet, JSP, javaBeans All times are GMT
Page 1 of 1

 
Jump to:  
  Quick Post a Reply Topic
     
  Name (required)  
     
  Email Address (will not be published) (required)  
     
  Subject of topic (required)  
     
   
     
   
     
  Advertisement  
     
 
     


  More Links  
 
JSP Introduction
JSP Setup
Simple JSP Example
JSP Variable
Array Declaration in JSP
JSP Forms and User Input
Form Validation
JSP Cookies
JSP Session Object
Loop, content collection, iterator, conditional check in JSP
JSP Application Object
JSP Include
JSP Response Object
JSP Request Object
JSP Error Handling
JSP File Handling Object
JSP Action Tag
JSP Implicit Objects
JSP Declaration
JSP Directive
JDBC Introduction
JDBC Driver
JDBC Connection
JDBC Prepared/Statement
JDBC ResultSet
JDBC Close Connection object
JDBC Insert
JDBC Display Records
JDBC Update
JDBC Delete
JDBC Sorting
JDBC Query
JDBC Exception
JDBC Add Batch
JDBC Transaction/RollBack