Glassfish alternatedocroot not working with Vaadin

I would like to have the files uploaded through my Vaadin application stored outside the web context, thus I am using Glassfish alternatedocroot parameter.

I have this strange problem that glassfish alternatedocroot is not working with Vaadin when configured for application level. The issue is, http://localhost:8080/MyApp/docs/abc.jpg should show the file however it returns to the main view of the application.

Here is the glassfish-web.xml

...
<glassfish-web-app>
    <context-root>/MyApp</context-root>
    <property name="alternatedocroot_1" value="from=/docs/* dir=/usr/local/glassfish4/altdocs/myapp" />
</glassfish-web-app>

I am guessing the request to http://localhost:8080/MyApp/docs is being handled by MyApp although it should have been handled by Glassfish itself.

I will appreciate any guidance on how to resolve this issue.

Note: When I add the alternate doc root from Glassfish admin console,
http://localhost:8080/docs/abc.jpg shows the picture. However this config is valid for domain level (notice MyApp is lacking from the URL) and this is not something I want.