Chapter 12. Ajaxing portlets
This chapter covers
- Developing highly responsive portlets using Ajax
- Serving resources with the ResourceServingPortlet interface
- Sending resource requests with resource URLs
- Resource serving support in Spring Portlet MVC
- Pushing data with Comet (or Reverse Ajax)
Developing highly responsive portlets is crucial for an enriched user experience. In this chapter, we’ll see how Ajax can be used to that end. This chapter provides a gentle introduction to Ajax, and it should be sufficient if you’re new to Ajax. The chapter does, however, assume that you have a basic understanding of JavaScript, CSS, and DOM (the Document Object Model). If you’re new to JavaScript, CSS, and DOM, please refer to resources that cover these topics.
We’ll also look at how the ResourceServingPortlet interface provides Ajax support to portlets, and how you can secure Ajax requests in the portal world. The ResourceServingPortlet interface serves the dual purpose of handling Ajax requests and serving binary content, so we’ll also look at how to download a binary file from a portlet that implements the ResourceServingPortlet interface.