Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to get Tomcat 7 to display the servlet mappings?

I'm getting a 404 from Tomcat for a very simple web app. I'm currently thinking the problem is the servlet mapping because there are no errors in any of the Tomcat logs.

Is there a way to get Tomcat to display the active servlet mappings? I thought the manager console might do this but when I click on the mapping for my app I also get a 404. So either this is not the way to do it or there is something else wrong that is not being logged.

Thanks for any help or advice, beeky

like image 551
user903724 Avatar asked Apr 07 '12 02:04

user903724


1 Answers

You can display them via servletContext.getServletRegistrations() - you have all the metadata available there. You can do that in a ServletContextListener, to print all data as soon as the context is loaded.

like image 96
Bozho Avatar answered Nov 16 '22 19:11

Bozho