aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Mock Exam Queries from JDiscuss.. 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 "Mock Exam Queries from JDiscuss.." Watch "Mock Exam Queries from JDiscuss.." New topic
Author

Mock Exam Queries from JDiscuss..

Manwatkar Vaibhav
Greenhorn

Joined: Jun 11, 2007
Posts: 26
Hi all,
I just had given the Mock Exam for SCWCD at www.jdiscuss.com..
I gave some wrong answers and some questions I am confused with..
Here are some of them, I need guidance for the correct answers with a brief summary..

Thanks in advance..

Question 1 : Assuming that the servlet container is distributed across multiple JVMs, which of the following statements are correct? (Select 2 correct options.)

1) A separate instance of a non-default servlet context will be available on each of the JVMs.
2) A separate instance of all servlet context will be avaible on each of the JVMs.
3) The default servlet context will be present only on one of the JVMs.
4) There is only one instance of servlet contexts across all the JVMs.
5) None of the above

Answers from JDiscuss : (1 & 3)

(Can anybody explain me what does Default Servlet Context means..? )


Question 2 : You are developing a web application which needs to store a lot of data in persistant storage. As of now, your company does not have any database and so you can only use the file system to store the data. But if the webapp goes well, the company may buy an industrial strength database. Which design pattern would be useful for you in this case which will help you reduce your work load later? (Select 1 correct option.)

1) MVC
2) Business Delegate
3) File DB pattern
4) Data Access Object
5) Data Store Pattern

Answers from JDiscuss : (4)
(Does the real exam will have questions of Design Patterns other than the 6 discussed in HFSJ..?)


Question 3 : Which of the following things may happen in the translation phase of a JSP page? (Select 2 correct options.)

1) Execution of _jspService() method.
2) Execution of jspInit() method.
3) Creation of the servlet class corresponding to the JSP file.
4) Instantiation of the servlet class.
5) Loading of the servlet class.

Answers from JDiscuss : (3 & 5)
But I think, Loading the Servlet Class is not part of Translation phase..?


Question 4 : Identify the techniques that can be used to implement 'sessions' if the client browser does not support cookies. (Select 3 correct options. )

1) Using Http headers.
2) Using https protocol.
3) Hidden form fields.
4) URL rewriting
5) It cannot be done without cookie support.

Answer from JDiscuss : (1, 3, 4)


Question 5 : You do not want multiple threads to be executing your servlet's methods because its methods are not thread safe. What is the right way to ensure this? (Select 2 correct options.)

1) Make its methods synchronized.
2) Make it implement MultiThreadModel.
3) Make it implement SingleThreadModel.
4) You don't need to do anything as the container automatically takes care of this.

Answer from JDiscuss : (1, 3)


Question 6 : You want to use a bean that is stored in com/enthu/GUI.ser file. Which of following statements correctly defines the tag that accesses the bean? (Select 1 correct option.)

1) <jsp:useBean id="pref" name="com/enthu/GUI.ser" />
2) <jsp:useBean id="pref" name="com.enthu.GUI" />
3) <jsp:useBean id="pref" type="com/enthu/GUI.ser" />
4) <jsp:useBean id="pref" beanName="com.enthu.GUI" type="com.enthu.GUI"/>
5) <jsp:useBean id="pref" class="com.enthu.GUI.ser" />

Answer from JDiscuss : (I selected 4 and was correct)
Query : Is this thing (Serialized Bean) covered in HFSJ or Real Exam..?


Question 7 : In which of the following situations will a session be definitely invalidated? (Select 2 correct options.)

1) The container is shutdown and brought up again.
2) No request comes from the client for more than "session timeout" period.
3) A servlet explicitly calls invalidate() on a session object.
4) If the session time out is set to 0 using setMaxInactiveInterval() method, the session will never be invalidated automatically.

Answer from JDiscuss : (2 & 3)
Query : Why Option 1 can not be the answer..?


Quesion 8 : Assuming that the Servlet Container has just called destroy() method of a servlet instance, which of the following statements are correct? (Select 2 correct options.)

1) Any resources that this servlet might hold have been released.
2) The servlet container time out has exceeded for this servlet instance.
3) The init() method has been called on this instance.
4) None of the requests can EVER be serviced by this instance.
5) All threads created by this servlet are done.

Answer from JDiscuss : (3 & 4)


Question 9 : Which of the following XML elements should be present in a deployment descriptor of a web application so that it can be distributed accross multiple JVMs? (Select 1 correct option.)

1) <distributable/>
2) <distributable>true</distributable>
3) <distributed/>
4) <distributed>true</distributed>
5) <distribute>true</distribute>

Answer from JDiscuss : 1

