aspose file tools*
The moose likes JSF and the fly likes JSF 1.2 @PostConstruct not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF 1.2 @PostConstruct not working" Watch "JSF 1.2 @PostConstruct not working" New topic
Author

JSF 1.2 @PostConstruct not working

Gaurav Ram
Ranch Hand

Joined: Feb 23, 2008
Posts: 32
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

Joined: Jun 20, 2007
Posts: 36
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

Joined: Feb 23, 2008
Posts: 32
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF 1.2 @PostConstruct not working