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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:31:16+00:00 2026-05-20T08:31:16+00:00

I have a servlet Filter that acts as the basis of my web stack.

  • 0

I have a servlet Filter that acts as the basis of my web stack. In my web.xml I have
specified that I want the filter to also act as a FORWARD dispatcher.

  <filter-mapping>
    <filter-name>MyFilter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>  
  </filter-mapping>

This is required for another feature in my framework.

Now I am trying to add support for asynchronous continuations. The problem I’ve come across is
that when the continuation is resumed (or when the continuation expires) jetty is never dispatching the “resumed” request to my filter. If I write a servlet, then it will get the “resumed” request.
And if I remove the <dispatcher>FORWARD</dispatcher> from my web.xml file then the filter does get the “resumed” request. Is there anyway that I can have the “resumed” request dispatched to my filter even with FORWARD dispatching enabled?

After playing around a bit more, the problem arises whenever I have any <dispatcher> entries. Even if there is only a <dispatcher>REQUEST</dispatcher> entry. In order for it to work, there must be no dispatcher entries at all.

  • 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-20T08:31:16+00:00Added an answer on May 20, 2026 at 8:31 am

    After digging through the Jetty source code I found the answer. Turns out that Jetty supports another
    dispatcher type called ASYNC. So if I add any <dispatcher> lines to the <filter-mapping> section of the web.xml, I have to include an entry for ASYNC because when a “resumed” continuation is dispatched, that is the dispatcher type that is used.

    <filter-mapping>
      <filter-name>MyFilter</filter-name>
      <url-pattern>/*</url-pattern>
      <dispatcher>REQUEST</dispatcher>
      <dispatcher>FORWARD</dispatcher>
      <dispatcher>ASYNC</dispatcher>
    </filter-mapping>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Struts2 (2.1.8.1) web application. My web.xml looks like, <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
I have a servlet filter that handles errors for both vanilla servlets and JSF
On Java side, we have a servlet filter that handles authentication. We don't have
For many internal problems that doesn't count now, We have a Servlet filter that
There are 2 entries for a Servlet Filter, one in web.xml and one in
I have a decent working web application (Java/Servlet/Jsp) that I would like to improve
I hit the maximum url-patterns that one can have in the web.xml and I
I have a servlet filter that adds a random amount of latency to each
I have a servlet that is used for many different actions, used in the
I have a servlet that I would like to run within ColdFusion MX 7.

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.