You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Christopher Stead <cs...@hotmail.com> on 2003/09/17 21:12:42 UTC

using with scoped variables

Using nested tags, I am not able to access the value of a scoped variable 
set by the parent tag:

<jsp:useBean id="file" scope="application" 
class="myPkg.ReadWriteRepositoryFile"/>

<table>
  <c_rt:forTokens var="repo_names" items="<%= file.getContents() %>" 
delims=";">
     <tr><td>
        <c_rt:out value="<%= pageContext.getAttribute("repo_names",
                      PageContext.PAGE_SCOPE) %>" default="test"/>
     </td></tr>
  </c_rt:forTokens>
</table>

I've looked at javax.servlet.jsp.jstl.core.TagLoopSupport and the source 
code is definitely setting variable scope, so what am I doing wrong?  I've 
also tried using pageContext.findAttribute("repo_names") but that didn't 
work.  My default value doesn't display either.

Thanks for your time and consideration.

Cheers,
Chris

_________________________________________________________________
Compare Cable, DSL or Satellite plans: As low as $29.95.  
https://broadband.msn.com


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org