mardi 5 janvier 2021

Show robots.txt file at domain.com/robots.txt instead of domain.com/context/robots.txt using WebLogic Server

I'm trying to add a robots.txt file to my Spring Java web application to be served at the root url domain.com/robots.txt instead of domain.com/context/robots.txt, but whatever I try inside my project, such as putting the file in the webapp folder, the src folder or redirecting it with <mvc:resources mapping="/robots.txt" location="/robots.txt" order="0"/> in my application-context.xml in the best case scenario the file appears under the context and not at domain.com/robots.txt.

I know that Tomcat has a ROOT folder where everything you put is accessible through domain.com without going through the context but I can't locate any equivalent folder for WebLogic, which is the application server I'm using. Is there any way to show a file directly at the root of the project without going through the context using WebLogic Server (10.3.6)? Any folders for me to test? Any ideas I can start from? I'm very new to this so any hint is going to be very helpful.




Aucun commentaire:

Enregistrer un commentaire