InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
How To Pass A Parameter To The Jsf Application Using The Url String? |
|
Answer» if you have the following URL: HTTP://your_server/your_app/product.jsf?id=777, you access the passing parameter id with the following lines of java code:
if you have the following URL: http://your_server/your_app/product.jsf?id=777, you access the passing parameter id with the following lines of java code:
|
|
| 2. |
What Does It Mean By Rendering Of Page In Jsf? |
|
Answer» Every JSF page as described has various components made with the help of JSF library. JSF may contain H:form, h:inputText, h:commandButton, etc. Each of these are rendered (translated) to HTML OUTPUT. This process is called encoding. The encoding procedure also ASSIGNS each component with a unique ID ASSIGNED by framework. The ID generated is random.
Every JSF page as described has various components made with the help of JSF library. JSF may contain h:form, h:inputText, h:commandButton, etc. Each of these are rendered (translated) to HTML output. This process is called encoding. The encoding procedure also assigns each component with a unique ID assigned by framework. The ID generated is random.
|
|
| 3. |
How Does Jsf Depict The Mvc (model View Controller) Model? |
|
Answer» The data that is manipulated in form or the other is done by MODEL. The data presented to user in one form or the other is done by view. JSF is CONNECTS the view and the model. View can be depicted as shown by: The data that is manipulated in form or the other is done by model. The data presented to user in one form or the other is done by view. JSF is connects the view and the model. View can be depicted as shown by: |
|
| 4. |
What Is Render Kit In Jsf? |
|
Answer» COMPONENT classes generally transfer the task of generating output to the renderer. All JSF components follow it. Render kit is a set of RELATED renderers. javax.faces.render.RenderKit is the class which represents the render kit. The default render kit CONTAINS renderers for html but its up to you to make it for other markup languages. Render kit can implement a skin (a look & feel).Render kit can target a specific device like phone, PC or markup LANGUAGE like HTML, WML, SVG. This is ONE of the best benefit of JSF because JSF doesn’t limit to any device or markup. Component classes generally transfer the task of generating output to the renderer. All JSF components follow it. Render kit is a set of related renderers. javax.faces.render.RenderKit is the class which represents the render kit. The default render kit contains renderers for html but its up to you to make it for other markup languages. Render kit can implement a skin (a look & feel).Render kit can target a specific device like phone, PC or markup language like HTML, WML, SVG. This is one of the best benefit of JSF because JSF doesn’t limit to any device or markup. |
|
| 5. |
What Is The Difference Between Jsp And Jsf? |
|
Answer» JSP simply provides a Page which may contain markup, embedded Java code,and tags which ENCAPSULATE more complicated logic / html. JSF may use JSP as its template, but provides much more. This includes alidation, rich component MODEL and lifecycle, more sophisticated EL, separation of data, navigation handling, different VIEW technologies (instead of JSP), ability to provide more ADVANCED features such as AJAX, etc. JSP simply provides a Page which may contain markup, embedded Java code,and tags which encapsulate more complicated logic / html. JSF may use JSP as its template, but provides much more. This includes alidation, rich component model and lifecycle, more sophisticated EL, separation of data, navigation handling, different view technologies (instead of JSP), ability to provide more advanced features such as AJAX, etc. |
|
| 6. |
What Does It Mean By Render Kit In Jsf? |
|
Answer» A RENDER kit defines how COMPONENT classes MAP to component tags that are appropriate for a particular client. The JavaServer Faces implementation INCLUDES a standard HTML render kit for rendering to an HTML client. A render kit defines how component classes map to component tags that are appropriate for a particular client. The JavaServer Faces implementation includes a standard HTML render kit for rendering to an HTML client. |
|
| 7. |
Explain Briefly The Life-cycle Phases Of Jsf? |
|
Answer» 1.Restore View : A REQUEST comes through the FacesServlet controller. The controller examines the request and extracts the view ID, which is determined by the name of the JSP page.
1.Restore View : A request comes through the FacesServlet controller. The controller examines the request and extracts the view ID, which is determined by the name of the JSP page.
|
|
| 8. |
what Are The Jsf Life-cycle Phases? |
|
Answer» The six phases of the JSF application lifecycle are as follows (NOTE the EVENT processing at each phase):
The six phases of the JSF application lifecycle are as follows (note the event processing at each phase):
|
|
| 9. |
What If No Navigation Rule Matches A Given Action? |
|
Answer» If no NAVIGATION rule matches a given ACTION, then the current PAGE is REDISPLAYED.
If no navigation rule matches a given action, then the current page is redisplayed.
|
|
| 10. |
How To Declare The Page Navigation (navigation Rules) In Faces-config.xml File? |
|
Answer» Navigation RULES tells JSF implementation which page to send back to the browser after a FORM has been SUBMITTED. We can declare the page navigation as follows: Navigation rules tells JSF implementation which page to send back to the browser after a form has been submitted. We can declare the page navigation as follows: |
|
| 11. |
How To Declare The Message Bundle In Jsf? |
|
Answer» We can declare the message BUNDLE in TWO ways: We can declare the message bundle in two ways: |
|
| 12. |
How Do You Declare The Managed Beans In The Faces-config.xml File? |
|
Answer» The bean INSTANCE is configured in the faces-config.xml file:
The bean instance is configured in the faces-config.xml file:
|
|
| 13. |
What Are The Main Tags In Jsf? |
|
Answer» JSF application typically uses JSP pages to represent views. JSF provides useful special tags to enhance these views. Each TAG gives rise to an associated component. JSF (Sun IMPLEMENTATION) provides 43 tags in two STANDARD JSF tag libraries: •JSF Core Tags LIBRARY. JSF application typically uses JSP pages to represent views. JSF provides useful special tags to enhance these views. Each tag gives rise to an associated component. JSF (Sun Implementation) provides 43 tags in two standard JSF tag libraries: •JSF Core Tags Library. |
|
| 14. |
What Is The Difference Between Jsp-el And Jsf-el? |
|
Answer» SP-EL :
JSF-EL :
SP-EL : JSF-EL :
|
|
| 15. |
What Are The Different Kinds Of Bean Scopes In Jsf? |
|
Answer» JSF supports three Bean Scopes. viz., JSF supports three Bean Scopes. viz., |
|
| 16. |
What Do You Mean By Bean Scope? |
|
Answer» Bean Scope typically holds BEANS and other OBJECTS that NEED to be available in the DIFFERENT components of a web APPLICATION.
Bean Scope typically holds beans and other objects that need to be available in the different components of a web application.
|
|
| 17. |
What Is The Difference Between The Domain Object Model And A View Object? |
|
Answer» In a simple Web application, a domain object model can be used across all tiers, however, in a more complex Web application, a separate view object model needs to be used. Domain object model is about the business object and should BELONG in the business-LOGIC tier. It contains the business data and business logic associated with the SPECIFIC business object. A view object contains presentation-specific data and behavior. It contains data and logic specific to the presentation tier. In a simple Web application, a domain object model can be used across all tiers, however, in a more complex Web application, a separate view object model needs to be used. Domain object model is about the business object and should belong in the business-logic tier. It contains the business data and business logic associated with the specific business object. A view object contains presentation-specific data and behavior. It contains data and logic specific to the presentation tier. |
|
| 18. |
What Is Domain Object Model? |
|
Answer» Domain object MODEL is about the business object and should belong in the business-LOGIC tier. It contains the business DATA and business logic associated with the specific business object. Domain object model is about the business object and should belong in the business-logic tier. It contains the business data and business logic associated with the specific business object. |
|
| 19. |
What Is View Object? |
|
Answer» A view object is a MODEL object used specifically in the presentation tier. It contains the data that must display in the view LAYER and the logic to VALIDATE user input, handle events, and interact with the business-logic tier. The BACKING BEAN is the view object in a JSF-based application. Backing bean and view object are interchangeable terms.
A view object is a model object used specifically in the presentation tier. It contains the data that must display in the view layer and the logic to validate user input, handle events, and interact with the business-logic tier. The backing bean is the view object in a JSF-based application. Backing bean and view object are interchangeable terms.
|
|
| 20. |
What Makes A Backing Bean Is The Relationship It Has With A Jsf Page; It Acts As A Place To Put Component References And Event Code. |
|
Answer» Backing Beans :
Managed Beans :
Backing Beans should be defined in the request scope, exist in a one-to-one relationship with a particular page and hold all of the page specific event handling code.In a real-world SCENARIO, several PAGES may NEED to share the same backing bean behind the scenes.A backing bean not only contains view data, but also behavior related to that data.
Backing Beans : Managed Beans : Backing Beans should be defined in the request scope, exist in a one-to-one relationship with a particular page and hold all of the page specific event handling code.In a real-world scenario, several pages may need to share the same backing bean behind the scenes.A backing bean not only contains view data, but also behavior related to that data.
|
|
| 21. |
What Are The Differences Between A Backing Bean And Managed Bean? |
|
Answer» Backing BEANS are merely a convention, a subtype of JSF MANAGED Beans which have a very particular purpose. There is NOTHING SPECIAL in a Backing BEAN that makes it different from any other managed bean apart from its usage. Backing Beans are merely a convention, a subtype of JSF Managed Beans which have a very particular purpose. There is nothing special in a Backing Bean that makes it different from any other managed bean apart from its usage. |
|
| 22. |
What Is Managed Bean? |
|
Answer» JavaBean objects managed by a JSF implementation are called managed BEANS. A managed bean DESCRIBES how a bean is created and managed. It has nothing to do with the bean's FUNCTIONALITIES JavaBean objects managed by a JSF implementation are called managed beans. A managed bean describes how a bean is created and managed. It has nothing to do with the bean's functionalities |
|
| 23. |
What Is A Javaserver Faces Application? |
|
Answer» JavaServer Faces applications are just like any other Java web application. They RUN in a servlet container, and they typically contain the following:
In addition to these items, a JavaServer Faces application ALSO has:
JavaServer Faces applications are just like any other Java web application. They run in a servlet container, and they typically contain the following: In addition to these items, a JavaServer Faces application also has:
|
|
| 24. |
What Typical Jsf Application Consists Of? |
|
Answer» A TYPICAL JSF application consists of the following parts: •JavaBeans components for managing application state and behavior. A typical JSF application consists of the following parts: •JavaBeans components for managing application state and behavior. |
|
| 25. |
What Are The Available Implementations Of Javaserver Faces? |
|
Answer» The main implementations of JavaServer FACES are: •Reference Implementation (RI) by Sun Microsystems. The main implementations of JavaServer Faces are: •Reference Implementation (RI) by Sun Microsystems. |
|
| 26. |
What Are Differences Between Struts And Jsf? |
|
Answer» In a nutshell, Faces has the following advantages over Struts:
The primary advantages of Struts as compared to JavaServer Faces technology are as follows:
The greatest advantage that JavaServer Faces technology has over Struts is its flexible, extensible UI component model, which includes:
In a nutshell, Faces has the following advantages over Struts: The primary advantages of Struts as compared to JavaServer Faces technology are as follows: The greatest advantage that JavaServer Faces technology has over Struts is its flexible, extensible UI component model, which includes: |
|
| 27. |
What Are The Advantages Of Jsf? |
|
Answer» The major BENEFITS of JavaServer Faces technology are:
The major benefits of JavaServer Faces technology are: |
|
| 28. |
What Is Jsf (or Javaserver Faces)? |
|
Answer» A server side USER interface component framework for Java technology-based web applications. JavaServer Faces (JSF) is an industry standard and a framework for building component-based user interfaces for web applications. JSF contains an API for representing UI components and managing their STATE; handling EVENTS, server-side validation, and DATA conversion; defining page navigation; SUPPORTING internationalization and accessibility; and providing extensibility for all these features. A server side user interface component framework for Java technology-based web applications. JavaServer Faces (JSF) is an industry standard and a framework for building component-based user interfaces for web applications. JSF contains an API for representing UI components and managing their state; handling events, server-side validation, and data conversion; defining page navigation; supporting internationalization and accessibility; and providing extensibility for all these features. |
|