Need help for answers & Clarification..
Thanks..!


Regards,<br />---------<br />Vaibhav<br />SCJP 1.4<br />SCWCD 1.4<br />---------
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

Originally posted by Vaibhav Potter:
(Does the real exam will have questions of Design Patterns other than the 6 discussed in HFSJ..?)


My post from ScwcdFaq:
Why am I seeing Design Patterns in mock exams that aren't in the objectives?
Mock exams, as well as the real exam, contain answer options other than the 6 Design Patterns from the objectives. Some are real and some are not. "Composite Delegate" is an option in HFSJ but was something we think Bert made up because he likes to play jokes. Patterns other than the Big 6 are never the correct answer on the real exam. Ever. Use this knowledge to your advantage.

The 6 you need to know are: * Transfer Object * MVC * Front Controller * Business Delegate * Service Locator * Intercepting Filter (sometimes just called Filter)

Also note that in previous versions of the exam, the following patterns were covered (and so you may see them more frequently in older mock exams): * Value Object - (now more commonly called Transfer Object) * Model-View-Controller - (aka MVC) * Data Access Object (DAO) * Business Delegate * Front Controller

I also have some notes on Design Patterns under Rancher Notes in the ScwcdLinks page!

I'll let the other folks here address your other questions.


A good workman is known by his tools.
Manwatkar Vaibhav
Greenhorn

Joined: Jun 11, 2007
Posts: 26
Thanks for the clarification Marc..
Mark Garland
Ranch Hand

Joined: Nov 11, 2006
Posts: 226
Question 4 : Identify the techniques that can be used to implement 'sessions' if the client browser does not support cookies. (Select 3 correct options. )

1) Using Http headers.
2) Using https protocol.
3) Hidden form fields.
4) URL rewriting
5) It cannot be done without cookie support.

Answer from JDiscuss : (1, 3, 4)


As I understand it....

1) Using headers, you could pass in a session id. I think that's even how cookies work - using a header.
3) You could store the session id (or some other identifying value) within a form field which was no displayed to the user. It will be automatically resubmitted by the browser on form submission.
4) The old favourite backup for when cookies fail.

HTH


28/06/06 - SCJP - 69%, 05/06/07 - SCWCD - 92%, 28/02/08 - IBM DB2 v9 Fundamentals (Exam 730) - 87%, 18/11/08 - IBM DB2 v9 DBA (Exam 731) - 89%, 26/02/11 - SCBCD - 88%
Mark Garland
Ranch Hand

Joined: Nov 11, 2006
Posts: 226
Question 5 : You do not want multiple threads to be executing your servlet's methods because its methods are not thread safe. What is the right way to ensure this? (Select 2 correct options.)

1) Make its methods synchronized.
2) Make it implement MultiThreadModel.
3) Make it implement SingleThreadModel.
4) You don't need to do anything as the container automatically takes care of this.

Answer from JDiscuss : (1, 3)


1) Making methods synchronized means that only one thread can execute them at once.
3) This interface achieves something similar as above.

Just don't let the authors of HFSJ hear us talking about this, or they'll cry.
Mark Garland
Ranch Hand

Joined: Nov 11, 2006
Posts: 226


I just know that is the correct answer.
I think it's one of those unfortunate things that you just have to learn, like those nasty ejb refs I spent so much time on!
Hanuma Deepak Muvvala
Ranch Hand

Joined: Nov 20, 2005
Posts: 158
Question 6 : You want to use a bean that is stored in com/enthu/GUI.ser file. Which of following statements correctly defines the tag that accesses the bean? (Select 1 correct option.)

1) <jsp:useBean id="pref" name="com/enthu/GUI.ser" />
2) <jsp:useBean id="pref" name="com.enthu.GUI" />
3) <jsp:useBean id="pref" type="com/enthu/GUI.ser" />
4) <jsp:useBean id="pref" beanName="com.enthu.GUI" type="com.enthu.GUI"/>
5) <jsp:useBean id="pref" class="com.enthu.GUI.ser" />

Answer from JDiscuss : (I selected 4 and was correct)
Query : Is this thing (Serialized Bean) covered in HFSJ or Real Exam..?



Hi the beanName attribute is not coverd in HFSJ? I read regarding this in other books..
Manwatkar Vaibhav
Greenhorn

Joined: Jun 11, 2007
Posts: 26
Hi Hanumadeepak,

I also answered correctly because I read about the beanName attribute from Hanumant Deshmukh's book..
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Mock Exam Queries from JDiscuss..
 
Similar Threads
Distrubutable web applications
Defaul ServletContext ...??? Question
Ethurware Query
beanName
jsp:useBean doubt.