2012/8/27 Ivan Polak <ivan.po...@f4s.sk>: > I have found, where is the problem. > > problem is in StandardContextValve.java in > > @Override > public final void invoke(Request request, Response response) > throws IOException, ServletException { > > .... > > // Select the Wrapper to be used for this Request > Wrapper wrapper = request.getWrapper(); > if (wrapper == null || wrapper.isUnavailable()) { > response.sendError(HttpServletResponse.SC_NOT_FOUND); > return; > } > ..... > > if request is : http://localhost:8080/app/index.html (direct link to > Spring MVC controller), object wrapper is not null, > > and if request is : http://localhost:8080/app/invitations/ (served by > UrlRewrite filter), object wrapper is NULL! > > in CoyoteAdapter.java on line 649: > > request.setWrapper((Wrapper) request.getMappingData().wrapper); > > is set NULL. >
Can you stop top-posting? http://en.wikipedia.org/wiki/Posting_style#Choosing_the_proper_posting_style What is your list of welcome files? How a wrapper can be null? 1) For a directory path like yours, the welcome files come into play and the servlet that serves them is selected as the wrapper. 2) There is always DefaultServlet (servlet mapped to "/") that is selected when nothing else matches the request. When your breakpoint is on "if (wrapper == null || wrapper.isUnavailable()) {" line, what is the value of the local variable "requestPathMB" ? > request.setWrapper((Wrapper) request.getMappingData().wrapper); Mapping is performed in org.apache.tomcat.util.http.mapper.Mapper#map(..) (there are two public map() methods) Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org