Apache HTTPD to Tomcat through reverse proxy - no content-type set

I’m wondering if a problem we saw with Apache HTTPD using ProxyPass directive and AJP protocol to Tomcat is something fixable on the Vaadin end. It seems that the content-type is not set (probably on UIDL messaging) such that a window that includes generated HTML is showing the HTML text rather than being rendered.

It of course works fine with just Tomcat.

However, if Apache front-ends using a reverse-proxy, I think it automatically puts text/plain into the HTTP header if it does not see a header defined. It seems no content-type is set by the Vaadin messaging.

We can get it to work by putting: DefaultType text/html into the virtualhost section of Apache.

Is this something we just have to live with and configure in Apache or is there a way to fix the content-type settings sent by Vaadin?


We have used vaadin 6.x with apache httpd and AJP connected tomcat for 2-3 years now and never seen that problem.

Which versions of ajp and httpd are you using ?


I’m not sure what version of AJP. It’s whatever is bundled with Apache HTTPD 2.2.15 on Centos 6.3. We are using Tomcat 7.0.29. I’ll take a closer look some time later… it may just be something weird with my environment. I do know we’re using reverse proxy so that may differ from other setups. (I’m the man-in-the-middle of this conversation since I don’t personally use HTTPD front-end, but one of our open source community noted this issue.)

Today I did also setup a reverse AJP proxy, and it just worked, without any special tricks…

Hi Andre and David!

We have Apache 2.2, Tomcat 6 and ajp reverse proxy on windows.
When user session ends, browser draws application as a plain text page.


  • Apache Tomcat 6.0.32
  • Apache 2.2.19 (win32)
  • Windows Server 2003 R2 (x64)
  • Vaadin 6.8.2

Otherwise application works fine, problem comes when session ends.
What is the difference after session ends in uidl messaging?
Is the only solution to set default content tpe to html on server?

“How” is your session ending ?

Is it just expiring the cookie or is the session invalidated by tomcat ?
Normally you get a red “Session expired” or similar message…


“Session expired” messages is set off.
We set in web.xml, so I think Tomcat invalidate it.


Any suggestion? Has anybody else the same problem?


I have tested two similar environment, both with versions:

  • httpd-2.2.9
  • Tomcat 6.0.26
  • AJP3

One works, other not.
I have to compare settings.

I changed ajp to http proxy and both works.


So it must be some AJP13 config problem…
probably something in workers.properties only allowing one concurrent request (Or in the server.xml on tomcat side)

But at least it now works