File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes javax.inject.Inject and Tomcat 7 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "javax.inject.Inject and Tomcat 7" Watch "javax.inject.Inject and Tomcat 7" New topic
Author

javax.inject.Inject and Tomcat 7

Kevin Marcus
Greenhorn

Joined: Jun 27, 2010
Posts: 11
Folks- I'm following an example from Spring in Action 3 (MEAP edition) on Tomcat 7. Getting a compiler error in eclipse on the following import:



The error message is:

The import javax.inject cannot be resolved

I understand javax.inject is part of Java EE 6, is Tomcat 7 not JEE 6 compliant? I have all the jars in $CATALINA/lib copied to my WEB-INF/lib directory, also did a manual search (jar -tvf) but couldn't find this package.

Any help will be greatly appreciated.
Thanks.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42600
    
  65
I understand javax.inject is part of Java EE 6, is Tomcat 7 not JEE 6 compliant?

Tomcat is not a full JEE implementation - it covers just the Servlet and JSP specifications. If you want the full JEE, use GlassFish (or one of the other JEE servers like JBoss).

I have all the jars in $CATALINA/lib copied to my WEB-INF/lib directory

Don't do that; you need to leave those jars where they are, and not duplicate them.


Ping & DNS - my free Android networking tools app
Kevin Marcus
Greenhorn

Joined: Jun 27, 2010
Posts: 11
Thank you for replying, I have asked a related question in the Spring forum.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javax.inject.Inject and Tomcat 7