aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes HFSJ Final Mock exam - 5 doubts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "HFSJ Final Mock exam - 5 doubts" Watch "HFSJ Final Mock exam - 5 doubts" New topic
Author

HFSJ Final Mock exam - 5 doubts

Imran Vohra
Ranch Hand

Joined: Dec 12, 2005
Posts: 77

QN (22)
Which JSP code will include static content?
My doubt is why option (d) is not the answer?
(d)

QN (49)
Which statment regarding META-INF is true?
Again my doubt is why not (d)?
If we can access contents of META-INF directory through ServletContext class methods, then we can access through ServletConfig class methods also.
Because getServletContext() method is available in ServletConfig.

QN(51)
Why not (E)? because, if you use MVC then you can replace your old back-end wih new one very easily.

QN (63)
Given:
1. <%@ taglib uri="http://www.mycomay.com/mytags" prefix="mytags" %>
2. <mytags:foo bar="abc"/>
3. <mytags:forEach><mytags oSomething/></mytags:forEach>
4. <jsp:setProperty name="x" property="a" value="b"/>
5. <c ut value="hello"/>
Assume that this is complete JSP.
I agree that line 5 will generate an error. But my question is why not line (4). Because we have not defined <jsp:useBean id="x"/> anywhere in JSP

QN (67)
In this question, it is mentioned that we have to examine the rquest to determine which type of client has initiated it.
So, why not Intercepting Filter?

Regards
Imran
Mohd Fuzail
Ranch Hand

Joined: Feb 20, 2002
Posts: 107
Request you to put Options along with Questions, as lot of people might not be having HFS JSP in hand


Being defeated is often a temporary condition. Giving up is what makes it permanent.
Imran Vohra
Ranch Hand

Joined: Dec 12, 2005
Posts: 77

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
Nagarajan Kanirajan
Greenhorn

Joined: Aug 29, 2006
Posts: 6
For Q22, option D is wrong because it is not placed inside a JSP scriptlet tag. Read the question..it says which "JSP code".
Imran Vohra
Ranch Hand

Joined: Dec 12, 2005
Posts: 77

ranchers.....Please reply.
Imran Vohra
Ranch Hand

Joined: Dec 12, 2005
Posts: 77

ranchers.....Please reply.
cheenu Dev
Ranch Hand

Joined: Nov 13, 2005
Posts: 276
for 49:
you have getServletContext() which then has ServletContext class on which it looks. the methods for accesing are NOT in ServletConfig..though you can get servlet context

22:nagarajan explained it

51: wording of stubs there.better verify the core j2ee pattern book

63: its already discussed a lot..please search.

67:
that needs to display the results of database seaches to several different types of clients,

for this answer is C.

hope its clear now.


cheenujunk@gmail.com
Imran Vohra
Ranch Hand

Joined: Dec 12, 2005
Posts: 77

I am not getting ans for Q-63
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)

Even brief reply will do

Thanks
Imran
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HFSJ Final Mock exam - 5 doubts
 
Similar Threads
HFSJ final mock exam question 63
Q 63 from SCWCD mock exam
HFSJ 1 Edition mock doubt
Error in the final mock exam Qn 63?
mock exam questions 54 and 61