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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:07:28+00:00 2026-05-31T17:07:28+00:00

We are in the process of migrating a Swing two tier application to a

  • 0

We are in the process of migrating a Swing two tier application to a web application (tomcat, Spring MVC, extJS if it makes any difference).

We found code like this in the application (simplified Javaesc pseudo code).

class DoSomethingComplicatedAction extends Action{
    public performAction(..){
        // do lots of stuff here
        // decend about 40 steps in the call stack
        answer = JOptionPane.showConfirmDialog()
        if (answer == something){
            // do something convoluted here
        } else {
            // do something even more convoluted here
        }
}

i.e. in the middle of some processing, some interaction with the user is started. Obviously I can’t do that directly with a servlet.

One thing that could handle this rather nicely are continuations. So I checked if I can use those and were surprised that there are actually libraries that enable this kind of stuff: Continuations in Java

When checking the libraries mentioned in that question and its answers I ran across this statement

Continuations will be replaced by standard Servlet-3.0 suspendable
requests once the specification is finalized. Early releases of
Jetty-7 are now available that implement the proposed standard
suspend/resume API

But I couldn’t find an example how to do stuff like the above with the Servlet 3.0 API

So the questions are:

  1. Can the above be done using the Servlet-3.0 API without completely
    refactoring the code sketched above into two or more separate
    actions

  2. If the answer to the above is yes: How? Are there somewhat complete examples for this or a similar use case available?

  3. Should I use Continuations or the Servlet API? Or if this can’t be answered directly on what conditions does this decision depend on?

  • 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-31T17:07:29+00:00Added an answer on May 31, 2026 at 5:07 pm

    The continuation api proposed by jetty was a leading workaround to overcome the limitations of the servlet api at the time. (one request, one thread)

    Now, you should be pretty much only use the Servlet 3.0 only.

    Note that in your case, you may not even need to do anything special, because Actions are re-active, and you can go the usual ajax way.

    I am adding a few relevant links:

    1. Ajax, Reverse Ajax
    2. Async vs sync servlets
    3. Jetty 8.0 and continuations
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am in the process of migrating an ASP.NET web forms application to ASP.NET
I'm in the process of migrating a VB.NET web application from Visual Studio 2005
We are in the process of migrating our ASP.NET application to use Jquery instead
There is a conversion process that is needed when migrating Visual Studio 2005 web
I'm in the process of migrating an EJB 2 application to EJB 3 (and
I'm currently in the process of migrating an application that uses NServiceBus 2.6 to
I am in the process of migrating an application ( Sage ) from Twisted
I am in the process of migrating a large scale web service to be
We are currently in the process of migrating our application from our production environment
I am in the process of migrating an Access application to Sharepoint 2010 (Enterprise).

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.