Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF 1.2 @PostConstruct not working

 
Gaurav Ram
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to use JSF 1.2 @PostConstruct annotation and for that i have downloaded latest version of JSF i.e. JSF 1.2 and also i configured Tomcat 6.x.x in my MyEclipse, but when i am using @PostConstruct in Bean it is giving compile time error,, it is not recognizing that package,,, can you please help me out...What i am missing???

Thanks,
Gaurav
 
Ryan Lubke
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Gaurav Ram:
Hi,

I want to use JSF 1.2 @PostConstruct annotation and for that i have downloaded latest version of JSF i.e. JSF 1.2 and also i configured Tomcat 6.x.x in my MyEclipse, but when i am using @PostConstruct in Bean it is giving compile time error,, it is not recognizing that package,,, can you please help me out...What i am missing???

Thanks,
Gaurav


You need to include the common-annotations jar in your compilation classpath. You'll also want to include said JAR with your application,
otherwise you'll have runtime issues.

Also, when posting versions, JSF 1.2 is a spec version. There are two common implementations of the specification in the wild right now. It's useful to include which implementation and version.
 
Gaurav Ram
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thank you very much for your reply, thats really fruitful, now i am able to use @PostConstruct in my application and it is not giving any error, but now the method on which i have put the @PostConstruct annotation is not being called....

Can you please tell me what extra configuration i needed to run that.

Thanks,
Gaurav
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic