• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Spring 3 and Tomcat...newbie question

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Folks- I am new to Spring and trying out an example from Craig Walls' new book, "Spring in Action 3". It uses javax.inject.Inject. I am using Tomcat 7.0.10 and was getting an 'Import not found' error. I got a reply (thank you) in the Tomcat forum that Tomcat is not fully Java EE 6 compliant.

My question is...

Does this mean one may not use Spring 3 with Tomcat 7?
or is there an alternative to javax.inject.Inject I could use?

As I'm new to Spring, was it a mistake going with the 3rd Edition? should have tried 2.5 first?

I work for a small company and we cannot afford Webpshere or WebLogic, I thought we could go with Tomcat+Spring, with a small budget what are our options as far as an Application server is concerned?

I understand this may not be the right forum to ask, sorry for that.

Thank you.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All you need to do is include the jar that has that Annotation definition in it for compile time.

At runtime, you need a Spring jar file that has a class that acts on that @Inject annotation, http://j.mp/iJZRp

Mark
 
Rancher
Posts: 43045
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Spring 2.5 works on Tomcat w/o further contortions, but I think it should be possible to use Spring 3 as well. If that class/package is all that's missing, you can get it from http://code.google.com/p/atinject/
 
reply
    Bookmark Topic Watch Topic
  • New Topic