You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tiles.apache.org by "Antonio Petrelli (JIRA)" <ji...@apache.org> on 2007/12/20 12:06:34 UTC
[jira] Assigned: (TILES-228) TilesDecorationFilter doesnt work with
struts2
[ https://issues.apache.org/struts/browse/TILES-228?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Antonio Petrelli reassigned TILES-228:
--------------------------------------
Assignee: Antonio Petrelli
> TilesDecorationFilter doesnt work with struts2
> ----------------------------------------------
>
> Key: TILES-228
> URL: https://issues.apache.org/struts/browse/TILES-228
> Project: Tiles
> Issue Type: Bug
> Components: tiles-core
> Affects Versions: 2.0.5
> Environment: tiles 2.0.5
> struts 2.0.9
> Reporter: Amit Rana
> Assignee: Antonio Petrelli
> Attachments: tiles228.zip
>
>
> mailing list reference: http://mail-archives.apache.org/mod_mbox/tiles-users/200711.mbox/%3c777ab80a0711070040l2c2e90a8k91dc221b8aa78f@mail.gmail.com%3e
> TileDecorationFitler does not decorate struts action output.
> I tried with following sample
> If I access jsp/home.jsp directly it comes with the layout but accessing home.action
> only prints layout and result of action is not seen anywhere. There
> are no errors.
> If struts filter is defined first I only see struts output and no layout. If I change the order i.e. tiles filter before struts then I only see layout and no output from the action.
> web.xml
> <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>MyApp</display-name>
> <listener>
> <listener-class>
> org.apache.struts2.tiles.StrutsTilesListener
> </listener-class>
> </listener>
> <filter>
> <filter-name>struts2</filter-name>
> <filter-class>
> org.apache.struts2.dispatcher.FilterDispatcher
> </filter-class>
> </filter>
> <filter>
> <filter-name>tilesdecoration</filter-name>
> <filter-class>org.apache.tiles.web.util.TilesDecorationFilter</filter-class>
> <init-param>
> <param-name>definition</param-name>
> <param-value>blank</param-value>
> </init-param>
> <init-param>
> <param-name>attribute-name</param-name>
> <param-value>body</param-value>
> </init-param>
> </filter>
> <filter-mapping>
> <filter-name>struts2</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
> <filter-mapping>
> <filter-name>tilesdecoration</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
> <welcome-file-list>
> <welcome-file>home.action</welcome-file>
> </welcome-file-list>
> </web-app>
> struts.xml
> <struts>
> <package name="default" extends="struts-default">
> <result-types>
> <result-type class="org.apache.struts2.views.tiles.TilesResult"
> name="tiles">
> </result-type>
> </result-types>
> <action name="home" class="com.tj.actions.HomeAction">
> <result>jsp/home.jsp</result>
> </action>
> </package>
> </struts>
> tiles.xml
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> <!DOCTYPE tiles-definitions PUBLIC
> "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
> "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
> <tiles-definitions>
> <definition name="blank" template="/jsp/template/blankLayout.jsp">
> <put-attribute name="title" value="my application" />
> </definition>
> </tiles-definitions>
> blankLayout.jsp
> <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
> <html>
> <head>
> <title><tiles:getAsString name="title"/></title>
> </head>
> <body>
> <tiles:insertAttribute name="body" />
> </body>
> </html>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.