Summary

In this chapter, we learned how InternalResourceViewResolver resolves views, and we learned how we can kick RedirectView from a controller method. We learned the important difference between redirect and forward. After that, we learned how we can host static resource files without going through the controllers' configuration. We also learned how to attach a static image file with the product details page. We learned how we can upload files to server. Finally, we saw how we can configure ContentNegotiatingViewResolver to give alternate XML and JSON views for the product domain object in our application. Finally, we learned how we can make use of HandlerExceptionResolver to resolve an exception.

In the next chapter, we will learn how we can ...

Get Spring MVC Beginner’s Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.