Im deploying a webapplication to tomcat 8 (renaming to ROOT.war) because the url pattern was set to / I thought that all requests would get directed the servlet. But that wasnt the case, eventually i realized that if I was starting the url with a ? such as
http://localhost:8080/?search=fred
it would not work, but without the ? it would work
http://localhost:8080/search=fred
Why is this ?
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee">
<display-name>Widget</display-name>
<servlet>
<servlet-name>WidgetServlet</servlet-name>
<servlet-class>com.jthink.WidgetServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>WidgetServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>