• Learn Struts,  Struts 2,  Tiles Plug-in

    Struts2 Tiles with example

    Here is an example that shows how to create tiles in Struts2 using the struts2 tiles plugin. First step will be to change deployment descriptor first setup the tiles definition file: <context-param> <param-name>     org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG  </param-name> <param-value>/WEB-INF/tiles.xml</param-value> </context-param> Now Listener Configuration will look like below: <listener> <listener-class>    org.apache.struts2.tiles.StrutsTilesListener </listener-class> </listener>  Now web.xml file should look like as below: <?xml version="1.0" encoding="UTF-8"?>    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> <display-name>Struts2 Tiles Example</display-name>   <context-param> <param-name>     org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG  </param-name> <param-value>/WEB-INF/tiles.xml</param-value> </context-param> <listener> <listener-class>  org.apache.struts2.tiles.StrutsTilesListener  </listener-class> </listener>   <filter> <filter-name>struts2</filter-name> <filter-class> org.apache.struts2.dispatcher.ng.filter. StrutsPrepareAndExecuteFilter </filter-class> </filter>   <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>   <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app> Here is the Tiles.xml configuration…

    Comments Off on Struts2 Tiles with example
  • Action,  ActionForm,  Controler,  Learn Struts,  Model,  Struts 1.x,  Struts 2,  Struts Components,  Tiles Plug-in,  Validator Plug-in,  View

    What are the different components for struts application?

    Struts 1.x Framework have following components in its application: struts-config.xml ActionForm Bean View(JSP or ftl) Action Class Model (DAO,DTO classes) And may have following extensible component for Application: Validator.xml Validator class tiles-defs.xml Your comments give us opportunity to improve my blogs, so please comment.

    Comments Off on What are the different components for struts application?