Save
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

Spring MVC

QuestionAnswer
What is the @RestController annotation? The @RestController annotation flags a class ready for use by Spring MVC to handle web requests. It is a combination of the @Controller and @ResponseBody annotations.
What is the ContextLoadListener in SpringMVC? It ties the lifecycle of the beanFactory/applicationContext with the servletContext. It automates the creates of the ApplicationContext so that tomcat starts Spring for us. We configure the ContextLoadListener inside our web.xml
What does the InternalResourceViewResolver do and what are some of its properties? 1 of 2 The InternalResourceViewResolver is an implementation of ViewResolver in Spring MVC which resolves logical view names to internal physical resources (prefix + view name + suffix = resolved view name)
What does the InternalResourceViewResolver do and what are some of its properties? 2 of 2 Prefix - Denotes the file path to the directory containing the views. Suffix - Denotes the extension to append to the end of the resource returned by the controller.
What does DefaultAnnotationHandlerMapping do in Spring MVC? This is one of five handler mapping classes available in Spring. It is used by DispatcherServlet to map requests to specific controllers and controller methods annotated with @RequestMapping.
What are some other annotations that can be used inside of a controller? @GetMapping, @PostMapping, @ResponseBody, @RequestBody, @RequestParam, @PathVariable, @CrossOrigin
What does the @RequestMapping annotation do and what attributes can you define for it? 1 of 2 The @RequestMapping annotation tells the HandlerMapping the controller method to go to based on the URI of the HTTP request passed to it by the DispatcherServlet.
What does the @RequestMapping annotation do and what attributes can you define for it? 2 of 2 Attributes you can set for it include: Value - Indicates the URL to which the handler method is mapped. Method - Defines the type of HTTP request it is intended to handle. (Get, Post, etc)
How do you tell Spring that a class is a controller. 1 of 3 Use the @Controller annotation over the class that you want Spring to manage as a controller.
How do you tell Spring that a class is a controller. 2 of 3 @Controller This registers the class as a controller and must be used in conjunction with <context: component-scan /> tag in the XML to automatically discover and register the controllers as Spring beans.
How do you tell Spring that a class is a controller. 3 of 3 Inside of a controller, using the @RequestMapping above a method identifies the method as a request handler type for a given path.
How do you turn ON annotation support in Spring MVC? 1 of 2 Use <mvc:annotation-driven /> in beans.xml to switch ON annotation support. (form validation, message conversion, and field formatting)
How do you turn ON annotation support in Spring MVC? 2 of 2 Add the <context:component-scan> tag to tell Spring where to scan. This will allow you to make use of annotations such as @Controller, @RequestMapping, etc.
What do you need to do in order to configure the dispatcher servlet manually for Spring MVC. 1 of 2 Inside of the web.xml file that is inside of the WEB-INF folder, you need to define the servlet. It should have a name, class and load-on-startup set to a non-zero value.
What do you need to do in order to configure the dispatcher servlet manually for Spring MVC. 2 of 2 You must then define the servlet mapping using the name of the servlet you defined and the url pattern of requests that the DispacherServlet should handle. The servlet-class tag will point to spring's implementation
Describe how Spring MVC implements the Model-View-Controller design pattern. 1 of 4 1. An HTTP request is recieved by the DispacherServlet. 2. The DispactcherServlet consults the HandlerMapping to know which controller to invoke.
Describe how Spring MVC implements the Model-View-Controller design pattern. 2 of 4 3. The DispatcherServlet calls the Controller, which takes the request and calls the appropriate service methods based on the HTTP Request method.
Describe how Spring MVC implements the Model-View-Controller design pattern. 3 of 4 4. The Service method will set model data based on defined business logic and return the name of the view to the DispacherServlet
Describe how Spring MVC implements the Model-View-Controller design pattern. 4 of 4 5. The DispacherServlet will send the view from the service method and send it to the ViewResolver to pickup the defined view for the request 6. The DispacherServlet passes the model data to the view 7. The view is rendered to the browser.
Name the design pattern used in the Spring MVC architecture? Spring MVC uses a front controller design pattern. The central control element in Spring MVC is the Dispatcher Servlet.
What is Spring MVC The Spring Web MVC framework provides Model-View-Controller architecture and ready components that can be used to develop flexible and loosely coupled web applications.
Created by: wahoo99
Popular Computers sets

 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards