250+ TOP MCQs on Refreshing and Defining Beans from Scripts and Answers

Java Spring Multiple Choice Questions & Answers (MCQs) on “Refreshing and Defining Beans from Scripts”.

1. Attribute used by Spring to refresh beans
a) refresh-check-interval
b) refresh-check-delay
c) refresh-delay
d) none of the mentioned
Answer: b
Clarification: Spring is able to refresh a scripted bean definition from its source once you have specified the checking interval in the refresh-check-delay attribute.

2. Spring IoC container refreshes the script periodically according to the interval period specified
a) True
b) False
Answer: a
Clarification: When a method is called on that bean, Spring will check the script source if the specified checking interval has elapsed. The Spring will refresh the bean definition from the script source if it has been changed.

3. Default value of refresh-check-delay attribute
a) Zero
b) Negative
c) Positive
d) None of the mentioned above
Answer: b
Clarification: By default, the refresh-check-delay attribute is negative, so the refresh checking feature is disabled. You can assign the milliseconds for refresh checking in this attribute to enable this feature.

4. XML Element to define an inline script
a) lang:inlinescript
b) lang:inline_script
c) lang:[email protected]
d) lang:inline-script
Answer: d
Clarification: You can define an inline script source in the lang:inline-script element of a scripted bean to replace a reference to an external script source file by the script-source attribute.

5. Refresh checking feature is not applicable for an inline script
a) True
b) False
Answer: a
Clarification: Spring IoC container only loads the bean configuration once, at startup.

6. To prevent the characters in your script from conflicting with the reserved XML characters
a) Use ![CDATA[…]] tag
b) Use ![DATA[…]] tag
c) Use ![CDATA(…)] tag
d) None of the mentioned
Answer: a
Clarification: You no longer have to specify the reference to the external script source file in the script-source attribute.

7. Dynamic-language-backed bean with some configurations
a) Refreshable bean
b) Beanshell
c) Scripting Beans
d) Inline Script
Answer: a
Clarification: A refreshable bean is a dynamic-language-backed bean that with a small amount of configuration, a dynamic-language-backed bean can monitor changes in its underlying source file resource, and then reload itself when the dynamic language source file is changed.

8. To quickly add a Spring Validator implementation to a Spring MVC Controller
a) Use inline-script
b) lang:inline-script
c) All of the mentioned
d) None of the mentioned
Answer: c
Clarification: If we put to one side the issues surrounding whether it is good practice to define dynamic language source inside a Spring configuration file, the lang:inline-script/ element can be useful in some scenarios.

9. Spring can detect and refresh changes from the script source files
a) True
b) False
Answer: a
Exlanation: Using Refreshing Inline script.

10. Script’s location is specified by attribute
a) script-source
b) xml-source
c) script-annotation
d) none of the mentioned
Answer: a
Clarification: Specifying the script’s location in the script-source attribute.

250+ TOP MCQs on Grails Application and Plug ins and Answers

Java Spring Multiple Choice Questions & Answers (MCQs) 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
Answer: a
Clarification: 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.

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
Answer: c
Clarification: 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
Answer: a
Clarification: 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
Answer: b
Clarification: 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
Answer: a
Clarification: 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
Answer: c
Clarification: 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.

7. Used to define an application’s properties.
a) application.properties
b) build.xml
c) manifest.xml
d) court.iml
Answer: a
Clarification: 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
Answer: b
Clarification: 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
Answer: d
Clarification: 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
Answer: c
Clarification: 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
Answer: d
Clarification: 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
Answer: b
Clarification: An Apache Ivy configuration file used for defining repositories in order to download dependencies.

13. A directory containing the core of an application.
a) application.properties
b) ivysettings.xml
c) court.iws
d) grails-app
Answer: d
Clarification: 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
Answer: c
Clarification: 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
Answer: d
Clarification:
• 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

250+ TOP MCQs on Setting the Transaction Attribute and Answers

Java Spring Multiple Choice Questions & Answers (MCQs) on “Setting the Transaction Attribute”.

1. A transaction propagation behavior can be specified by the:-
a) propagation
b) consistency
c) isolation
d) All of the mentioned
Answer: a
Clarification: A transaction propagation behavior can be specified by the propagation transaction attribute.

2. Transaction propagation behavior are defined in the:-
a) org.springframework.transaction.Transaction
b) org.springframework.transaction.TransactionDefinition
c) all of the mentioned
d) none of the mentioned
Answer: b
Clarification: These behaviors are defined in the org.springframework.transaction.TransactionDefinition interface.

