-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Juha,
On 12/11/12 3:29 PM, Juha Laiho wrote: > first, thanks for your answers, and also for the nits, they did > hit some good points. Then on with some answers to the further > questions you placed; > > > On Tue, Dec 11, 2012 at 12:58 AM, Christopher Schultz > <ch...@christopherschultz.net> wrote: >> On 12/10/12 5:40 PM, Christopher Schultz wrote: >>> 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. " > > Thanks, I did read the Servlet spec 2.5, but at least didn't come > across this statement there. > >> 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. > > ... so looks like I might have encountered a minor bug. Perhaps. >> Are you using Tomcat's provided JSTL, or do you bundle one with >> your own webapp? > > This was good call, too - something I hadn't been paying attention > to. In the example I seem to be using JSTL library from some > version of Glassfish (a Maven dependency, javax.servlet:jstl:1.2, > which gets packaged into the examle webapp). What JSTL > implementation is used in the original place where I encountered > this, I don't know (could check, but I think for now we can just as > well concentrate on this example, as it exhibits the same behaviour > as the original case). Odd that Tomcat's JSTL implementation was used in preference to the one supplied with the webapp. >> Can you post a copy of the .java source generated from your JSP >> that contains the <c:redirect>? > > Certainly; and this seems to hit another point where I've been > sloppy; this example has been run on Tomcat embedded with NetBeans, > and thus version 7.0.27. And interesting, this seems to refer to > org.apache.taglibs.standard for the RegirectTag implementation, > despite the other JSTL lib being included in the application: There's also a Redirect class in Tomcat proper which generates Java source instead of being an actual tag implementation. I was actually thrown-off the by that. Tomcat's taglibs are actually maintained under a slightly different umbrella and it's unclear to me if they are actively maintained. There are svn revisions, but they all seem to be deployment-related and not actual code changes. Can you start a new thread with a different subject? Something like "Tomcat prefers TC JSTL implementation to webapp-packaged one" and ask about it? I know there are some folks here who can describe how that's supposed to work. Once you've got that hammered-out (or maybe in parallel), you can ask about why the <c:redirect> tag doesn't work. A new thread and subject line may get others interested, which is why I am suggesting it. - -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/ iEYEAREIAAYFAlDHrOYACgkQ9CaO5/Lv0PDrKACgiF7MJ/opHRg1rqM7ol71dWIs AvAAnjfLlQbrKZ3kqJD0NHu7zcPoaWHL =wP1M -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org