I am working with Vaadin 6, Tomcat 7 and Maven.
We are in the stage of making the site secure, and in order to do this, I need to put a .txt file (with some hash and other information) in the root folder so it can be access in a direct way, for example if my site is www.vaadinapplication.com and the txt file is ‘certification.txt’, I need to be able to visualize the content of the txt by accessing directly to www.vaadinapplication.com/certification.txt
Where should I put the file on the project structure to accomplish this??
Hi, I still haven’t found the solution for this situation. I tried several changes on web.xml but coud not solve it.
I am putting the file ‘certification.txt’ on the folder on the root /src/main/webapp/certification.txt, but can not access directly to www.vaadinapplication.com/certification.txt.
While I cannot answer directly why your previous attempt did not work, you are on the right track - VaadinServlet only serves files in /VAADIN as static resources. Thus, if the file needs to be at the root where the servlet is mapped, you need either a more specific mapping for the file to another servlet or overriding VaadinServlet.service() to first check for that file and calling the superclass method only for other paths. You cannot hook directly into the same methods that are used for /VAADIN as some of these methods are private.