• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

What Are Web Logs

 
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could somebody please explain what web logs are, especially in Tomcat. What purpose do they serve?
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
'web logs' usually refers to an access log.

HTTP servers will log each request that comes in. As an example, a weblog entry might look like:
192.168.0.1 - - [23/Jul/2001:15:00:34 -0500] "GET /banner.html HTTP/1.0" 304

This example means that the browser at 192.168.0.1 requested the page banner.html at the time noted above. The response from the webserver was '304', which means 'no changes to the file, use your local (cached) copy'
 
ernest fakudze
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Mike. It makes sense now.
 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear mike,
can a user look in to the web log file. like running my server on my system and someone browing my server from other system in the LAN.
thanx
prabhakar
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It all depends.

For example, on our webserver at work (the one that runs www.mywinnipeg.com) the only way to get to this webserver is to know the telnet adress, port, username and password. Then you need to know where to find the log, and since it's Solaris, you tail the log file, and you can actually see the screen scroll as the requests come in.

If you're on a Windows LAN, then if you have file sharing turned on, yes they will see the file if it's under a folder that is shared.

As far as the logs being browsable from the web, no this is not (normally) possible.

Webservers usually have a doc-root folder, and only folders UNDER this directory are accessible through HTTP. But the log files will not be under this directory (or sure shouldn't be!).
 
varkala prabhakar
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear mike,
thanx for your reply, what u said to be true and its not easy to access the log with http request.
Actually i want the hits of a page, like i say http://www.myhomepage.com/../*.html , in my program if i give the URL , is there a way to get the number of hits of that page.Assume that i am not the owner of that page.
regards
prabhakar.
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You would write a program (probably in Perl) that would strip through the weblog looking for that particular page. Each time your program sees an instance of that request (a string comparison), it would increment a counter.

I say Perl, because Perl was written for exactly this kind of work and is highly optimized for string matching. Also, all the programs here at work (the ones for this kind of thing) are written in Perl.

This program (in Solaris or Unix) would run on the crontab (a part of the OS that is like the Windows Scheduler). Each day at a set time, the crontab will run your little perl program against the log. The perl program can do whatever you want it to do, including stuffing the results in a database, or emailing you the results.

And yes, all that can be done with a java program too.

There are also several products you can purchase that will do this sort of thing for you. 'Webtrends' is one that we use at work.
[This message has been edited by Mike Curwen (edited October 21, 2001).]
 
varkala prabhakar
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear mike,
thanx for the reply but i request for a more clear answer. i can look for a regular time execution but i want the page hot counts, could you plz help me in that. If you have any code that could will help me will be highly appriciated.(preferable in java).
You said about the products, can i have an url where i can download that software.
many thanx
prabhakar
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you mean, "how do I display a hit count on the page"... look to this thread for one idea. http://www.javaranch.com/ubb/Forum7/HTML/006497.html

You'll notice that someone posted a link to another thread on this site, that shows you another method. The thing with the second method (variable inside servlet), is that on server restart, the count is lost.

Webtrends is about reporting hits 'after the fact'. One thing I should mention about it.. it is NOT cheap software. And as for the URL... it's amazing how many times www.insertProductNameHere.com works.
 
varkala prabhakar
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear mike,
I dont mean how do i dispaly a hit count on the page. I mean how do i retrive the page hit count. I am not the owner of the page. say for example, Using my program i want to get the hits of javaranch home page. Is this possible.
thanxs
prabhakar.
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The answer is no this is not possible. Allowing access to a web log of a site from outside the site would be a serious security violation. If for some reason you can access the web log of a site it's a security breach.
Kyle
------------------
Kyle Brown,
Author of Enterprise Java (tm) Programming with IBM Websphere
See my homepage at http://members.aol.com/kgb1001001 for other WebSphere information.
 
What a stench! Central nervous system shutting down. Save yourself tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic