Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

How to use the tiles plugin in struts2?


Asked by Davis Spence on Dec 12, 2021 Struts2



The Tiles plugin allows actions to return Tiles pages. The following steps must be taken in order to enable tiles support within your Struts2 application: Include the struts-tiles-plugin as a dependency in your web application. If you are using maven2, the dependency configuration will be similar to:
In this manner,
The Tiles installation process depends on the Struts version you use. If you start a new project, use the latest Struts version. Tiles can also be used without Struts. Add following entry of plug-in tag to your struts-config.xml in order to configure Tiles.
Likewise, Tiles is a templating framework designed to easily allow the creation of web application pages with a consistent look and feel. It can be used for both page decorating and componentization. The Tiles plugin allows actions to return Tiles pages. The following steps must be taken in order to enable tiles support within your Struts2 application:
Furthermore,
Struts 2 plugins contain classes and configuration that extend, replace, or add to existing Struts framework functionality. A plugin can be installed by adding its JAR file to the application’s class path, in addition to the JAR files to fulfill whatever dependencies the plugin itself may have.
Keeping this in consideration,
We can customize the layout of the struts 2 application by integrating with tiles framework. A web page can contain many parts (known as tile) such as header, left pane, right pane, body part, footer etc. In tiles framework, we manage all the tile by our Layout Manager page. There are following advantages of tiles framework: