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 Thomas Förster <T....@lit.lineas.de> on 2001/05/21 09:54:05 UTC
How to assign contents of a tag to a Java-variable?
Hi!
I need to assign the "contents" of a tag to a local Java-variable.
Let's say I have an attribute like
<app:attribute name="userName"/>
I want to define a variable which gets the value of this attribute.
<% String user = "???value of the attribute???"; %>
How can I do this?
Thomas
Re: How to assign contents of a tag to a Java-variable?
Posted by kejong <ke...@framfab.nl>.
hi, you can do 2 things
1: use the pageContext in you tag to set the value in you session of page
context
2: implement the TagExtraInfo to make the variable available.
On Mon, 21 May 2001, Thomas Förster wrote:
>
> Hi!
>
> I need to assign the "contents" of a tag to a local Java-variable.
> Let's say I have an attribute like
>
> <app:attribute name="userName"/>
>
> I want to define a variable which gets the value of this attribute.
>
> <% String user = "???value of the attribute???"; %>
>
> How can I do this?
>
> Thomas
>