R4RIN
Articles
Java 8
MCQS
Spring MCQ Quiz Hub
Spring Mcq Set 8
Choose a topic to test your knowledge and improve your Spring skills
1. To keep the code simpler.
Hibernate
Backing datastore
ConcurrentSkipListSet
None of the mentioned
2. Method which takes parameters required to describe a bid and creates it.
bid
acceptBid
all of the mentioned
none of the mentioned
3. To notify other viewers of any new items posted.
javax.jms.Topic
jms
all of the mentioned
none of the mentioned
4. Method, which is called after the component’s been configured by Spring
setupItems
setUp
setupFakeItems
all of the mentioned
5. To configure the standard Spring bean.
context:component-scan
context:scan
context:component
none of the mentioned
6. In Spring context XML for the message broker, we have.
flex
flex:message-broker
all of the mentioned
none of the mentioned
7. flex:message-service element had an attribute.
default-channels
default-channel
default
default-types
8. To use a different channel they’d like to use when communicating with the server.
flex:remoting-destination
flex:remote
flex:destination
flex:default-channels
9. Grails is a self-contained framework that comes with various scripts to automate the creation of Java applications.
True
False
none
all the mentoined
10. To invoke Grails operations from anywhere on your workstation.
GRAILS HOME
PATH
All of the mentioned
None of the mentioned
11. To see Grails numerous commands.
grails help
grails -help
grails -h
help grails
12. To create a Grails application, command:-
grails create-app
grails create-app grailsappname
grails create-app default
none of the mentioned
13. Working directories and files are placed under which directory.
User’s home directory under the name.grails/grails version/.
WEB-APP
WEB-INF
None of the mentioned
14. Grails generates a series of files and directories which includes.
Apache Ant file(build.xml)
Apache Ivy file(ivy.xml)
All of the mentioned
none of the mentioned
15. Used to define an application’s properties.
application.properties
build.xml
manifest.xml
court.iml
16. An Apache Ant script with a series of predefined tasks designed to create a Grails application.
application.properties
build.xml
manifest.xml
court.iml
17. An XML file containing configuration parameters for an application.
application.properties
build.xml
manifest.xml
court.iml
18. An XML file containing configuration parameters for an application’s deployment.
application.properties
build.xml
court.iws
court.iml
19. An XML file containing configuration parameters for an application’s launch.
application.properties
build.xml
court.iws
court.launch
20. An Apache Ivy configuration file used for defining repositories.
application.properties
ivysettings.xml
court.iws
court.launch
21. A directory containing the core of an application.
application.properties
ivysettings.xml
court.iws
grails-app
22. Some of the more popular Grails plugins follow:
App Engine
Quartz
Spring WS
All of the mentioned
23. Classes used to describe an application’s primary elements.
Domain Classes
Application
Context
View
24. In web applications, domain classes are generally the first things to be defined.
True
False
none
all the mentoined
25. In Grails, domain classes are placed under:-
/grails-app/WEB-INF/
/grails-app/domain/
/grails-app/domain/WEB-APP
/grails-app/
26. The creation of domain classes by executing a simple command which is:-
grails create-domain-class
grails create-domain-class domain class name
domain class name
none of the mentioned
27. The command domain class name in creation of domain classes generates a file named domain class name.groovy.
True
False
none
all the mentoined
28. Corresponding unit tests files are also generated for each domain class while creating domain classes.
True
False
none
all the mentoined
29. Static field which defines constraints on the domain class.
static{}
static field{}
static constraint{}
static constraints{}
30. Declaration name which indicates that object’s name field can’t be blank.
blank:false
blank:true
all of the mentioned
None of the mentioned
31. A variety of constraints can be used to enforce a domain class’s structure.
True
False
none
all the mentoined
32. Command to generate the corresponding CRUD controller and views for an application’s domain class.
grails create-domain-class domain class name
grails create-domain-class
grails generate-all domain class name
none of the mentioned
33. Grails is capable of inspecting an application’s domain classes and generating the corresponding controllers and views.
True
False
none
all the mentoined
34. Views corresponding to a controller class’s CRUD operations.
create.gsp
edit.gsp
list.gsp
all of the mentioned
35. .gsp extension stands for:-
Groovy Server Pages
Groovy Service Pages
All of the mentioned
None of the mentioned
36. Views are placed under which directory:-
app/views/
app/
grails-app/views/WEB-INF
grails-app/views/domain class
37. Command to start the Grails application:-
grails run
grails start-app
grails run-app
none of the mentioned
38. Grails applications are equipped to support internationalization.
True
False
none
all the mentoined
39. Where can you find series of *.properties files.
/grails-app/
/grails-app/i18n/
/grails-app/i18n/WEB-INF
/grails-app/i18n/WEB-APP
40. *.properties files allow Grails applications to display messages.
True
False
none
all the mentoined
41. Which locale (i.e., from an internationalization properties file) to use for a user is based on?
/grails-app/conf/spring/resource.groovy file
user’s browser language preferences
all of the mentioned
none of the mentioned
42. If you want to coerce users into using a specific language locale.
/grails-app/conf/spring/resource.groovy file
/grails-app/resource.groovy file
/grails-app/spring/resource.groovy file
None of the mentioned
43. JSP Tag which declares statements using the Groovy.
g:message
g:string
g:msg
none of the mentioned
44. Tag can also be used in GSP pages views.
g:message
g:string
g:msg
none of the mentioned
45. Grails uses RDBMS as a permanent storage system.
True
False
none
all the mentoined
46. Grails comes preconfigured to use:-
MySql
PostgreSQL
Access
HSQLDB
47. Configure Grails to use another RDBMS by modifying:-
Data.groovy
DataSource.groovy
All of the mentioned
None of the mentioned
48. DataSource properties, Class name for the JDBC driver.
driverClassName
dataSource properties
all of the mentioned
None of the mentioned
49. Indicates whether to enable SQL logging.
driverClassName
dataSource properties
logSql
None of the mentioned
Submit