-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Juha,
On 12/10/12 5:40 PM, Christopher Schultz wrote: > On 12/10/12 4:14 PM, Juha Laiho wrote: > >> Any comments? Did I come across a but in Tomcat, or a "lucky >> bug" in the application (i.e. something that worked by luck in >> the previous container)? > > Yeah, I think this probably should not have worked in WebLogic, > but it's possible that there is room for interpretation in the spec > (it certainly wouldn't be the first time). > >> While I can (and did) change the application so that the >> c:redirect in /index.jsp now uses a context-absolute addressing, >> I'd be interested in hearing the actual verdict. I tried to read >> the servlet specification, but could not find an exact >> description covering this case. > > I'll take a look. You definitely want to use URLs that start with > "/" in all cases to prevent this kind of ambiguity. So it looks like I'm wrong and there may in fact be a bug in Tomcat. Servlet 3.0 has this to say about "forward" in section 9.4: " The path elements of the request object exposed to the target servlet must reflect the path used to obtain the RequestDispatcher. " Your forward() code looks like this: > RequestDispatcher rd = application.getRequestDispatcher("/"); > rd.forward(request, response); So the path used to obtain the RequestDispatcher is "/" and URLs built should be relative to that. Are you using Tomcat's provided JSTL, or do you bundle one with your own webapp? Can you post a copy of the .java source generated from your JSP that contains the <c:redirect>? - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with undefined - http://www.enigmail.net/ iEYEAREIAAYFAlDGaQ8ACgkQ9CaO5/Lv0PD7bwCgk0mSZ2Pl61gS1ksZyjf4zgG6 04EAoLDuvvL//lYuscLwKOZM0fjtaWeg =7H7K -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org