3. If there’s an existing transaction in progress, the current method should run within this transaction.
a) Required
b) REQUIRES NEW
c) SUPPORTS
d) NOT SUPPORTED
Answer: a
Clarification: If there’s an existing transaction in progress, the current method should run within this transaction. Otherwise, it should start a new transaction and run within its own transaction.

4. The current method must start a new transaction and run within its own transaction.
a) Required
b) REQUIRES NEW
c) SUPPORTS
d) NOT SUPPORTED
Answer: b
Clarification: The current method must start a new transaction and run within its own transaction. If there’s an existing transaction in progress, it should be suspended.

5. If there’s an existing transaction in progress, the current method can run within this transaction.
a) Required
b) REQUIRES NEW
c) SUPPORTS
d) NOT SUPPORTED
Answer: c
Clarification: Otherwise, it is not necessary to run within a transaction.

6. The current method should not run within a transaction.
a) Required
b) REQUIRES NEW
c) SUPPORTS
d) NOT SUPPORTED
Answer: d
Clarification: The current method should not run within a transaction. If there’s an existing transaction in progress, it should be suspended.

7. The current method must run within a transaction.
a) Required
b) MANDATORY
c) SUPPORTS
d) NOT SUPPORTED
Answer: b
Clarification: The current method must run within a transaction. If there’s no existing transaction in progress, an exception will be thrown.

8. The current method should not run within a transaction. If there’s an existing transaction in progress, an exception will be thrown.
a) Required
b) MANDATORY
c) SUPPORTS
d) NEVER
Answer: d
Clarification: The current method should not run within a transaction. If there’s an existing transaction in progress, an exception will be thrown.

9. If there’s an existing transaction in progress, the current method should run within the nested transaction.
a) Required
b) MANDATORY
c) NESTED
d) NEVER
Answer: c
Clarification: If there’s an existing transaction in progress, the current method should run within the nested transaction (supported by the JDBC 3.0 save point feature) of this transaction. Otherwise, it should start a new transaction and run within its own transaction.

10. For two transactions T1 and T2, T1 reads a field that has been updated by T2 but not yet committed.
a) Dirty Read
b) Nonrepeatable read
c) Phantom read
d) Lost Updates
Answer: a
Clarification: Later, if T2 rolls back, the field read by T1 will be temporary and invalid.

11. For two transactions T1 and T2, T1 reads a field and then T2 updates the field.
a) Dirty Read
b) Nonrepeatable read
c) Phantom read
d) Lost Updates
Answer: b
Clarification: Later, if T1 reads the same field again, the value will be different.

12. For two transactions T1 and T2, T1 reads some rows from a table and then T2 inserts new rows into the table.
a) Dirty Read
b) Nonrepeatable read
c) Phantom read
d) Lost Updates
Answer: c
Clarification: Later, if T1 reads the same table again, there will be additional rows.

13. For two transactions T1 and T2, they both select a row for update, and based on the state of that row, make an update to it.
a) Dirty Read
b) Nonrepeatable read
c) Phantom read
d) Lost Updates
Answer: d
Clarification: Thus, one overwrites the other when the second transaction to commit should have waited until the first one committed before performing its selection.

14. Isolation Levels Supported by Spring:-
a) DEFAULT
b) READ COMMITTED
c) READ UNCOMMITTED
d) All of the mentioned
Answer: d
Clarification: Isolation Description
DEFAULT Uses the default isolation level of the underlying database. For most databases,
the default isolation level is READ COMMITTED.
READ UNCOMMITTED Allows a transaction to read uncommitted changes by other transactions. The
dirty read, nonrepeatable read, and phantom read problems may occur.
READ COMMITTED Allows a transaction to read only those changes that have been committed by
other transactions. The dirty read problem can be avoided, but the nonrepeatable
read and phantom read problems may still occur.
REPEATABLE READ Ensures that a transaction can read identical values from a field multiple times.
For the duration of this transaction, updates made by other transactions to this
field are prohibited. The dirty read and nonrepeatable read problems can be
avoided, but the phantom read problem may still occur.
SERIALIZABLE Ensures that a transaction can read identical rows from a table multiple times. For
the duration of this transaction, inserts, updates, and deletes made by other
transactions to this table are prohibited. All the concurrency problems can be
avoided, but the performance will be low.

15. The exceptions that cause a transaction to roll back or not can be specified by attribute:-
a) rollback
b) commit
c) serialize
d) none of the mentioned
Answer: a
Clarification: Any exceptions not explicitly specified in this attribute will be handled by the default rollback rule (i.e., rolling back for unchecked exceptions and not rolling back for checked exceptions).

