Q: To prevent the characters in your script from conflicting with the reserved XML characters
Solution: You no longer have to specify the reference to the external script source file in the script-source attribute.
Q: Dynamic-language-backed bean with some configurations
Solution: 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.
Q: To quickly add a Spring Validator implementation to a Spring MVC Controller
Solution: 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.
Q: Script’s location is specified by attribute
Solution: Specifying the script’s location in the script-source attribute.
Q: Way to secure web app’s URL.
Solution: 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.
Q: Servlet filter registered in web deployment descriptor, which filters request in spring application context.
Solution: 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.
Q: Servlet APIs to access security information of web application.
Solution: 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().
Q: To load root application context at the start up.
Solution: In the web deployment descriptor (i.e., web.xml), you register ContextLoaderListener to load the root application context at startup.
Q: To dispatch requests for web application.
Solution: Spring MVC DispatcherServlet is used to dispatch requests.
Q: The responsibility of DelegatingFilterProxy is simply to delegate HTTP request filtering to a Spring bean that implements the interface:-
Solution: The responsibility of DelegatingFilterProxy is simply to delegate HTTP request filtering to a Spring bean that implements the java.util.logging.Filter interface.
You Have Score    | /10 |