
Spring Web
Quiz
•
Computers
•
Professional Development
•
Practice Problem
•
Hard
Ismail LAANAIT
FREE Resource
Enhance your content in a minute
9 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does MVC stand for? (Choose one.)
management versus control
model-view-controller
model verbosity clearance
model view conventions
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which Spring library is needed in your classpath to write a full-blown Spring web application? (Choose one.)
spring-core.jar is enough
spring-core.jar and spring-context.jar are enough
spring-web.jar is enough
spring-webmvc.jar is a must because that is where the DispatcherServlet class is
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the @Controller annotation? (Choose one.)
to indicate that the bean is to be encapsulated in a special Web Proxy
to indicate that the class is to be used as a template to create a special type of bean required in a Spring web application to provide handler methods for requests
to declare a class as the configuration class for a Spring web application
4.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which scopes are web specific? (Choose all that apply.)
SCOPE_SESSION
SCOPE_THREAD
SCOPE_SINGLETON
SCOPE_APPLICATION
SCOPE_REQUEST
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given the following controller class containing a single handler method, which of the following URLs will be handled by that method? (Choose one.)
@Controller
@RequestMapping("/persons")
public class PersonController {
@RequestMapping(value = "/showPerson")
public String show(@RequestParam("personId") Long id, Model model) {
...
}
}
http://localhost:8080/mvc-basic/persons/ showPerson?personId=aa
http://localhost:8080/mvc-basic/persons/ showPerson?personId=105
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which class in the following list is the default view resolver in Spring: (Choose one.)
JspResourceViewResolver
ResourceViewResolver
InternalResourceViewResolver
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is wrong with the following controller class declaration? (Choose one.)
@ControllerAdvice
public class PersonsController {
@ExceptionHandler(NotFoundException.class)
@ResponseStatus(HttpStatus.NOT_FOUND)
public ModelAndView handle(NotFoundException ex) {
ModelAndView mav = new ModelAndView();
mav.addObject("problem", ex.getMessage());
mav.setViewName("error");
return mav;
}
}
Nothing.
This is not a controller class declaration, but a special type of bean used for handling exceptions thrown by handler methods.
The handle() method is not allowed to return an instance of ModelAndView
The handler method should be annotated with @RequestMapping or one of its specializations.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Informática I - S1
Quiz
•
Professional Development
12 questions
Quizz Internet
Quiz
•
KG - Professional Dev...
10 questions
PreTrainingClassesObjectsMethods
Quiz
•
Professional Development
13 questions
Administration Windows 2 - Server
Quiz
•
Professional Development
10 questions
e-commerce security TRUE/FALSE Quiz
Quiz
•
University - Professi...
10 questions
TEMA 7 INSTALACION DE SISTEMAS OPERATIVOS
Quiz
•
Professional Development
10 questions
Overview of Telecommunication Networks
Quiz
•
1st Grade - Professio...
10 questions
Aprendeu ou disfarçou?
Quiz
•
12th Grade - Professi...
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Computers
10 questions
How to Email your Teacher
Quiz
•
Professional Development
6 questions
3RD GRADE DECLARATION OF INDEPENDENCE EXIT TICKET
Quiz
•
Professional Development
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
22 questions
Multiplying Exponents with the Same Base
Quiz
•
9th Grade - Professio...
40 questions
Flags of the World
Quiz
•
KG - Professional Dev...