250+ TOP MCQs on Controlling Step Execution and Job and Answers

Java Spring Multiple Choice Questions & Answers (MCQs) on “Controlling Step Execution and Job”.

1. You want to control how steps are executed, perhaps to eliminate a needless waste of time by:-
a) concurrent steps
b) decisions
c) sequential steps
d) all of the mentioned
Answer: d
Clarification: There are different ways to change the runtime profile of your jobs, mainly by exerting control over the way steps are executed: concurrent steps, decisions, and sequential steps.

2. Typical jobs of almost any complexity will have multiple steps, however.
a) True
b) False
Answer: a
Clarification: A step provides a boundary (transactional or not) to the beans and logic it encloses.

3. There’s nothing to prevent you from having many steps within the flow elements.
a) True
b) False
Answer: a
Clarification: Nor was there anything preventing you from having more steps after the split element. The split element, like the step elements, takes a next attribute as well.

4. Spring Batch provides a mechanism to offload processing to another process.
a) chunking
b) remote chunking
c) remote
d) none of the mentioned
Answer: b
Clarification: Spring Batch provides a mechanism to offload processing to another process. This feature, called remote chunking, is new in Spring Batch 2.x.

5. Pattern which refers to the arrangement of multiple JMS clients all consuming the same queue messages.
a) aggressive-consumer
b) aggressive
c) all of the mentioned
d) none of the mentioned
Answer: a
Clarification: If one client consumes a message and is busy processing, other idle queues will get the message instead.

6. Spring Batch ships with only handler, which executes steps in multiple threads using a TaskExecutor strategy.
a) TaskExecutorPartition
b) TaskExecutorPartitionHandler
c) TaskExecutorPartitionHandle
d) TaskExecutor
Answer: b
Clarification: This simple improvement might be enough of a justification for this feature! If you’re really hurting, however, you can extend it.

7. To determine the next step is the simplest example of a conditional flow.
a) Exit
b) Status
c) ExitStatus
d) None of the mentioned
Answer: c
Clarification: Spring Batch facilitates this through the use of the stop, next, fail, and end elements.

8. If you want to vary the execution flow based on some logic more complex than a job’s ExitStatuses:-
a) ExitStatus
b) Exit
c) Decision
d) All of the mentioned
Answer: c
Clarification: If you want to vary the execution flow based on some logic more complex than a job’s ExitStatuses, you may give Spring Batch a helping hand by using a decision element and providing it with an implementation of a JobExecutionDecider.

9. Spring Batch work with a system scheduler:-
a) cron
b) autosys
c) all of the mentioned
d) none of the mentioned
Answer: c
Clarification: Spring Batch work with a system scheduler such as cron or autosys, or from a web application.

10. JobLauncher reference you configured previously is obtained and used to then launch an instance of a Job.
a) True
b) False
Answer: a
Clarification: The result is a JobExecution. You can interrogate the JobExecution for information on the state of the Job, including its exit status and runtime status.

11. TaskExecutor that will spawn a thread of execution and manage that thread without blocking.
a) Async
b) Sync
c) Simple
d) SimpleAsyncTaskExecutor
Answer: d
Clarification: SimpleAsyncTaskExecutor will spawn a thread of execution and manage that thread without blocking.

12. The CommandLineJobRunner for success will return system error codes:-
a) 0
b) 1
c) 2
d) none of the mentioned
Answer: a
Clarification: The CommandLineJobRunner will even return system error codes (0 for success, 1 for failure, and 2 for an issue with loading the batch job) so that a shell (such as used by most system schedulers) can react or do something about the failure.

13. More complicated return codes can be returned by creating and declaring a top-level bean that implements the interface:-
a) ExitCode
b) ExitCodeMapper
c) ExitMapper
d) All of the mentioned
Answer: b
Clarification: More complicated return codes can be returned by creating and declaring a top-level bean that implements the interface ExitCodeMapper, in which you can specify a more useful translation of exit status messages to integer-based error codes that the shell will see on process exit.

14. The bean is recognized and becomes part of the application context because of the:-
a) @Component
b) @Attr
c) All of the mentioned
d) None of the mentioned
Answer: a
Clarification: The bean is recognized and becomes part of the application context because of the @Component annotation, which we enabled with the context:component-scan element in our reworked batch.xml (which we’re calling scheduled_batch.xml).

