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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:42:44+00:00 2026-05-30T02:42:44+00:00

Can anyone teach me or direct to a working example to satisfy this requirement.

  • 0

Can anyone teach me or direct to a working example to satisfy this requirement.

Scenario:

  1. List item My Web App is using spring mvc.
  2. One of the services it provides is that when the user clicks on a button a long running process will occur on the server. (Query database, write files, write logs, etc…) this process can take a few seconds or a few minutes.
  3. *Problem***
    How can I implement the service to update the client of its progress.


  4. The service returns true or false if the process was successful.

Thanks for your replies. A code snippet or a complete tutorial will be most helpful.

  • 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-30T02:42:45+00:00Added an answer on May 30, 2026 at 2:42 am

    There are a good number of ways to handle a scenario like this. One way is to model the work in terms of a “Process”, which contains a “status”, including a percentage completion.

    If you imagine what this might look like on a website, clicking the button to start the process would submit a form that begins the process and assigns some sort of identity to the process, almost like if you were creating any other sort of object. It would then redirect you to a “process status” page.

    The process status page would query for the status of the process and display it. It’d probably have a URL parameter for the process’s ID. It would perhaps update itself using an AJAX call to return a progress percentage.

    On the backend, you now need to solve a couple of problems: finding out the current status of process N, and updating the status of process N. You could accomplish this in a number of ways, including storing the progress in the database or having some sort of in-memory table of running jobs. You could also use some sort of heuristic to estimate a percent. For example, if it’s a “register new user” job, maybe it’s 20% done if the user’s table has an email address, 40% done if the user avatar table has data in it for this user, etc. I don’t recommend this as much.

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

Sidebar

Related Questions

Can anyone give me pointers to good books or web sites that teach how
Can anyone shed light on this for me? undefined method `first_name' for # Here
Can anyone direct me to a good tutorial for sqlite browser. I cant seem
Can anyone teach me how to use mojarra to encode my JSF files. I
Just a question, can anyone present a Android App that streams from brightcove or
Is there anyone who can teach me how to show an UISegmentedControl object in
Anyone one tell me where can I find tutorials to teach me how to
Can anyone teach me how to create a footer div which is always stay
I am excellent in Javascript, but currently started learning ActionScript. Can anyone teach me
Can anyone offered syntax for a sql query that takes an already created table

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.