Objective
My goal is to get a servlet filter to process requests to the home page before forwarding them to index.jsp.
Problem
I’m having trouble getting my filter to receive requests from “/”. It’s URL pattern is
<url-pattern>/</url-pattern>
Instead requests to that pattern end up directed straight to index.jsp.
I read a previous post
Servlet Mapping / and /* and wonder if mapping to “/” only works if there is no index.jsp in the application folder?
Your goal is to redirect the user to a servlet before going to the index.jsp page. I would suggest modifying
<welcome-file/>inweb.xml.This will make sure that your control goes to first servlet before going to the home page