I am trying to give access to robots.txt in Spring-MVC. To test the code, I put robots.txt in WebContent,Root and W
robots.txt
WebContent
Root
W
This works for me:
Put robots.txt directly under webapp
webapp
In mvc-dispatcher-servlet.xml have:
mvc-dispatcher-servlet.xml
Use maven to build your war