Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javax.inject.Inject and Tomcat 7

 
Kevin Marcus
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Kevin Marcus
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for replying, I have asked a related question in the Spring forum.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic