As a workaround, I wrote an 'eval' tag that captures its content to a 
bean.  You can bind the content to a scripting variable and use the 
variable.  It's ugly but it works.

So, you'd do this:

<x:eval id='idValue'><bean:write name="somebean" property="id" /></x:eval>
<html:link href="somepage.jsp?action=someaction&id=<%= idValue %>" >link 
text</html:link>

The actual implementation of eval is very simple - just a body tag that 
captures its content to a String and puts the String into the page context.

Tom Tibbetts wrote:

> I would then agree.  It's kind of a pain to create special tags to 
> handle stuff like this....
>
> At 12:03 PM 8/27/01 -0700, you wrote:
>
>> Sorry - nesting like this is not allowed in JSP (another of its 
>> weaknesses IMO).
>>
>> Tom Tibbetts wrote:
>>
>>> Hi All.  Is it possible to nest a bean:write inside of html:link 
>>> such as you have the following:
>>>
>>> <html:link href="somepage.jsp?action=someaction&id=<bean:write 
>>> name="somebean" property="id" />" >link text</html:link>
>>>
>>> When I do this I get an error that attribute somebean is not found, 
>>> even though it does exist.  Thanks Tom
>>>
>>
>>
>
>



Reply via email to