will appreciate quick reply.
QN 22
Which JSP code would you use to include static content in a JSP?
A. <%@ include file="/segment/footer.html" %>
B. <jsp:forward page="/segment/footer.html" />
C. <jsp:include page="/segment/footer.html" />
D. RequestDispatcher rd request.getRequestDispatcher("/segment/footer.html");
rd.include(request,response);
Ans given : A,C
I agree with A,C but why not (D)?
QN (49)
Which statment regarding META-INF is true?
A. This directory is optional when creating a WAR file.
B. The contents of this directory can eb served directly to clients only if HTTPS is activated.
C.
Servlets can access the contents of the /META-INF directory via methods in the ServletContext class
D. Servlets can access the contents of the /META-INF directory via methods in the ServletConfig class
Ans given : C
I agree with C but why not (D)? Because ServletConfig has method - getServletContext()
QN (51)
Your company is in the process of integrating several different back office applications and creating a single web UI to present the entire back office suite to your clients. The design of the front end will be finished long beore the design of the back end. Although the details of the back end design are still very rough, you have enough information to create some temporary back end stubs to use to
test the UI.
Which design
pattern will minimize the overhead of modifying the UI once the back end is complete?
A. Transfer Object
B. Front Controller
C. Business Delegate
D. Intercepting Filter
E. MVC
Ans given : C
Why not (E) ?
QN (63)
Given:
1. <%@ taglib uri="http://www.mycomay.com/mytags" prefix="mytags" %>
2. <mytags:foo bar="abc"/>
3. <mytags:forEach><mytags: doSomething/></mytags:forEach>
4. <jsp:setProperty name="x" property="a" value="b"/>
5. <c: out value="hello"/>
Assume that this is complete JSP
(For Option E,F ignore the fact that an error in one line might keep a sub-sequent line from being reahed)
A. Only line 2 will definitely generate an error.
B. Only line 3 will definitely generate an error.
C. Only line 4 will definitely generate an error.
D. Only line 5 will definitely generate an error.
E. Lines 4 & 5 will both definitely generate errors.
F. Lines 2,3,4 & 5 will all definitely generate errors.
G. The entire JSP could execute without generating any errors.
Ans given : D
My ans is E. Because apart from line 5, line 4 will also generate an error. because "x" is not defined in this JSP. Please clarify it
QN (67)
You are developing a web application for an organization that needs to display the results of database seaches to several different types of clients, including browsers, PDAs, and kiosks.
The application will have to examine the request to determine which type of client has initiated it, and then dispatch the request to the proper component.
Which pattern is designed for this type of application?
A. Transfer Object
B. Service Locator
C. MVC
D. Business Delegate
E. Intercepting Filter
Ans given : C
Frankly speaking, I have also selected C at first attempt. but when I was reviewing the question I have changed it to (E). Because it is mentioned in question that you have to examin the request. Please clarify it.
Thanks
Imran