apache redirection to Vaadin application using diferent context-root

Hi, first of all sorry for my english,

We’re developing our first Vaadin application and everything was working as expected until we installed it on our servers to test the application. The problem is that we use an Apache server that redirects the urls to the machines that have the application installed. We are using a cluster in wich we have the application running in http://server1:8090/[b]
testVaadin/test
[/b] and http://server1:8091/[b]
testVaadin/test
[/b] and a front-end http://server2/redirections/[b]
testVaadin/test
[/b] so any request to the front-end redirects to one of the other two servers deppending on the load.

In the web.xml we have:

<servlet-mapping>
    <servlet-name>VaadinApplication</servlet-name>
    <url-pattern>/test/*</url-pattern>
</servlet-mapping>

and we configured a parameter in the servlet too, so Vaadin finds the static resources:

VaadinApplication
com.vaadin.terminal.gwt.server.ApplicationServlet

application
org.test.TestVaadin


Resources
/redirections/testVaadin

The themes and widgetset are served statically from the war.

When we try to access the application through the front-end we get a communication error because Vaadin is trying to make a Post to http://server2/[b]
testVaadin/test
[/b]/UIDL instead of http://server2/redirections/[b]
testVaadin/test
[/b]/UIDL

We can’t modify the redirection rules on server2 because we have no control over it. So, Is there any way to fix this behaviour? Can we make Vaadin point to the URL that we’re interested in?

Thanks in advance.

This seems to be related to this ticket:
http://dev.vaadin.com/ticket/4131

The problem is that Vaadin does not always work as expected when the URL path in the browser doesn’t match the path where Vaadin is deployed on the application server. You could try using any of the workarounds or patches described in the ticket. I’d guess the simplest solution would be to deploy your .war to http://server1:8090/redirections/testVaadin/test instead of http://server1:8090/testVaadin/test.