15. To parameterize a job, which is then available to your steps through Spring Batch expression language.
a) Job
b) Steps
c) JobParameters
d) None of the mentioned
Answer: c
Clarification: A job is a prototype of a JobInstance. JobParameters are used to provide a way of identifying a unique run of a job (a JobInstance). These JobParameters allow you to give input to your batch process, just as you would with a method definition in Java.

250+ TOP MCQs on Securing URL Access and Answers

Java Spring Multiple Choice Questions & Answers (MCQs) on “Securing URL Access”.

1. Way to secure web app’s URL.
a) servlet filters
b) refresh-check-delay
c) http servlet filters
d) none of the mentioned
Answer: a
Clarification: Spring Security enables you to secure a web application’s URL access in a declarative way through simple configuration. It handles security by applying servlet filters to HTTP requests.

2. Servlet filter registered in web deployment descriptor, which filters request in spring application context.
a) DelegatingFilter
b) DelegatingFilterProxy
c) DelegatingProxy
d) None of the mentioned
Answer: b
Clarification: As servlet filters must be registered in the web deployment descriptor to take effect, you have to register a DelegatingFilterProxy instance in the web deployment descriptor, which is a servlet filter that delegates request filtering to a filter in Spring’s application context.

3. Servlet APIs to access security information of web application.
a) HttpServletRequest.isUserInRole()
b) HttpServletRequest.getUserPrincipal()
c) None of the mentioned
d) All of the mentioned
Answer: d
Clarification: Servlet API integration: This allows you to access security information in your web application via standard Servlet APIs, such as HttpServletRequest.isUserInRole() and HttpServletRequest.getUserPrincipal().

4. To load root application context at the start up.
a) ContextListener
b) ContextLoader
c) ContextLoaderListener
d) ContextEventListener
Answer: c
Clarification: In the web deployment descriptor (i.e., web.xml), you register ContextLoaderListener to load the root application context at startup.

5. To dispatch requests for web application.
a) DispatcherServlet
b) ViewHandler
c) ViewResolver
d) None of the mentioned
Answer: a
Clarification: Spring MVC DispatcherServlet is used to dispatch requests.

6. The responsibility of DelegatingFilterProxy is simply to delegate HTTP request filtering to a Spring bean that implements the interface:-
a) java.util.logging.Filter
b) java.util.logging.net
c) java.util.logging.FilterHttp
d) none of the mentioned
Answer: a
Clarification: The responsibility of DelegatingFilterProxy is simply to delegate HTTP request filtering to a Spring bean that implements the java.util.logging.Filter interface.

7. By default, DelegatingFilterProxy delegates to a bean whose name is the same as its filter-name property.
a) True
b) False
Answer: a
Clarification: By default, it delegates to a bean whose name is the same as its filter-name property, but you can override the bean name in its targetBeanName init parameter.

8. Filter chain configured by Spring security, when web app security enabled.
a) springSecurityFilterChain
b) delegatingFilterProxy
c) none of the mentioned
d) all of the mentioned
Answer: a
Clarification: As Spring Security will automatically configure a filter chain with the name springSecurityFilterChain when you enable web application security, you can simply use this name for your DelegatingFilterProxy instance.

9. The http auto-config=”false” element automatically configures the basic security services that a typical web application needs.
a) True
b) False
Answer: b
Clarification: The http auto-config=”true” element automatically configures the basic security services that a typical web application needs. You can fine-tune these services with the corresponding sub elements inside it.

10. Element used to restrict access to a particular URL.
a) restrict-url
b) intercept-url
c) intercept-restrict
d) none of the mentioned
Answer: b
Clarification: Inside the http configuration element, you can restrict access to particular URLs with one or more intercept-url elements.

11. Element which configures authentication services.
a) authentication-provider
b) authentication-manager
c) all of the mentioned
d) none of the mentioned
Answer: c
Clarification: You can configure authentication services in the authentication-provider element, which is nested inside the authentication-manager element.

12. Element which defines user details.
a) user-service
b) user-details
c) user-requirements
d) user-servicerequirements
Answer: a
Clarification: Spring Security also supports defining user details in user-service directly for simple security requirements. You can specify a
username, a password, and a set of authorities for each user.

13. Which of the following way to provide authenticity of users is/are supported by Spring Security?
a) Authenticating against a database
b) LDAP repository
c) All of the mentioned
d) None of the mentioned
Answer: c
Clarification: Spring Security supports several ways of authenticating users, including authenticating against a database or an LDAP repository.

