On Thu, 14 Oct 2004 07:17:34 -0400, Kris Schneider wrote:

> It's got nothing to do with JSTL and everything to do with your Struts
> action. The Struts controller effectively performs the forward with the
> result of your action's execute method. Yes, <c:import> can work perfectly
> well when used multiple times in a page. For URLs that are within the same
> context (same app), the semantics are pretty much the same as
> RequestDispatcher.include.

Delving deeper into the JSTL defintion for c:import it does mentioned that
if the url is relative and within the same context then the
RequestProcessor.include is used, and the entire environment is available.

There is a simple solution. In the c:import specify an absolute URL.
So the code below works just fine:

<%@ taglib uri="c.tld" prefix="c" %>

<c:forEach items="${listOfNumbers}" var="number">
        <c:import url="http://myServer/myContext/myAction.do?number=${number}"/>
        <br/>
</c:forEach>


Mick.

ps Thanks for your explanation and reference to RequestProcessor.include, without 
this I would not have found the small print ;=)


-- 
---<BR/> "Great spirits have always encountered violent opposition from mediocre 
minds." 
Albert Einstein
<BR/>
<a href=http://www.harryspractice.com.au>Harry's Practice</a>
<BR/>--- 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to