aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat 7 - resource injection using @Resource annotation
 
Similar Threads
Help: upgraded from tomcat 5.0 to 5.5.27 and getting Naming Exception
Problem with @Resource annotation (without web.xml)
How to develop a standalone swing application with ejb 3.1
@Resource injection not working for DataSource
Tomcat 7: Can I configure it so that I don't need to use “java:/comp/env” in the code?