According to TLD or attribute directive in tag file, attribute does not accept any expressions

Get the below exception when upgrade from servlet 2.3 to 3.x.

According to TLD or attribute directive in tag file, attribute does not accept any expressions

Turns out in the new jsp2.x, the Run-time Expression Value is default to false, so we need to explicitly add ‘<rtexprvalue>true</rtexprvalue>’ to make it accept jsp expression which is to be evaluated in the runtime. Also formated our rc.tld to make it jsp2.x standard.

Pay attention to <rtexprvalue>

The <rtexprvalue> is especially important because it tells you whether the value of the attribute is evaluated at translation or runtime. If the <rtexprvalue> is false, or the <rtexprvalue> isn’t defined, you can use only a String literal as that attribute’s value!

If you see this:

<attribute>
    <name>rate</name>
    <required>true</required>
    <rtexprvalue>false</rtexprvalue>
</attribute>

OR this:

image with no caption

Then you know THIS WON’T WORK!

image with no caption
This link gave me the original answer.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s