Welcome, Guest. Please login or register.
Did you miss your activation email?
Pages: [1]   Go Down
  Print  
Author Topic: How to read the last 10lines of a log file  (Read 1164 times)
0 Members and 1 Guest are viewing this topic.
jazz2k8
Yo Maaan Cheer Up...
Member
*

Reputation: 0
Offline Offline
Posts: 82
Referrals: 0

WWW Awards
« on: June 24, 2009, 08:10:44 AM »

Hi

I am having file import process in my application for which i am having a log file.
what is the challenging task here is
in that log file latest imported file information should be stored that should be displayed to the browser as "Current Status Tag"

The last 10 files log should be displayed to the browser.

i can display the whole log in the browser by refreshing the browser while importing ,if the log is not appended further,then i can display only the  last line also.

i want to display the last content of the log file..please assist me how to move further...

thanks and regards,
jazz
Logged

visit my blog: www.yoteam.co.cc
Arkie
Javaforums.net Admin
Senior Member
*

Reputation: 16
Developer @ Javaforums.net
Offline Offline
Posts: 2593
Referrals: 13

WWW Awards
« Reply #1 on: June 24, 2009, 09:18:47 AM »

Do you know how to read a file?
If so, read the file before displaying the data in the browser.

you can do your reading in a bean and return the result in your taglib to iterate through the data before the servlet is initialized. I don't remember the method but i think it was either init or doGet?
Logged

Java and .NET developer

To students: It doesn't matter how hard you've studied; the material won't be on the exam anyway.

Fan of http://www.retardedweblogger.com
Oh man, too much stuff to do in so little time.

http://img222.imageshack....707/arkietomatoesmall.jpg
Blizzcon 2k9 Grubby and Cassandra Ng engaged ! <3
Triple D, eerste Denken Dan Doen
Pages: [1]   Go Up
  Print  
 
Jump to:  

Your Ad Here