Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6781539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:38:09+00:00 2026-05-26T16:38:09+00:00

I have a j2ee web application which uses log4j for logging. I want to

  • 0

I have a j2ee web application which uses log4j for logging. I want to have a log viewer on the admin page. This should allow the users to view the log4j logs on the application UI. Does anyone know how can this be implemented in java, maybe,
– realtime scrolling logs would be great,
– otherwise lets say last 500 lines of logs with manual refreshes can be done.
The issue with the latter using file operations is that i am not sure how long each refresh would be as the log file can be 10 MiB in size before log4j generates a new file.

What would be the best way to do it. any pointers would be great.. Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:38:09+00:00Added an answer on May 26, 2026 at 4:38 pm

    you can do this, you have to look at the following constructs.

    1. in your log4j.xml for your appliction, make sure your appender is sending to a publically accessable folder.

    2. in your view application, everytime you refresh (a refesh button on the page), go to the server, read the file, spurt out the contents to your page.

    3. better still, the read request should be behind a JMS implementation, so it can read in the background without blocking the view request at the front. IE, if the file is quite large, you are not blocking requests to the servlet. Once you have finished the read, you can search for an occurence of a string to truncate the file contents (probably the output date and timestamp). It is going to be memmory intensive, but its been done quite a lot of times.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have J2EE web application which uses JSF framework. Now I am trying to
I have a J2EE application with a web service which goes like http://servername/service?task=getFile&id=25 How
I have a j2ee web application running on Spring framework. I want to implement
I have two web application which are deployed in the same J2EE Application server.
Hi have this j2ee web application developed using spring framework. I have a problem
I have a J2EE application which has two web.xml files. One is called web.live.xml
I have a J2EE web-application running on Sun hardware with OpenSolaris/Glassfish stack. We're starting
My requirement is I have server J2EE web application and client J2EE web application.
Is it possible to have a Java/J2EE web application integrate/communicate with SharePoint to load,
I have a j2ee web application running on struts. I am using validation XMLs

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.