R4RIN
Articles
Java 8
MCQS
Spring MCQ Quiz Hub
Spring Mcq Set 4
Choose a topic to test your knowledge and improve your Spring skills
1. Element which defines user details.
user-service
user-details
user-requirements
user-servicerequirements
2. Which of the following way to provide authenticity of users is/are supported by Spring Security?
Authenticating against a database
LDAP repository
All of the mentioned
none of the mentioned
3. The basic security services registered and configured by Spring Security.
Form-based login service
Logout Service
HTTP Basic authentication.
all of the mentioned
4. HTTP Basic authentication support is configured by:-
logout
http-basic
http-basicauth
none of the mentioned
5. Form-based login is configured by:-
servlet filters
refresh-check-delay
form-login
none of the mentioned
6. Action URL can be customized using form-login.
True
False
error
None of these
7. Attribute used to display custom login page.
login-url
custom-login
login-custom
custom-login
8. Attribute which specifies redirection URL on login error.
authentication-failure-url
authentication-failure_login-url
authentication-login-url
None of the mentioned
9. Session scope attribute to display error message.
SPRING_SECURITY_FIRST_EXCEPTION
SPRING_SECURITY_LAST_EXCEPTION
SPRING_SECURITY_EXCEPTION
SPRING_SECURITY_LAST_ERROR
10. Logout service is configured by:-
logout
login
logout-basic
logout_basic
11. Element which redirects to a specific URL on logout.
logout-success
logout-success_url
logout-url
logout-success-url
12. Anonymous login services can be configured by:-
anonymous-basic
anonymous
anonymous-target
none of the mentioned
13. Default values of customized Username and authorities are anonymousUser and ROLE_ANONYMOUS respectively.
True
False
error
None of these
14. Remember-me support can be configured by:-
remember-me
remember-me-basic
remember-basic
none of the mentioned
15. By default, Remember-me encodes the username, password, remember-me expiration time, and a private key as a token, and stores it as a cache in the user’s browser.
True
False
error
None of these
16. Spring Security algorithms to secure password.
MD5
SHA
All of the mentioned
none of the mentioned
17. Connection of database with Apache derby server requires.
Derby client.jar
Spring JDBC support
None of the mentioned
All of the mentioned
18. You can specify the statements for querying a user’s information and authorities in the users-by-username-query and authorities-by-username-query attributes.
True
False
error
None of these
19. Utility to calculate MD5 digests for your password.
CheckSum
BeanShell
Jacksum
none of the mentioned
20. Element used to secure methods.
security:intercept-methods
global-method-security
all of the mentioned
none of the mentioned
21. @Secured annotation is used to secure methods implemented by beans.
True
False
error
None of these
22. Element used to specify access attributes for bean’s methods.
security:protect
security:intercept
security:intercept-security
None of the mentioned
23. Attribute used to specify custom access decision manager.
access-decision-manager-ref
access-decision-ref
access-decision
none of the mentioned
24. JSP technology is also used to handle security of JSP views.
True
False
error
None of these
25. Tag which displays user’s Authentication object.
security:tag
security_Tag
security:authentication
none of the mentioned
26. Tag which renders the granted authorities one by one.
c:for
c:forEach
c:doWhile
c:while
27. Tag used to render view contents conditionally.
security:authorize
security:authority
security:authenticate
None of the mentioned
28. Attribute used to render enclosed content.
ifGranted
if_Granted
ifAllGranted
none of the mentioned
29. Module that allows each domain to have it’s own access.
access share list
access common list
access control list
access list
30. ACL(Access control list) consists of:-
object identity
access control entities
none of the mentioned
all of the mentioned
31. ACEs(Access control entries) core consists of:-
Permissions
Security Identity
All of the mentioned
none of the mentioned
32. Which of the following is/are part of BasePermission class:-
CREATE
READ/WRITE
DELETE
all of the mentioned
33. SID(Security Identity) associates with permission using.
principal(PrincipalSid)
authority (GrantedAuthoritySid)
all of the mentioned
none of the mentioned
34. Interfaces that defines operation of an ACL service.
AclService
MutableAclService
All of the mentioned
None of the mentioned
35. Servlet listener which loads application context.
Security:intercept-methods
global-method-security
ContextLoaderListener
none of the mentioned
36. Method to retrieve Spring Applicationcontext.
WebApplicationContextUtils.getRequiredWebApplicationContext()
WebApplicationContextUtils.getRequiredWeb()
WebApplicationUtils.getRequiredWebApplicationContext()
None of the mentioned
37. Class used to have full access to the Spring context’s life cycle machinery and dependency injection.
DelegatingFilterProxy
WebApplicationContextUtils.getRequiredWeb()
WebApplicationUtils.getRequiredWebApplicationContext()
None of the mentioned
38. In order to leverage Spring application context machinery and configuration.
HttpRequestHandlerJNDI
HttpRequestHandlerServlet
HttpRequestHandler
none of the mentioned
39. Interface implemented by object instantiated by HttpRequestHandlerServlet.
HttpRequestHandlerJNDI
HttpRequestHandlerServlet
HttpRequestHandler
none of the mentioned
40. Attribute used to look up and delegate a particular root bean.
filter
filter-name
filtername
none of the mentioned
41. ActionSupport class provides a method to access spring application context.
getWebApplicationContext()
getWebApplication()
getApplicationContext()
contextEventListener()
42. Struts servlet used to handle web requests.
ActionServlet
Action
ActionSupport
ActionStruts
43. Struts plugin used to integrate with spring.
ContextLoaderListener
ContextLoaderPlugin
ContextLoaderListenerPlugin
none of the mentioned
44. Integration of JSF with Spring Application Context.
ContextLoaderListener
DelegatingVariableResolver
SpringBeanFacesELResolver
all of the mentioned
45. To handle web requests in JSF.
FacesServlet
JavaFacesServlet
Faces-Servlet
none of the mentioned
46. Component of JSF, for user’s input in a form.
h:form
h:commandButton
h:outputText
h:inputText
47. Tag used to provide result of web requests and is read only.
h:form
h:commandButton
h:outputText
h:inputText
48. Tag which triggers server side requests.
h:form
h:commandButton
h:outputText
h:inputText
49. Tag used to integrate Spring with DWR.
dwr:integrate
dwr:remote
dwr:action
None of the mentioned
50. Spring supports web flows by:-
Java
XML
All of the mentioned
none of the mentioned
Submit