I was working on custom tag libraries and I was confused how the <required> and <rtexprvalue> tags are used in the TLD file to define a custom tag attribute.
- What are these tags?
- What should we write in-between them?
- What behavior do we get after writing these tags?
requiredquite simply implies what it says. The attribute is required or mandatory.rtexprvaluemeans Runtime Expression Value. It means the attribute can support scriptlet values.elexprvaluemeans it can support EL (expression language) values.So, if you have
requiredattrdefined as bothrequired=trueandrtexprvalue=trueandelattributeis defined aselexprvalue=true, you can write as follows: