Is possible to put a primitive type, like a boolean as attribute?
pageContext.setAttribute("boolValue", boolValue);
and then
<tiles:put name="boolValue" beanName="boolValue" type="boolean" />
in the other Jsp I use:
<tiles:useAttribute name="boolValue" id="boolValue" classname="boolean" />
I get this error:
PWC6199: Generated servlet error:
string:///BaseBudgetLayout_jsp.java:124: incompatible types
found : <nulltype>
required: boolean
PWC6199: Generated servlet error:
string:///BaseBudgetLayout_jsp.java:125: inconvertible types
found : java.lang.Object
required: boolean
The attribute map can’t hold primitives as values. Given that it takes
java.lang.Object, Java 5 autoboxing would silently have turned thebooleanprimitive into ajava.lang.Booleaninstance. This is technically not abooleanat all, so the type/classname in your Tiles tags would not match.Instead, use
and