You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mikolaj Rydzewski <mi...@ceti.pl> on 2006/10/17 23:26:12 UTC

Struts 1.3 + Tiles + Chain config

Hi,

I wanted to migrate my struts/tiles application from struts 1.2 to 
struts 1.3 to make use of its new feature: chain of responsibility.

The old way of using tiles with struts was to override default request 
processor with special one designed for tiles.
In the new way I should somehow "inject" new command into chain of 
commands to make tiles work.

Unfortunately I cannot find anywhere in the docs how could it be done. 
Javadoc 
http://struts.apache.org/1.x/struts-tiles/apidocs/org/apache/struts/tiles/commands/TilesPreProcessor.html 
does not explain how to inject this command (should I copy/paste 
original chain config into the new one?).

-- 
Mikolaj Rydzewski      <mi...@ceti.pl>        http://ceti.pl/~miki/
                    PGP KeyID: 8b12ab02
There are three kinds of people: men, women and unix.


Re: Struts 1.3 + Tiles + Chain config

Posted by Niall Pemberton <ni...@gmail.com>.
On 10/17/06, Mikolaj Rydzewski <mi...@ceti.pl> wrote:
> Wendy Smoak wrote:
> > See section 4.3 on Tiles in the upgrade notes:
> >   http://wiki.apache.org/struts/StrutsUpgradeNotes12to13
> >
> > There is a chain-config file in the Tiles jar.  You can use it
> > directly, or extract it and modify it if you need to.
> Thanks for information. There is a bug in 1.3.5, however.
> https://issues.apache.org/struts/browse/STR-2935?decorator=printable
>
> So if one wants to use tiles with struts 1.3.5 it is recommended to
> download patched chain-config.xml from
> http://svn.apache.org/viewvc/struts/struts1/trunk/tiles/src/main/resources/org/apache/struts/tiles/chain-config.xml?r1=436857&view=log
> and use it instead of bundled one.

Thanks for pointing this out - I've added a note to the wiki upgrade
page indicating this. If you find any other issues then updating that
page on the wiki would be a great help to others.

Niall

> --
> Mikolaj Rydzewski

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts 1.3 + Tiles + Chain config

Posted by Mikolaj Rydzewski <mi...@ceti.pl>.
Wendy Smoak wrote:
> See section 4.3 on Tiles in the upgrade notes:
>   http://wiki.apache.org/struts/StrutsUpgradeNotes12to13
>
> There is a chain-config file in the Tiles jar.  You can use it
> directly, or extract it and modify it if you need to.
Thanks for information. There is a bug in 1.3.5, however. 
https://issues.apache.org/struts/browse/STR-2935?decorator=printable

So if one wants to use tiles with struts 1.3.5 it is recommended to 
download patched chain-config.xml from 
http://svn.apache.org/viewvc/struts/struts1/trunk/tiles/src/main/resources/org/apache/struts/tiles/chain-config.xml?r1=436857&view=log
and use it instead of bundled one.

-- 
Mikolaj Rydzewski      <mi...@ceti.pl>        http://ceti.pl/~miki/
                    PGP KeyID: 8b12ab02
There are three kinds of people: men, women and unix.


Re: Struts 1.3 + Tiles + Chain config

Posted by Wendy Smoak <ws...@gmail.com>.
On 10/17/06, Mikolaj Rydzewski <mi...@ceti.pl> wrote:

> I wanted to migrate my struts/tiles application from struts 1.2 to
> struts 1.3 to make use of its new feature: chain of responsibility.
>
> The old way of using tiles with struts was to override default request
> processor with special one designed for tiles.
> In the new way I should somehow "inject" new command into chain of
> commands to make tiles work.

See section 4.3 on Tiles in the upgrade notes:
   http://wiki.apache.org/struts/StrutsUpgradeNotes12to13

There is a chain-config file in the Tiles jar.  You can use it
directly, or extract it and modify it if you need to.

-- 
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts 1.3 + Tiles + Chain config

Posted by Michael Jouravlev <jm...@gmail.com>.
Check out struts-cookbook-1.3.5.war example app, it contains custom
chain-config.xml with entries relevant to Tiles. Below are portions
from this file:

=== cut here ===
    <chain name="process-view">
      ...
      <!--
      If you want to use Tiles, uncomment this command, and the one in the
      'servlet-exception' chain below, and make sure you have the
      struts-tiles JAR included in your web application.

      <command
          className="org.apache.struts.tiles.commands.TilesPreProcessor"/>

      -->
      ...
    </chain>
   ...
    <chain     name="servlet-exception">
      ...
      <!--
      If you want to use Tiles, uncomment this command, and the one in the
      'servlet-standard' chain below. This one is needed to allow Tiles to
      be used from global exception handlers.
      <command
          className="org.apache.struts.chain.servlet.TilesPreProcessor"/>
      -->
      ...
    </chain>

=== cut here ===

On 10/17/06, Mikolaj Rydzewski <mi...@ceti.pl> wrote:
> Hi,
>
> I wanted to migrate my struts/tiles application from struts 1.2 to
> struts 1.3 to make use of its new feature: chain of responsibility.
>
> The old way of using tiles with struts was to override default request
> processor with special one designed for tiles.
> In the new way I should somehow "inject" new command into chain of
> commands to make tiles work.
>
> Unfortunately I cannot find anywhere in the docs how could it be done.
> Javadoc
> http://struts.apache.org/1.x/struts-tiles/apidocs/org/apache/struts/tiles/commands/TilesPreProcessor.html
> does not explain how to inject this command (should I copy/paste
> original chain config into the new one?).
>
> --
> Mikolaj Rydzewski      <mi...@ceti.pl>        http://ceti.pl/~miki/
>                     PGP KeyID: 8b12ab02
> There are three kinds of people: men, women and unix.
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org