views:

36

answers:

1

Hi,

After looking a while other google, and the web, I decided to post my question here.

The question is quite really basic, and simple :

How do I use the struts2 tag <s:bean ... /> to instanciate a Parametric Bean ?

For example imagine I have :

public class GenericBean<T> { ...

How will I instanciate this bean with a BeanType for instance, inside a jsp using struts 2 ?

<s:bean name="GenericBean" var="myBean"/>

Thanks you.

A: 

I can write this :

<s:bean name="GenericBean" var="myBean"/>

And the only thing is that in the methods of GenericBean where I need the Type of , the "invoker" should provide the corresponding class for .

zor