Hi, both,

>> I have a custom tag which takes a output of a JSTL, or another custom tag as an 
>> attribute. This tag has one required and two non-required attributes. The following 
>> version doesn't work.
>>
>> <mm:imagesizer src='<c:out value="${photopath}" />' alt="Photo" />
>>
>> How to make it works? Is a nested tag a solution?
>
>It is not legal in JSP (or in XML, for that matter) to use a tag in the
>value of an attribute. There are a couple of things you could do.
>
>1) Specify the value for 'src' as the body of the <mm:imagesizer> tag,
>instead of as an attribute value, like this:
>
>  <mm:imagesizer alt="Photo">
>    <c:out value="${photopath}" />
>  </mm:imagesizer>
>

I had thought this method. The problem is there are more than one attributes of the 
custom tag. How it knows which one the value is for the attribute "src"? When I try 
this way, I get an error as:

According to TLD, tag mm:imagesizer must be empty, but is not

I think it complain no value for the required attribute "src".

>2) EL-enable the <mm:imagesizer> tag, so that you can specify the
>expression directly, like this:
>
>  <mm:imagesizer src="${photopath}" alt="Photo" />
>
When I use this method, the translated value in the output html file is <img 
src="${photopath}" alt="Photo">. 

Any thought?

Thanks,

Vernon


____________________________________________________________
Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to