This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Tomcat 7 - resource injection using @Resource annotation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat 7 - resource injection using @Resource annotation" Watch "Tomcat 7 - resource injection using @Resource annotation" New topic
Author

Tomcat 7 - resource injection using @Resource annotation

lof fol
Greenhorn

Joined: Aug 17, 2011
Posts: 1
The problem is:
recover an entry in the Environment Context of a Tomcat 7 Application using @Resource annotation.

I defined in the context.xml of my application:


if I lookup directly the Jndi Context it's all ok, I retrieve correctly the URL variable:


if I try to use the resource injection using @Resource annotation:
(i'm using Struts2 framework)


in this case I obtain in the Tomcat console: pathFileconfig: null

what's wrong ?


Thanks

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Tomcat 7 - resource injection using @Resource annotation
 
It's not a secret anymore!