• Post Reply Bookmark Topic Watch Topic
  • New Topic

@Named not found  RSS feed

 
Mike London
Ranch Hand
Posts: 1476
10
  • Mark post as helpful
  • send pies
  • 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]
 
Tim Holloway
Bartender
Posts: 18715
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • 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
Ranch Hand
Posts: 1476
10
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!