• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

@Named not found

 
Bartender
Posts: 1971
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In Intellij, I created a JEE 7 application using Tomcat 7 as the server.

In the same test, I created a JEE 7 application using MyEclipse and Tomcat 7.

In Intellij, unlike MyEclipse, the @Named("test") cannot be resolved. Instead, I have to use @ManagedBean. (See screenshot below).

I'm assuming that since Tomcat is not a fully, as I understand it, JEE 6 compliant app server (like Glassfish), than @Named might not work. However, since @Named("test") works fine in a similarly-configured MyEclipse project, I'm just wondering what's going on.

Thanks in advance,

- mike
NoNamed.png
[Thumbnail for NoNamed.png]
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Named is a CDI attribute and Tomcat 7 does not have built-in CDI support. You'd either need to include your own CDI library as part of the webapp or switch to the built-in JSF equivalent (@ManagedBean).
 
Mike London
Bartender
Posts: 1971
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:@Named is a CDI attribute and Tomcat 7 does not have built-in CDI support. You'd either need to include your own CDI library as part of the webapp or switch to the built-in JSF equivalent (@ManagedBean).



Sounds good, thanks Tim! :)

- mike
 
reply
    Bookmark Topic Watch Topic
  • New Topic