Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JSP spec edge cases: useBean and array/generic types

843838Sep 23 2006 — edited Jun 29 2008
Looking 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 27 2008
Added on Sep 23 2006
4 comments
866 views