Skip to main content

How to allow request robots.txt in GlassFish 3 for my app

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2014-08-28

Hello,please help me to find solution .
I have app that has controller on */robots.txt requests
but my app cannot get this request through GlassFish and server return 404.
I don't want return on request stable file, I want generate it in my app, what changes I need to do with GlassFish setting, domain.xml configuring ?
Also I have app request controller */sitemap.xml and without any changes in settings I got generated file from my app, so this situation only for robots.txt file !

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2014-08-28

I see this forum dead...

So I will reaserch my question and find how and where :
- as on GlassFish same on Tomcat - you need to put file into webapp dirrectory (if you want return static file)

In my case I need generate from app and return text/plain page that same as robots.txt
I have enginx with proxy settings, so I need determinate location url through ip and port of my app
location /robots.txt {
allow all;