You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jim Lynch <jw...@sgi.com> on 2003/02/12 19:30:58 UTC
Problem with passing tag values to tags.
Running Tomcat 4.1.10. on Linux. Java 1.4.x.
I have a jsp that looks like:
(Snippet)
<general:ListDivision>
<tr>
<td><%= division %></td>
<td colspan="<%= branchlen %>">| </td>
</tr>
<general:ListSubdivision division="<%= division %>">
<tr>
<td><%= subdivision %></td>
<general:ListBranchBySubdivision subdivision="<%= subdivision
%>" division="<%= division %>">
<td><%= POP %></td>
<td><%= Temp %></td>
<td><%= Total %></td>
</general:ListBranchBySubdivision>
</tr>
<tr>
<td>Total Region</td>
<general:ListSubdivisionTotals division="<%= division %>">
<td><%= POP %></td>
<td><%= Temp %></td>
<td><%= Total %></td>
</general:ListSubdivisionTotals>
</tr>
</general:ListSubdivision>
</general:ListDivision>
In the handler for " <general:ListSubdivision division="<%= division
%>">"
I have:
public void setDivision( String value){
division = value;
System.out.println("incoming value is "+value);
}
What gets printed is:
incoming value is <%= division %>
Obviously I wanted the value that <%= division %> represents, not the
string.
Now the same structure is working fine in a j2ee project I'm working
on. I have this little project I thought I'd do using tomcat 'cause it
just doesn't need the complexity and overhead of j2ee, but it looks like
I can't nest
the tags. Is that true? Or am I did I just screw something up?
Can anyone shed some light?
Thanks,
Jim.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Problem with passing tag values to tags.
Posted by Jim Lynch <jw...@sgi.com>.
Tim Funk wrote:
>
> Make sure in your tag declaration (tld file) you have rtexprvalue set to
> true.
>
That was the key. I didn't have it set.
Thanks,
Jim.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Problem with passing tag values to tags.
Posted by Tim Funk <fu...@joedog.org>.
Make sure in your tag declaration (tld file) you have rtexprvalue set to
true.
For example:
<attribute>
<name>id</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
Jim Lynch wrote:
> Running Tomcat 4.1.10. on Linux. Java 1.4.x.
>
> I have a jsp that looks like:
> (Snippet)
>
> <general:ListDivision>
> <tr>
> <td><%= division %></td>
> <td colspan="<%= branchlen %>">| </td>
> </tr>
> <general:ListSubdivision division="<%= division %>">
> <tr>
> <td><%= subdivision %></td>
> <general:ListBranchBySubdivision subdivision="<%= subdivision
> %>" division="<%= division %>">
> <td><%= POP %></td>
> <td><%= Temp %></td>
> <td><%= Total %></td>
> </general:ListBranchBySubdivision>
> </tr>
> <tr>
> <td>Total Region</td>
> <general:ListSubdivisionTotals division="<%= division %>">
> <td><%= POP %></td>
> <td><%= Temp %></td>
> <td><%= Total %></td>
> </general:ListSubdivisionTotals>
> </tr>
> </general:ListSubdivision>
>
> </general:ListDivision>
>
> In the handler for " <general:ListSubdivision division="<%= division
> %>">"
> I have:
>
> public void setDivision( String value){
> division = value;
> System.out.println("incoming value is "+value);
> }
>
> What gets printed is:
>
> incoming value is <%= division %>
>
> Obviously I wanted the value that <%= division %> represents, not the
> string.
>
> Now the same structure is working fine in a j2ee project I'm working
> on. I have this little project I thought I'd do using tomcat 'cause it
> just doesn't need the complexity and overhead of j2ee, but it looks like
> I can't nest
> the tags. Is that true? Or am I did I just screw something up?
>
> Can anyone shed some light?
>
> Thanks,
> Jim.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org