views:

382

answers:

2

Is there a nice way to dependency inject using a jsp taglib?

either using ejb 3.0, spring, or guice...

I have a lot of services/pojos that I would like to use in my taglibs

+1  A: 

I think you want Seam, it enables you to refer to a component by name. However, the released version is JSF based, but that's changing.

sblundy
A: 

Hello there,

just stumbled upon your question because I plan to do the same. You can actually use Spring and its @Configurable annotation (with AspectJ load-time or compile-time weaving) to inject services into your tag implementations. For a detailed explanation of all options have a look at Ramnivas' blog post here.

Hope to help in case you still need a solution...

springify