2015-12-24 17:37 GMT+03:00 Marc Boorshtein <mboorsht...@gmail.com>: > All, > > I'm having a very strange issue with > request.getServletContext().getRequestDispatcher().forward(). It gives me > a 404 on a JSP page that if I go to directly, works fine. This is with > tomcat 8.0.30 on OSX on JDK : > > ava version "1.7.0_65" > > Java(TM) SE Runtime Environment (build 1.7.0_65-b17) > > Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode) > > What makes this a bit different is that the request object is wrapped with > a couple of implementations of HttpRequestWrapper. The methods that seem > to matter (getAttribute and setAttribute) are just passthroughs. After > doing some debugging, I've traced the main issue to the JspServlet where > the jspUri variable is being set to the original URI > (/auth/idp/MyIdP/completeFed) not the forwarded URI > (/auth/fed/postauthnresp.jsp). The request being passed into the > JspServlet's service method is the same request object as is being sent to > the forward method. > > This code works perfectly well under Jetty as a frame of reference. Any > help would be greatly appreciated.
You have to provide the actual source code. There is an example in the examples webapp that performs forwarding to a JSP and it works, \webapps\examples\WEB-INF\classes\ServletToJsp.java Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org