Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword
Like this
2Activity
0 of .
Results for:
No results containing your search query
P. 1
Jsf-facelets Interview Questions

Jsf-facelets Interview Questions

Ratings: (0)|Views: 637|Likes:
Published by towid

More info:

Published by: towid on Nov 08, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

11/08/2011

pdf

text

original

 
1.What is a web application?Answer: A web application is a dynamic extension of a web or applicationServer.
2.
What is facelets?
3.
Answer: The term facelets refer to the view declaration for Java Server facestechnology. Facelets is a lightweight but powerful page declaration languagethat is used to build Java Server Faces views using HTML style template andto build component trees4.What language is used to create Facelet views?Answer: XHTML5.what is the prefix for JavaServer Faces Facelets Tag Library?Answer: ui:6.What is the prefix for JavaServer Faces HTML Tag Library?Answer: h:7.What is the prefix for JavaServer Faces Core Tag Library?Answer: f:8.What is the prefix for JSTL core tag Library?Answer: c:9.What is the prefix for JSTL function tag library?Answer: fn:10.How do facelets refer properties and methods of backing bean?Answer: through the support of Expression Language (EL) in JSP 2.1specification.11.What are the steps taken to create a facelet application?Answer: Developing the backing beans, creating the pages using componenttags, defining page navigation, mapping the facesServlet instance, addingmanaged bean application.12.In a typical Java Server Faces application, each page is connected to what?Answer: to a backing bean file.13.What are the two annotation you should use with a backing Bean?Answer: @ManagedBean, @SessionScoped.14.What are the steps involved in creating a facelet view/page?Answer: adding components on the page, wining the components to thebacking bean values and properties, and registering converters, validatorsand listeners.15.Where do you specify the name space?Answer: using xmlns tag.16.What is the use of context parameter PROJECT_STAGE?Answer: This parameter identifies the status of a JavaServer Facesapplication in the software lifecycle. The Default project stage is Production.17.What is templating?Answer: JavaServer Faces technology provides the tool to implement user interface that are reusable and extensible. Templating is a useful faceletsfeature that allows you to create a page that acts as a template or base. Byusing templating, you can re-use the code avoiding re-creating similarlyconstructed pages.
 
18.How do the client page invokes template from the main page?Answer: The client page invokes the template by the ui:composition tag,allowing content to be inserted using the ui:define tag inside ui:compositiontag.19.What is a composite component?Answer: A composite component consists of a collection of markup tags andother existing components. This reusable, user-created component has acustomized, defined functionality and can have validators, converters, andlisteners attached to it like any other component. the composite componentcan be stored in a library that is available to the application from the definedresources location20.What is the reverse work for composite component in JavaServer FacesTechnology?Answer: cc is the reserve work to access the attribute defined for compositeComponent interface,21.Which directory is considered to be the library of JavaServer Faces ?Answer: resource directory under the web-app root directory.22.What is a using page?Answer: The web page using the composite component from the library.23.What are the two places that a web resource can be places:Answer: There are basically two places a web resource can be placed.a)A web resource packaged in the root directory of the web-app must beplaced in side the resource/resource-identifier directoryb)A web resource packaged in the classpath of the web-app must beplaced inside the META-info/resource/resource-identifier directory.24.Which technology is used both by JavaServer Pages and JavaServer facestechnology?Answer: Expression Language (EL)25.What does immediate evaluation mean in the context of expressionlanguage?Answer: Immediate evaluation means that expression is evaluated and resultis returned as soon as the page is first rendered.26.What does deferred evaluation means in terms of Expression Language?Answer: deferred evaluation means that the technology using the expressionlanguage can use their own machinery to evaluate the expression sometimeslater during the lifecycle of this page, whenever is appropriate.27.What is the syntax used for deferred or immediate evaluation?Answer: ${ } for immediate evaluation and #{ } for deferred evaluation.28.Why JavaServer Faces technology uses deferred evaluation?
 
Answer: Because of its multiphase lifecycle, JavaServer Faces technology usesmostly deferred evaluation expressions. During the lifecycle, component eventsare handled, data is validated, and other tasks are performed in a particular order. Therefore, a JavaServer Faces implementation must defer evaluation of expressions until the appropriate point in the lifecycle.29.How many kinds of expressions are defined in EL?Answer: EL defines two kinds of expression: value expressions and methodexpressions.
30.
What kind of objects can you refer to by EL (both rvalue and lvalue)?Answer: JavaBean Object, collection, enum type and implicit objects.31.Who and how an EL expression is evaluated?Answer: The web container evaluates the variable that appears in anexpression by looking up its value according to the behavior of PageContext.findAttribute {String}, where the string argument is the name of the variable. For example, when evaluating the expression ${customer}, thecontainer will look for customer in page, request, session and applicationscope and will return its value. A null value is returned if it is not found.
32.
How can you refer an enum constant with EL?Answer: using string literal. For example. For the following enumPublic enum Suit {hearts,spread,diamond,clubs}To refer to the Suit constant Suit.hearts with an expression, use the Stringliteral "hearts". Depending on the context, the String literal is converted to theenum constant automatically. For example, in the following expression inwhich mySuit is an instance of Suit, "hearts" is first converted to Suit.heartsbefore it is compared to the instance:${mySuit == "hearts"}33. How can you refer to properties of a bean or an enum instance, items of acollection, or attributes of an implicit object?Answer: you use the . or [ ] notation
33.
What is a must requirement to access the properties of an enum constantusing EL?

Activity (2)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->