14. The basic security services registered and configured by Spring Security.
a) Form-based login service
b) Logout Service
c) HTTP Basic authentication.
d) All of the mentioned
Answer: d
Clarification: Spring Security will automatically register and configure several basic security services, including the above mentioned.

15. HTTP Basic authentication support is configured by:-
a) logout
b) http-basic
c) http-basicauth
d) none of the mentioned
Answer: d
Clarification: The HTTP Basic authentication support can be configured via the http-basic element. When HTTP Basic authentication is required, a browser will typically display a login dialog or a specific login page for users to log in.

250+ TOP MCQs on Application’s Domain Classes and Answers

Java Spring Multiple Choice Questions & Answers (MCQs) on “Application’s Domain Classes”.

1. Classes used to describe an application’s primary elements.
a) Domain Classes
b) Application
c) Context
d) View
Answer: a
Clarification: Domain classes are used to describe an application’s primary elements and characteristics.

2. In web applications, domain classes are generally the first things to be defined.
a) True
b) False
Answer: a
Clarification: Domain classes represent data that is saved for posterity—in a permanent storage system—so it interacts with controllers, as well as representing data displayed in views.

3. In Grails, domain classes are placed under:-
a) /grails-app/WEB-INF/
b) /grails-app/domain/
c) /grails-app/domain/WEB-APP
d) /grails-app/
Answer: b
Clarification: In Grails, domain classes are placed under the /grails-app/domain/ directory.

4. The creation of domain classes by executing a simple command which is:-
a) grails create-domain-class
b) grails create-domain-class domain class name
c) domain class name
d) none of the mentioned
Answer: b
Clarification: The creation of domain classes, like most other things in Grails, can be carried out by executing a simple command in the following form:
grails create-domain-class domain class name

5. The command domain class name in creation of domain classes generates a file named domain class name.groovy.
a) True
b) False
Answer: a
Clarification: It generates a skeleton domain class file named domain class name.groovy inside the /grails-app/domain/ directory.

6. Corresponding unit tests files are also generated for each domain class while creating domain classes.
a) True
b) False
Answer: a
Clarification: In addition, corresponding unit tests files are also generated for each domain class under an application’s test/unit directory.

7. Static field which defines constraints on the domain class.
a) static{}
b) static field{}
c) static constraint{}
d) static constraints{}
Answer: d
Clarification: static constraints = { }, defines constraints on the domain class.

8. Declaration name which indicates that object’s name field can’t be blank.
a) blank:false
b) blank:true
c) all of the mentioned
d) none of the mentioned
Answer: a
Clarification: The declaration name(blank:false) indicates that a Player object’s name field cannot be left blank.

9. A variety of constraints can be used to enforce a domain class’s structure.
a) True
b) False
Answer: a
Clarification: Under certain circumstances, if a constraint is too elaborate, it’s often incorporated within an application’s controller prior to creating an object of a certain domain class.

10. Command to generate the corresponding CRUD controller and views for an application’s domain class.
a) grails create-domain-class domain class name
b) grails create-domain-class
c) grails generate-all domain class name
d) none of the mentioned
Answer: c
Clarification: You can execute the following command to generate the corresponding CRUD controller and views for an application’s domain class:
grails generate-all domain class name.

11. Grails is capable of inspecting an application’s domain classes and generating the corresponding controllers and views.
a) True
b) False
Answer: a
Clarification: Grails is capable of inspecting an application’s domain classes and generating the corresponding controllers and views necessary to create, read, update, and delete instances belonging to an application’s domain classes.

12. Views corresponding to a controller class’s CRUD operations.
a) create.gsp
b) edit.gsp
c) list.gsp
d) all of the mentioned
Answer: d
Clarification: Four views are created corresponding to a controller class’s CRUD operations named create.gsp, edit.gsp, list.gsp, and show.gsp.

13. .gsp extension stands for:-
a) Groovy Server Pages
b) Groovy Service Pages
c) All of the mentioned
d) None of the mentioned
Answer: a
Clarification: .gsp extension stands for “Groovy Server Pages,” which is equivalent to JavaServer Pages except it uses Groovy to declare programmatic statements instead of Java.

14. Views are placed under which directory:-
a) app/views/
b) app/
c) grails-app/views/WEB-INF
d) grails-app/views/domain class
Answer: d
Clarification: These views are placed under an application’s grails-app/views/domain class directory.

15. Command to start the Grails application:-
a) grails run
b) grails start-app
c) grails run-app
d) none of the mentioned
Answer: c
Clarification: You can start the Grails application using grails run-app and work as an end user with the application.