adsense


Monday, 30 November 2015

JAVA SERVER FACES @MANAGEDPROPERTY ANNOTATION

COMPUTER LANGUAGES HTML,C,C++.JAVA,.NET AND MULTIMEDIA basics and programs click home button



JAVA SERVER FACES @MANAGEDPROPERTY ANNOTATION






@ManagedProperty Annotation 


JSF is a simple static Dependency Injection(DI) framework.
Using @ManagedProperty annotation a managed bean's property 
can be injected in another managed bean. 


Example Application 


Let us create a test JSF application to test the above annotations for managed beans. 


Description 


1 	Create a project with a name helloworld under a package 
        com.tutorialspoint.test as explained in the 
        JSF - Create Application chapter. 

2 	Modify HelloWorld.java as explained below. 
        Keep rest of the files unchanged. 

3 	Create Message.java under a package com.
        tutorialspoint.test as explained below. 

4 	Compile and run the application to make sure 
        business logic is working as per the requirements. 


5 	Finally, build the application in the form of 
        war file and deploy it in Apache Tomcat Webserver. 

6 	Launch your web application using appropriate 
        URL as explained below in the last step. 





No comments: