616 CHAPTER 15 USING STRUTS, XDOCLET, AND
616 CHAPTER 15 USING STRUTS, XDOCLET, AND OTHER TOOLS Tiles Controllers Tiles controllers can be very helpful in improving the architecture of your Tiles-enabled application. They haven t received much press in current publications, but can be a very useful feature. At its core, a Tiles controller is designed to prepare data for presentation on a tile. You might think of it as a mini-action. However, these controllers aren t designed to determine application flow; that s the responsibility of the ActionServlet. If you re developing a portal site or you have tiles that require their own custom data, you should definitely considering using one. Of course, it will be easier to understand if we give you an example. Therefore, we ve created a feature for struts-resumethat counts the current number of active sessions and displays it as Current Users. We did this by first creating a UserCounterListenerthat implements ServletContextListener and HttpSessionListener. This listener increments an applicationscoped variable when new sessions are created and decrements from the same variable when sessions are destroyed. This source file is located in struts-resumeat src/web/org/appfuse/ webapp/listener. We ve used XDoclet s @web:listener tag to create a
Note: If you are looking for good and high quality web space to host and run your jsp application check Lunarwebhost jsp web hosting services