In fact, I find it quite reasonable for the EL function to return some complex object. Of course, there are problems with the "architectural style" that may dictate what would and would not be suitable situations for such a thing, but I would say that some means to return some types of configuration information that is not is specific to any particular action, and not really interesting for the logic of business logic, and is likely to be useful for presentation purposes on many pages.
EL, "Object", , , "Object []". Java EL ( .tld , ), , EL . , - :
public static Object yourFunction(String arg1, String arg2, String arg3) {
return (ArrayList<HashMap<String, String>>) whatever;
}
.tld - :
<function>
<description>Blah blah blah</description>
<name>yourFunction</name>
<function-class>your.package.YourClassName</function-class>
<function-signature>
java.lang.Object yourFunction(java.lang.String, java.lang.String, java.lang.String)
</function-signature>
</function>
JSP , :
<c:set var='result' value='${prefix:yourFunction("Goodbye", "Mr.", "Chips")}'/>