Subj : Re: Using Rhino from JSP or like JSP
To : McKinley, Richard
From : Igor Bukanov
Date : Fri Aug 13 2004 10:00 pm
McKinley, Richard wrote:
> Igor Bukanov wrote:
>
>>> If I can create something nice would you want a JSP taglib for Rhino
>>> submitted?
>>
>>
>>
>> YES!
>>
>> Regards, Igor
>
>
> I am designing the JSP taglib tag names and their required attributes.
> The tags will be 'script', 'expression' (with the aliases of 'express'
> for those who think in verb sense and 'ex' because it should be short)
> and 'write' with a short alias of 'out'. 'script' will be for
> multi-line body evaluation and 'expression' for a single expression.
>
> The url for the taglib will look like this:
> <%@ taglib uri="http://javascript.mozilla.org/tools/taglib"
> prefix="rhino"%>
>
> As you can see the user is in control of what prefix they choose. So
> they can think of Rhino in whatever sense they choose. 'prefix' could
> be set to "javascript", "JScript", "js", "e4x" or anything else. That
> way the vocabulary can fit their personal terminology.
>
> An example:
>
>
I see your name is
Say "Hi" to Bob if you see him.
>Bob, it is nice to see you again.
>I see your name is {userName}!
) if(userName != "Bob") { OUT(Say "Hi" to Bob if you see him.
) } else { OUT(Bob, it is nice to see you again.
) }