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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:37:46+00:00 2026-06-05T10:37:46+00:00

Observations: My web app is running in JBoss. Every single user-click generates >5 HTTP

  • 0

Observations:

  • My web app is running in JBoss.

  • Every single user-click generates >5 HTTP requests because of images etc.

  • Running netstat on the server reveals that a new TCP connection is being opened for every single HTTP request (basically I am looking at the total number of TCP connections from the client IP on port 80).

Facts:

  • JBoss HTTP protocol is set at 1.1.

  • I have checked with FF, IE9 and Chrome – and all browsers do the same.

  • I have two test environments – one running on Windows7 and the other one running on CentOS. I see the same behavior in both.

What I am trying to accomplish

  • Persistent TCP connection, because hopefully that would a) enhance user experience and b) reduce load on the server

At this point, I am not sure what code, configuration details or log I should attach to the question, but if you let me know, I will provide it. Any kind of help is appreciated.

p.s. This thread seemed promising from the title TCP connection is not reused for HTTP requests with HttpURLConnection, but it deals mainly with the client side.

  • 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-05T10:37:48+00:00Added an answer on June 5, 2026 at 10:37 am

    I think I have found a solution to this. Thanks for the pointers and the suggestions. They really helped.

    Part 1:
    I used the HttpFox plugin in Firefox to look at the response headers. As Philippe suspected the Connection header had a value of “close”.

    Part 2:
    Adding a line of code in my own filter to change the response header did not help. So I downloaded and added jbossWebService.jar to the WEB-INF/lib directory in order to use the org.jboss.web.tomcat.filters.ReplyHeaderFilter class. (Prior to JBoss 7, apparently this package used to be included in JBoss by default.) Added the following in my web.xml:

    <filter>
    
    <filter-name>CommonHeadersFilter</filter-name>
    
    <filter-class>
    
    org.jboss.web.tomcat.filters.ReplyHeaderFilter</filter-class>
    
    <init-param>
    
         <param-name>Connection</param-name>
    
         <param-value>keep-alive</param-value>
    
    </init-param>
    
    </filter>
    

    This did the trick (well, almost). Now, the first “click” from the browser generates about 4 TCP connections – not sure about the reason for that number, because every single click generates >=7 http requests. But all subsequent clicks, if performed within the ttl period (15 s), do not generate additional TCP connections. I guess a more thorough investigation, as suggested by Philippe, would reveal something. But at this point I have to move on. So, for the time being I will mark this question as answered. If needed in the future, I will re-open it.

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

Sidebar

Related Questions

I am working on a web-app with ASP.NET MVC3. We are using nHibernate with
Tried deploying a simple web application (jboss 5.1, jboss seam 2.2.1) on a machine.
After some efforts I finally get cobertura running correctly for my web application on
I have a web app which runs on JSF 2.0 + Richfaces 3.3.3. Looks
I've been having intermittent problems with NSURLConnection requests timing out in our iPhone app.
I have raw observations of 500 numeric values (ranging from 1 to 25000) in
A few interesting observations w.r.t equals operator on 0 and 0.0 new Double(0.0).equals(0) returns
I have observations that have 1 dollar signs ($), and observations that have 2
I'm looking for suggestions as well as any benchmarks or observations people have. We
With tables basically like this: Elements id INT PRIMARY KEY ... Observations id INT

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.