Sail E0 Webinar

MCQs

Total Questions : 10
Question 1. In order for this custom tag to function properly in JSP, it's necessary to add it to the corresponding Tag Library Definition (TLD) grails.tld.
  1.    True
  2.    False
  3.    Error
  4.    None
 Discuss Question
Answer: Option A. -> True


TLDs are located in an application's /web-app/WEB-INF/tld/ directory.


Question 2. To create a Grails application, command:-
  1.    grails create-app
  2.    grails create-app grailsappname
  3.    grails create-app default
  4.    none of the mentioned
 Discuss Question
Answer: Option B. -> grails create-app grailsappname


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


Question 3. Annotation for SpringJUnit4ClassRunner:-
  1.    @Run
  2.    @RunWith
  3.    All of the mentioned
  4.    None of the mentioned
 Discuss Question
Answer: Option B. -> @RunWith


For this option, you have to explicitly specify a Spring-specific test runner for running your test”SpringJUnit4ClassRunner. You can specify this in the @RunWith annotation at the class level.


Question 4. The command domain class name in creation of domain classes generates a file named domain class name.groovy.
  1.    True
  2.    False
  3.    Error
  4.    None
 Discuss Question
Answer: Option A. -> True


It generates a skeleton domain class file named domain class name.groovy inside the /grails-app/domain/ directory.


Question 5. There is no default configuration present in an application's resource.groovy file.
  1.    True
  2.    False
  3.    Error
  4.    None
 Discuss Question
Answer: Option A. -> True


Since the explicit configuration of an application's locale takes precedence over a user's browser language preferences, there is no default configuration present in an application's resource.groovy file.


Question 6. Log4J configuration parameters are specified inside:-
  1.    Config.groovy
  2.    Conf.groovy
  3.    Log.groovy
  4.    None of the mentioned
 Discuss Question
Answer: Option A. -> Config.groovy


Log4J configuration parameters are specified inside the Config.groovy file.


Question 7. Maven Directory which holds classpath resources that aren't Java class files.
  1.    src/main/java
  2.    src/main/resources
  3.    src/main/webapp
  4.    src/test/java
 Discuss Question
Answer: Option B. -> src/main/resources


Note, this is for classpath resources and is not appropriate, for example, for web application resources. For that you need src/main/webapp.


Question 8. This defines a listener interface; by implementing this, you can listen to test execution events.
  1.    Test context
  2.    Test context manager
  3.    Test context listener
  4.    Test execution listener
 Discuss Question
Answer: Option D. -> Test execution listener


The TestContext framework provides several test execution listeners for common testing features, but you are free to create your own.


Question 9. To deploy the application to a web container:-
  1.    mvn tomcat:run
  2.    mvn jetty:run
  3.    all of the mentioned
  4.    none of the mentioned
 Discuss Question
Answer: Option C. -> all of the mentioned


In the project directory, in the standard shell, run mvn tomcat:run or mvn jetty:run, and open http://localhost:8080 in your browser.


Question 10. Maps each request to a handler through one or more handler mapping beans.
  1.    DispatcherServlet
  2.    DispatcherPortlet
  3.    All of the mentioned
  4.    None of the mentioned
 Discuss Question
Answer: Option B. -> DispatcherPortlet


Once it has picked an appropriate handler, it will invoke this handler to handle the request.


Latest Videos

Latest Test Papers