Spring Questions and Answers – Grails Application and Plug ins

«
»

This set of Java Spring Multiple Choice Questions & Answers (MCQs) focuses on “Grails Application and Plug ins”.

1. Grails is a self-contained framework that comes with various scripts to automate the creation of Java applications.
a) True
b) False
View Answer

Answer: a
Explanation: In this sense, you simply need to unpack the distribution and perform a few installation steps in order to create Java applications on your workstation.
advertisement

2. To invoke Grails operations from anywhere on your workstation.
a) GRAILS HOME
b) PATH
c) All of the mentioned
d) None of the mentioned
View Answer

Answer: c
Explanation: After you unpack Grails on your workstation, define two environment variables on your operating system: GRAILS HOME and PATH.This allows you to invoke Grails operations from anywhere on your workstation.

3. To see Grails numerous commands.
a) grails help
b) grails -help
c) grails -h
d) help grails
View Answer

Answer: a
Explanation: If you execute the command grails help from any directory on your workstation, you should see Grails numerous commands.

4. To create a Grails application, command:-
a) grails create-app
b) grails create-app grailsappname
c) grails create-app default
d) none of the mentioned
View Answer

Answer: b
Explanation: To create a Grails application, invoke the following command wherever you wish to create an application: grails create-app grailsappname.

5. Working directories and files are placed under which directory.
a) User’s home directory under the name.grails/grails version/.
b) WEB-APP
c) WEB-INF
d) None of the mentioned
View Answer

Answer: a
Explanation: Grails also creates a series of working directories and files (i.e., not intended to be modified directly) for an application. These working directories and files are placed under a user’s home directory under the name.grails/grails version/.

6. Grails generates a series of files and directories which includes.
a) Apache Ant file(build.xml)
b) Apache Ivy file(ivy.xml)
c) All of the mentioned
d) None of the mentioned
View Answer

Answer: c
Explanation: Grails generates a series of files and directories that are common in most Java applications. This includes, an Apache Ant file (build.xml) and an Apache Ivy file (ivy.xml), as well as common directories like src for placing source code files and a web-app.
advertisement

7. Used to define an application’s properties.
a) application.properties
b) build.xml
c) manifest.xml
d) court.iml
View Answer

Answer: a
Explanation: Used to define an application’s properties, including the Grails version, servlet version, and an application’s name.

8. An Apache Ant script with a series of predefined tasks designed to create a Grails application.
a) application.properties
b) build.xml
c) manifest.xml
d) court.iml
View Answer

Answer: b
Explanation: An Apache Ant script with a series of predefined tasks designed to create a Grails application.

9. An XML file containing configuration parameters for an application.
a) application.properties
b) build.xml
c) manifest.xml
d) court.iml
View Answer

Answer: d
Explanation: An XML file containing configuration parameters for an application, such as directory locations and treatment of JARs.

10. An XML file containing configuration parameters for an application’s deployment.
a) application.properties
b) build.xml
c) court.iws
d) court.iml
View Answer

Answer: c
Explanation: An XML file containing configuration parameters for an application’s deployment, such as web container port and project views.

11. An XML file containing configuration parameters for an application’s launch.
a) application.properties
b) build.xml
c) court.iws
d) court.launch
View Answer

Answer: d
Explanation: An XML file containing configuration parameters for an application’s launch, such as JVM arguments.

12. An Apache Ivy configuration file used for defining repositories.
a) application.properties
b) ivysettings.xml
c) court.iws
d) court.launch
View Answer

Answer: b
Explanation: An Apache Ivy configuration file used for defining repositories in order to download dependencies.
advertisement

13. A directory containing the core of an application.
a) application.properties
b) ivysettings.xml
c) court.iws
d) grails-app
View Answer

Answer: d
Explanation: A directory containing the core of an application, which further
contains the following folders:
1. conf: A directory containing an application’s configuration sources
2. controllers: A directory containing an application’s controllers files
3. domain: A directory containing an application’s domain files
4. i18n: A directory containing an application’s internationalization (i18n) files
5. services: A directory containing an application’s service files
6. taglib: A directory containing an application’s tag libraries
7. utils: A directory containing an application’s utility files
8. views: A directory containing an application’s view files

14. An XML file containing configuration parameters for an application.
a) application.properties
b) ivysettings.xml
c) court.iml
d) court.launch
View Answer

Answer: c
Explanation: An XML file containing configuration parameters for an application, such as directory locations and treatment of JARs.

15. Some of the more popular Grails plugins follow:
a) App Engine
b) Quartz
c) Spring WS
d) All of the mentioned
View Answer

Answer: d
Explanation:
• App Engine: Integrates Google’s App Engine SDK and tools with Grails.
• Quartz: Integrates the Quartz Enterprise Job Scheduler to schedule jobs and have
them executed using a specified interval or cron expression
• Spring WS: Integrates and supports the provisioning of web services, based on the
Spring Web Services project
• Clojure: Integrates Clojure and allows Clojure code to be executed in Grails
artifacts

Sanfoundry Global Education & Learning Series – Java Spring.
To practice all areas of Java Spring, here is complete set of 1000+ Multiple Choice Questions and Answers.

advertisement
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage, Advanced C Programming, SAN Storage Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him @ LinkedIn