You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Hartmut John <jo...@pinuts.de> on 2000/02/25 14:40:56 UTC
scope problems
Hi,
I'd like to use the following Statements to print a grouped list
of categories. But doesn't work:
--- some.jsp ---
<ext:catlist>
<B> <%= catname %> </B>
<ext:catlist>
<%= catname %>
</ext:catlist>
</ext:catlist>
-----------------
The problem is the initalisation of the nested block. because I
use the same porperty catname(decalred NESTED), the compilation
fails creating a local variable catname:
--- produced code ---
String catname = (String) pageContext.getAttribute("catname");
out.print(catname);
do{
String catname = (String) pageContext.getAttribute("catname");
out.print(catname);
}
---------------------
Why it is necessary to create these temp variable catname? A more
flexible way would be to create code like:
out.print(String) pageContext.getAttribute("catname"));
Does anybody have a solution cascading same Tags to do the things
I decribed above?
--
Hartmut John