Search code examples
tomcattomcat6

Where is Tomcat6 processing this GET request?


I'm trying to debug an issue with a Tomcat 6 web server on Linux (Amazon AMI) that I did not setup. Specifically, I'm trying to trace the execution of a GET request sent to the web server with the following URL:

./x.html?a=param1&b=param2

...but I don't understand where tomcat is handling the request. I've checked /var/www/WEB-INF/web.xml and there are no servlets handling the request, and the web.xml at /etc/tomcat6 looks untouched.

The file is at /var/www/x.html so it's a static file being served by default presumably, but where are the query string parameters being handled. There must be some servlet handling the request somewhere.


Solution

  • There always is a default servlet to handle static resources, defined in Tomcat_dir/conf/web.xml, where is says:

    The default servlet for all web applications, that serves static resources. It processes all requests that are not mapped to other servlets with servlet mappings (defined either here or in your own web.xml file). ...