GIAC GSSP-Java Exam Practice Questions (P. 2)
- Full Access (275 questions)
- Six months of Premium Access
- Access to one million comments
- Seamless ChatGPT Integration
- Ability to download PDF files
- Anki Flashcard files for revision
- No Captcha & No AdSense
- Advanced Exam Configuration
Question #6
Mark works as a Programmer for InfoTech Inc. He develops the following deployment descriptor code.
<web-app . . . .>
<display-name>A Secure Application</display-name><servlet>
...
<security-role-ref >
<role-name>Manager</role-name>
<role-link>Admin</role-link>
</security-role-ref>
</servlet>
<security-role>
<role-name>Programmer</role-name>
</security-role>
<security-role>
<role-name>Admin</role-name>
</security-role>
<security-role>
<role-name>Employee</role-name>
</security-role>
</web-app>
Which of the following is a valid isUserInRole() method call that can be made if request is the
HttpServletRequest request?
<web-app . . . .>
<display-name>A Secure Application</display-name><servlet>
...
<security-role-ref >
<role-name>Manager</role-name>
<role-link>Admin</role-link>
</security-role-ref>
</servlet>
<security-role>
<role-name>Programmer</role-name>
</security-role>
<security-role>
<role-name>Admin</role-name>
</security-role>
<security-role>
<role-name>Employee</role-name>
</security-role>
</web-app>
Which of the following is a valid isUserInRole() method call that can be made if request is the
HttpServletRequest request?
- Arequest.isUserInRole("Programmer");
- Brequest.isUserInRole("Manager");
- Crequest.isUserInRole("Admin");
- Drequest.isUserInRole("Employee");
Correct Answer:
B
B
send
light_mode
delete
Question #7
Which of the following methods of the EJBContext interface can be called by both the BMT and CMT beans?
Each correct answer represents a complete solution. Choose all that apply.
Each correct answer represents a complete solution. Choose all that apply.
- AgetCallerPrincipal()
- BgetRollbackOnly()
- CgetUserTransaction()
- DisCallerInRole()
Correct Answer:
AD
AD
send
light_mode
delete
Question #8
Mark works as a Programmer for InfoTech Inc. He develops a deployment descriptor code that contains three valid
<security-constraint> elements.
All of them constraining a Web resource Res1, the
<auth-constraint> sub-element of the <security-constraint> elements are as follows.
<auth-constraint>Admin</auth-constraint>
<auth-constraint>Manager</auth-constraint>
<auth-constraint/>
Which of the following can access the resource Res1?
<security-constraint> elements.
All of them constraining a Web resource Res1, the
<auth-constraint> sub-element of the <security-constraint> elements are as follows.
<auth-constraint>Admin</auth-constraint>
<auth-constraint>Manager</auth-constraint>
<auth-constraint/>
Which of the following can access the resource Res1?
- AOnly Manager can access the resource.
- BNo one can access the resource.
- CEveryone can access the resource.
- DOnly Admin can access the resource.
Correct Answer:
B
B
send
light_mode
delete
Question #9
Which of the following statements correctly describe the features of the singleton pattern?
Each correct answer represents a complete solution. Choose all that apply.
Each correct answer represents a complete solution. Choose all that apply.
- ASingletons are used to control object creation by limiting the number to one but allowing the flexibility to create more objects if the situation changes.
- BSingletons can only be stateless, providing utility functions that need no more information than their parameters.
- CA singleton class may disappear if no object holds a reference to the Singleton object, and it will be reloaded later when the singleton is needed again.
- DThe behavior of a singleton can be obtained by static fields and methods such as java.lang.Math.sin(double).
Correct Answer:
ACD
ACD
send
light_mode
delete
Question #10
Which of the following deployment descriptor elements must contain the <transport-guarantee> element as its mandatory sub-element?
- A<user-data-constraint>
- B<web-resource-collection>
- C<auth-constraint>
- D<login-config>
Correct Answer:
A
A
send
light_mode
delete
All Pages