This set of Java Spring Test focuses on “Internationalization (I18n) Message Properties and Storage Properties”.
1. Grails applications are equipped to support internationalization.
a) True
b) False
View Answer
Explanation: By default, all Grails applications are equipped to support internationalization.
2. Where can you find series of *.properties files.
a) /grails-app/
b) /grails-app/i18n/
c) /grails-app/i18n/WEB-INF
d) /grails-app/i18n/WEB-APP
View Answer
Explanation: Inside an application /grails-app/i18n/ folder, you can find series of *.properties files used to define messages in 12 languages.
3. *.properties files allow Grails applications to display messages.
a) True
b) False
View Answer
Explanation: The values declared in these *.properties files allow Grails applications to display messages based on a user’s languages preferences or an application default language.
4. Which locale (i.e., from an internationalization properties file) to use for a user is based on?
a) /grails-app/conf/spring/resource.groovy file
b) user’s browser language preferences
c) all of the mentioned
d) none of the mentioned
View Answer
Explanation: Grails determines which locale (i.e., from an internationalization properties file) to use for a user based
on two criteria:
• The explicit configuration inside an application /grails-app/conf/spring/
resource.groovy file
• A user’s browser language preferences
5. There is no default configuration present in an application resource.groovy file.
a) True
b) False
View Answer
Explanation: Since the explicit configuration of an application locale takes precedence over a user’s browser language preferences, there is no default configuration present in an application resource.groovy file.
6. If you want to coerce users into using a specific language locale.
a) /grails-app/conf/spring/resource.groovy file
b) /grails-app/resource.groovy file
c) /grails-app/spring/resource.groovy file
d) none of the mentioned
View Answer
Explanation: You should define an explicit configuration inside an application /grails-app/conf/spring/resource.groovy file, only if you want to coerce users into using a specific language locale.
7. JSP Tag which declares statements using the Groovy.
a) g:message
b) g:string
c) g:msg
d) none of the mentioned
View Answer
Explanation: JSP page first imports the Groovy tag library and later declares statements using the Groovy g:message tag.
8. Tag can also be used in GSP pages views.
a) g:message
b) g:string
c) g:msg
d) none of the mentioned
View Answer
Explanation: The g:message tag can also be used in GSP pages views, but note that it’s not necessary to import the tag library explicitly, since it’s available by default on all Grails GSP pages.
9. Grails uses RDBMS as a permanent storage system.
a) True
b) False
View Answer
Explanation: Grails is designed to use a RDBMS as a permanent storage system.
10. Grails comes preconfigured to use:-
a) MySql
b) PostgreSQL
c) Access
d) HSQLDB
View Answer
Explanation: HSQLDB is a database that is automatically started by Grails upon deploying an application (i.e., executing grails run-app).
11. HSQLDB is a non-volatile database.
a) True
b) False
View Answer
Explanation: Every time an application is restarted in development and testing environments, HSQLDB loses all its data since it’s configured to operate in memory.
12. Configure Grails to use another RDBMS by modifying:-
a) Data.groovy
b) DataSource.groovy
c) All of the mentioned
d) None of the mentioned
View Answer
Explanation: You can configure Grails to use another RDBMS by modifying an application DataSource.groovy file, located under the grails-app/conf directory.
13. Grails relies on the standard Java JDBC notation to specify RDBMS.
a) True
b) False
View Answer
Explanation: Grails relies on the standard Java JDBC notation to specify RDBMS connection parameters, as well as on the corresponding JDBC drivers provided by each RDBMS vendor, to create, read, update, and delete information.
14. DataSource properties, Class name for the JDBC driver.
a) driverClassName
b) dataSource properties
c) all of the mentioned
d) none of the mentioned
View Answer
Explanation: dataSource properties for configuring a RDBMS.:-
driverClassName Class name for the JDBC driver
15. Indicates whether to enable SQL logging.
a) driverClassName
b) dataSource properties
c) logSql
d) none of the mentioned
View Answer
Explanation: dataSource properties for configuring a RDBMS.:-
logSql Indicates whether to enable SQL logging
Sanfoundry Global Education & Learning Series – Java Spring.
To practice all areas of Java Spring for various tests, here is complete set of 1000+ Multiple Choice Questions and Answers.
- Get Free Certificate of Merit in Spring
- Participate in Spring Certification Contest
- Become a Top Ranker in Spring
- Take Spring Tests
- Chapterwise Practice Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
- Chapterwise Mock Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
- Buy Spring Books
- Apply for Spring Internship
- Buy Information Technology Books
- Practice Programming MCQs
- Apply for Programming Internship