Win a copy of Event Streams in Action this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

javax.inject.Inject and Tomcat 7

 
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.
 
Rancher
Posts: 43011
76
  • 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.

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!