• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Unable to access robots.txt file on tomcat 6 server

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry if i sound silly, but I'm facing a weird problem.

I made a robots.txt file and uploaded it to my Tomacat 6 webapps/ROOT folder, but when I try to access it through http://www.this-is-not-my-real-domain-name.com/robots.txt I get a 404 not found error.
I restarted the server multiple times, without success. I've also checked the mime type on the server's web.xml file.

What am i doing wrong?
Isn't it supposed to be simple.

Please help me out. I would really appreciate it.
 
Saloon Keeper
Posts: 27807
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Tomcat root application is a little bit different from other webapps. You can't just patch stuff into the default root app the way you could any other deployed app. There are instructions on how to do this in the Tomcat docs at tomcat.apache.org.
 
Tony Ghy
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:The Tomcat root application is a little bit different from other webapps. You can't just patch stuff into the default root app the way you could any other deployed app. There are instructions on how to do this in the Tomcat docs at tomcat.apache.org.



I searched the documentation but couldn't find any help.

Can someone please guide me.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My robots.txt works just fine in Tomcat6.

What other files do you have in webapps/ROOT ?

Did you use the default <welcome-file-list> contents?

What do you get for a plain request to "http://yourdomain/" ?

Bill
 
Tony Ghy
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

William Brogden wrote:My robots.txt works just fine in Tomcat6.

What other files do you have in webapps/ROOT ?

Did you use the default <welcome-file-list> contents?

What do you get for a plain request to "http://yourdomain/" ?

Bill



My webapps/ROOT contain the following:

META-INF
resources
WEB-INF
index.jsp
robots.txt

My Welcome file list contains:
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

A plain request to http://yourdomain/ works fine. My site is in production & working just fine. Only robots.txt file is not accessible.


Please guide.
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That is really mysterious!

If this was my problem I would be looking for clues in the log files.

I would also try putting a robots.txt file in another web application to see if only the ROOT is affected.

Bill
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic