Originally posted by Harpartap Singh:
But, I thought another advantage of using <c:import> was that you are not bound to "relative URL" anymore.
So if there was a [B]<c:forward>[B] we could forward requests to another web application's URL without having to go through the circus of getContext, getRequestDispatcher, forward etc.
Isn't convenience a motivation for JSTL?
It's a judgment call. That would be the
only motivation for a <c:forward> tag, and cross-context imports and forwards aren't necessarily even supported by all containers. (It's effectively an optional feature.) With the <c:import> tag, we get the benefit of imports from
absolute URLs, as well as cross-context inclusions; this wouldn't apply to <c:forward>. Effectively, the decision implies that the JSTL group thinks the combination of <jsp:forward> and <c:redirect> is enough for most people. Still, a <c:forward> tag could always be added in the future (or <jsp:forward> modified) to support cross-context forwards.
Convenience is indeed a motivation, but as with any spec, you have to pick your battles carefully because (a) time is limited and (b) extra features mean more learning for new users.