JSP spec edge cases: useBean and array/generic types
843838Sep 23 2006 — edited Jun 29 2008Looking at this from a tool builders perspective.
Let's say we're authoring a JPS 2.0 or 2.1 page. The page is used as a pure view, and Java code has provided all the required beans.
We'd like to use a <jsp:useBean id="foo" scope="request" type="org.foo.Bar"/> declaration, so that the editor can infer type, and provide completion, error checking, analysis, etc.
Just to be clear, we're not talking about bean creation/instantiation here.
Here come the questions:
1) What if an atttribute previously set is actually an array type:
<jsp:useBean id="foo" scope="request" type="org.foo.Bar[]"/>
Is this indeed permitted?
2) What if the attribute we're using/rendering is a java.util.Map, and we'd like to specify what kind of map:
<jsp:useBean id="myMap" scope="request" type="java.util.Map<String,Integer>"/>
Again, the spec is silent.
Any comments from the spec team (Ed)?
Thanks