Struts 2
  1. Struts 2
  2. WW-3931

Create tiles-3 plugin supporting a compatible result type

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.3, 2.3.7
    • Fix Version/s: 2.3.12
    • Component/s: Plugin - Tiles
    • Labels:

      Description

      The current struts2 plug-in uses an older version of tiles (version 2.0.6) this version is lacking some very useful features (one being using OGNL expressions within tiles definitions). Although many new features can be added by manually upgrading the tiles version to 2.2.2 however breaking changes to the API mean that the struts2 plugin no longer functions with higher versions of tiles.

      1. TilesResult.java
        2 kB
        Ken McWilliams

        Activity

        Hide
        Ken McWilliams added a comment -

        Implementation of basic result type.

        Show
        Ken McWilliams added a comment - Implementation of basic result type.
        Hide
        Lukasz Lenart added a comment -

        Done, new plugin defined also new page added to the docs

        https://cwiki.apache.org/confluence/display/WW/Tiles+3+Plugin

        Show
        Lukasz Lenart added a comment - Done, new plugin defined also new page added to the docs https://cwiki.apache.org/confluence/display/WW/Tiles+3+Plugin
        Hide
        Lukasz Lenart added a comment -
        Show
        Lukasz Lenart added a comment - Version notes updated as well https://cwiki.apache.org/confluence/display/WW/Version+Notes+2.3.9
        Hide
        Hudson added a comment -

        Integrated in Struts2-JDK6 #634 (See https://builds.apache.org/job/Struts2-JDK6/634/)
        WW-3931 adds new plugin to support Tiles 3 result type (Revision 1439344)

        Result = SUCCESS
        lukaszlenart :
        Files :

        • /struts/struts2/trunk/plugins/pom.xml
        • /struts/struts2/trunk/plugins/tiles3
        • /struts/struts2/trunk/plugins/tiles3/pom.xml
        • /struts/struts2/trunk/plugins/tiles3/src
        • /struts/struts2/trunk/plugins/tiles3/src/main
        • /struts/struts2/trunk/plugins/tiles3/src/main/java
        • /struts/struts2/trunk/plugins/tiles3/src/main/java/org
        • /struts/struts2/trunk/plugins/tiles3/src/main/java/org/apache
        • /struts/struts2/trunk/plugins/tiles3/src/main/java/org/apache/struts2
        • /struts/struts2/trunk/plugins/tiles3/src/main/java/org/apache/struts2/views
        • /struts/struts2/trunk/plugins/tiles3/src/main/java/org/apache/struts2/views/tiles
        • /struts/struts2/trunk/plugins/tiles3/src/main/java/org/apache/struts2/views/tiles/TilesResult.java
        • /struts/struts2/trunk/plugins/tiles3/src/main/resources
        • /struts/struts2/trunk/plugins/tiles3/src/main/resources/LICENSE.txt
        • /struts/struts2/trunk/plugins/tiles3/src/main/resources/NOTICE.txt
        • /struts/struts2/trunk/plugins/tiles3/src/main/resources/struts-plugin.xml
        Show
        Hudson added a comment - Integrated in Struts2-JDK6 #634 (See https://builds.apache.org/job/Struts2-JDK6/634/ ) WW-3931 adds new plugin to support Tiles 3 result type (Revision 1439344) Result = SUCCESS lukaszlenart : Files : /struts/struts2/trunk/plugins/pom.xml /struts/struts2/trunk/plugins/tiles3 /struts/struts2/trunk/plugins/tiles3/pom.xml /struts/struts2/trunk/plugins/tiles3/src /struts/struts2/trunk/plugins/tiles3/src/main /struts/struts2/trunk/plugins/tiles3/src/main/java /struts/struts2/trunk/plugins/tiles3/src/main/java/org /struts/struts2/trunk/plugins/tiles3/src/main/java/org/apache /struts/struts2/trunk/plugins/tiles3/src/main/java/org/apache/struts2 /struts/struts2/trunk/plugins/tiles3/src/main/java/org/apache/struts2/views /struts/struts2/trunk/plugins/tiles3/src/main/java/org/apache/struts2/views/tiles /struts/struts2/trunk/plugins/tiles3/src/main/java/org/apache/struts2/views/tiles/TilesResult.java /struts/struts2/trunk/plugins/tiles3/src/main/resources /struts/struts2/trunk/plugins/tiles3/src/main/resources/LICENSE.txt /struts/struts2/trunk/plugins/tiles3/src/main/resources/NOTICE.txt /struts/struts2/trunk/plugins/tiles3/src/main/resources/struts-plugin.xml
        Hide
        Ken McWilliams added a comment -

        Great, just a tweak to the docs:

        "Include the struts-tiles3-plugin as a dependency in your web application,
        do not include struts2-tiles3-plugin." should read "Include the
        struts-tiles3-plugin as a dependency in your web application".

        I mentioned trying to integration tiles3 with struts2-conventions-plugin...
        I think some of this could help others. That is, you don't need to specify
        a result type a default tiles definition is used with wild cards just as
        the case is with the default view look up in conventions.

        Show
        Ken McWilliams added a comment - Great, just a tweak to the docs: "Include the struts-tiles3-plugin as a dependency in your web application, do not include struts2-tiles3-plugin." should read "Include the struts-tiles3-plugin as a dependency in your web application". I mentioned trying to integration tiles3 with struts2-conventions-plugin... I think some of this could help others. That is, you don't need to specify a result type a default tiles definition is used with wild cards just as the case is with the default view look up in conventions.
        Hide
        Lukasz Lenart added a comment - - edited

        Thanks Ken McWilliams, you did the first step and we will be able to improve the plugin in the next releases

        Docs updated!

        Show
        Lukasz Lenart added a comment - - edited Thanks Ken McWilliams , you did the first step and we will be able to improve the plugin in the next releases Docs updated!
        Hide
        Ken McWilliams added a comment -

        No thank you Lukasz, packaging this up is a great help! It great to see
        that recent improvements with tiles can now easily be made to work with
        struts2. Sure it will help a few people.

        Show
        Ken McWilliams added a comment - No thank you Lukasz, packaging this up is a great help! It great to see that recent improvements with tiles can now easily be made to work with struts2. Sure it will help a few people.
        Hide
        Ken McWilliams added a comment -

        Previously was interested in getting conventions and tiles to co-operate,
        because tiles definitions are up to the developer the best that can be done
        is create a location string which is passed to tiles and require that the
        tiles users implement appropriate tiles.

        Anyways here is something I'm using in my own project I find it helpful and
        if you can think of a way to include any of this code let me know:
        http://stackoverflow.com/questions/16116142/how-to-integrate-struts-conventions-with-tiles-such-that-the-benefit-of-conventi/16116396#16116396

        You can see in this solution I'm just using ".jsp" really in a general
        solution just the ( namespace + "#" + actionName ) should be passed a tiles
        user can account for the specific extension, I think it was just lazyness
        for the way it is in that example.

        And Lukasz thank you very much for the help!

        Show
        Ken McWilliams added a comment - Previously was interested in getting conventions and tiles to co-operate, because tiles definitions are up to the developer the best that can be done is create a location string which is passed to tiles and require that the tiles users implement appropriate tiles. Anyways here is something I'm using in my own project I find it helpful and if you can think of a way to include any of this code let me know: http://stackoverflow.com/questions/16116142/how-to-integrate-struts-conventions-with-tiles-such-that-the-benefit-of-conventi/16116396#16116396 You can see in this solution I'm just using ".jsp" really in a general solution just the ( namespace + "#" + actionName ) should be passed a tiles user can account for the specific extension, I think it was just lazyness for the way it is in that example. And Lukasz thank you very much for the help!
        Hide
        Lukasz Lenart added a comment -

        Ken McWilliams as I understand you have extended Tiles(3)Result and added support for Convention, it would be really nice to include such a feature into Struts2. Could you prepare a path against the trunk?

        Then I will review it and maybe propose some extensions!

        Thanks a lot for contribution!

        Show
        Lukasz Lenart added a comment - Ken McWilliams as I understand you have extended Tiles(3)Result and added support for Convention, it would be really nice to include such a feature into Struts2. Could you prepare a path against the trunk? Then I will review it and maybe propose some extensions! Thanks a lot for contribution!

          People

          • Assignee:
            Lukasz Lenart
            Reporter:
            Ken McWilliams
          • Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development