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 6743451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:57:46+00:00 2026-05-26T11:57:46+00:00

I hava an app on JSF where I upload a file. Very basic. The

  • 0

I hava an app on JSF where I upload a file. Very basic. The question is, is there a way to launch (or keep executing) another java program when I reach the last page of my app? That is:

UploadFile.xhtml -> receiveFile.java -> Thanks.xhtml (user will close this the browser) -> another program make some processing on the recently uploaded file (even if user shutsdown the PC)

I thought using a daemon program that keeps checking if a new file arrived, but I want to know if there’s a way to keep executing things even if the user closes the browser.

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-26T11:57:46+00:00Added an answer on May 26, 2026 at 11:57 am

    Certainly the best way to do this is to have a scheduler that will look for certain files every x time interval and do something with it within a thread.

    Advice, make sure you shut down the scheduler on context unload. Here is an example on how to use a SchedulerService.

    You would want to do something like in a context listener.

        ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
        Runnable handler = new Runnable() {
               public void run() { 
                    // handle file
               }
        };
        scheduler.scheduleAtFixedRate(handler, 10, 10, SECONDS);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I hava a basic Hibernate/JPA question. I want to find a best practice solution
I hava a CSV file that I want to treat as source code. Essentially
I am trying to upload an image to the server. I hava a form
I hava very large table with 1373228 rows. I need to copy the result
I hava an unordered List navigation and i wanted to transform this to JSF
I hava a .app application and I want to include it inside my project
I hava a Google Maps implementation in my iPhone app. First, the map is
I hava a Java project that relies on several libraries, which are distributed as
I hava java swing project which is developed in JBuilder IDE. Now I need
I hava a java program, a section of it is compute intensive, like this

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.