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

  • SEARCH
  • Home
  • 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 8796007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:31:18+00:00 2026-06-13T23:31:18+00:00

I have a little problem figuring this out the right way. I have a

  • 0

I have a little problem figuring this out the right way.

I have a Java application reading a log file continuously using threads. While that application is still reading the log file, a client should be able to query the current status (i.e. a certain key was found in the log file) through a java servlet.

My current issue is that I am having problems getting that status using the doGet-Method of the servlet. WHile running the thread is supposed to change a single boolean variable.

My question is:

How do I get the Log Reader Thread to start running when I deploy the Servlet on my Tomcat. In idle mode the Log Reader is listening for new files in a folder and starts to read them once they appear?

  • 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-06-13T23:31:19+00:00Added an answer on June 13, 2026 at 11:31 pm

    Please check below link you can use SevletcontexListener

    In SevletcontexListener you can start you logger

    Link

    public void contextInitialized(ServletContextEvent servletContextEvent) 
        {
              System.out.println("ServletContextListener started"); 
             //start thread here
        }
    public void contextDestroyed(ServletContextEvent servletContextEvent) {
         //stop thread here
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a little problem figuring out what request (MySQL) would suit this requirements:
just having a little issue figuring this jquery problem out. I have a table
i have little problem in using my application application having msaccess database if i
I'm having a little problem figuring out the best way to open up a
I have a little problem. This is my code: stackPanelShapesContainer = new StackPanel(); InitializeStackPanle();
i have a little problem with my java socket code. I'm writing an android
I have a little problem about Google Maps. I'm using Geocoding (xml) for getting
I have one little problem...Here is my code..Is there a way to distribute weights
I have little problem with my iphone application. I have such classes and interfaces:
I have little problem with printing data like this, I have written script like

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.