You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rick Reumann <ri...@gmail.com> on 2007/10/05 15:33:31 UTC

Defining a controller for Tiles?.. and shouldn't we include a Tiles example app in the release?

I'm working on using IDEA for a Struts1.3 project and IDEA was
complaining about my Tiles definition that I had declared:

<plug-in className="org.apache.struts.tiles.TilesPlugin">
 		<set-property property="definitions-config"
value="/WEB-INF/tiles-definitions.xml" />
      	<set-property property="moduleAware" value="true" />
    </plug-in>

It was complaining about not defining a controller (even though the
code actually worked without it.)

I decided to look at some examples that come with Struts, and to my
surprise, I didn't see a single application example using Tiles??? I
know this is more of a dev list questoin, but in case a dev is reading
this, shouldn't we include a simple Tiles example as an example app
released with Struts 1.x? Before people say the prefer Sitemesh - I
would prefer Sitemesh also IF I could get an answer about something I
found fundamentally wrong with it back when I used to use it. (I'm
going to try to follow up - bottom line is Sitemesh would buffer your
entire page contents into a Buffer(might have been StringBuffer),
which had some huge memory impact on some large pages we had. Even a
bunch of small pages this would be a huge memory footprint having to
buffer all that.)

Anyway, just playing around I figured if I declared...

<controller processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>

IDEA didn't complain, but I didn't see anywhere in the docs that
mentioned you should declare a Tiles controller? Maybe I missed it?

I found a Tiles example here that shows a use of declaring a
controller for Tiles
http://www.laliluna.de/first-steps-struts-tiles-tutorial.html

But in the Struts Tiles quick start I didn't see it even mentioned nor
in the user guide
http://struts.apache.org/1.x/struts-tiles/userGuide.html

Also what's a good buffer size to use (the example above uses 4096)?


-- 
Rick

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


Re: Defining a controller for Tiles?.. and shouldn't we include a Tiles example app in the release?

Posted by Rick Reumann <ri...@gmail.com>.
On 10/5/07, Antonio Petrelli <an...@gmail.com> wrote:
>
> Volunteering to do something that is already outdated, and that will be
> removed in favour of Tiles 2?
> I think it's a waste of time IMHO, also because in Struts 1.4 there will be
> support for Tiles 2.

Cool. I didn't even know there was going to be a Tiles2:)

-- 
Rick

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


Re: Defining a controller for Tiles?.. and shouldn't we include a Tiles example app in the release?

Posted by Antonio Petrelli <an...@gmail.com>.
2007/10/7, stanlick@gmail.com <st...@gmail.com>:
> I'm writing a chapter to compare and contrast T1 and T2.  As T2 is the
> counterpart to S2, I would expect preparers to participate in object
> injection.  If they don't, I could see them largely unused

T2 is not counterpart of anything, since it is a standalone project.
The injection should be done by the T2 plugin of S2, but currently I
suppose it is not supported.

Antonio

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


Re: Defining a controller for Tiles?.. and shouldn't we include a Tiles example app in the release?

Posted by st...@gmail.com.
I'm writing a chapter to compare and contrast T1 and T2.  As T2 is the
counterpart to S2, I would expect preparers to participate in object
injection.  If they don't, I could see them largely unused

Scott.

On 10/7/07, Antonio Petrelli <an...@gmail.com> wrote:
>
> 2007/10/5, stanlick@gmail.com <st...@gmail.com>:
> > Has the problem been solved concerning injecting the T2 controllers
> > (preparers) with beans from the S2 beanFactory?  I have written a
> > DelegatingTilesController that gets the job done, but I consider it a
> > workaround.
>
> Scott, you are writing about Struts-Tiles controllers, now known as
> preparers, while in this thread we are talking about Struts 1
> controllers. Please start a new thread.
>
> Antonio
>
> P.S. Anyway, AFAIK, there is no support for injected preparers in
> Struts 2/Tiles 2 integration.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Scott
stanlick@gmail.com

Re: Defining a controller for Tiles?.. and shouldn't we include a Tiles example app in the release?

Posted by Antonio Petrelli <an...@gmail.com>.
2007/10/5, stanlick@gmail.com <st...@gmail.com>:
> Has the problem been solved concerning injecting the T2 controllers
> (preparers) with beans from the S2 beanFactory?  I have written a
> DelegatingTilesController that gets the job done, but I consider it a
> workaround.

Scott, you are writing about Struts-Tiles controllers, now known as
preparers, while in this thread we are talking about Struts 1
controllers. Please start a new thread.

Antonio

P.S. Anyway, AFAIK, there is no support for injected preparers in
Struts 2/Tiles 2 integration.

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


Re: Defining a controller for Tiles?.. and shouldn't we include a Tiles example app in the release?

Posted by st...@gmail.com.
Has the problem been solved concerning injecting the T2 controllers
(preparers) with beans from the S2 beanFactory?  I have written a
DelegatingTilesController that gets the job done, but I consider it a
workaround.

On 10/5/07, Ted Husted <hu...@apache.org> wrote:
>
> Good point. What has actually happened is that there was never a Tiles
> example for WebWork, and no one has volunteered to add an extensive
> example for Struts 2 yet.
>
> Though, we do have a small Tiles example in the ShowCase
>
> * http://www.planetstruts.org/struts2-showcase/tiles/index.action
>
> If someone did want to expand the Tiles documentation, the place to
> start is here:
>
> * http://struts.apache.org/2.x/docs/tiles-plugin.html
>
> -Ted.
>
> On 10/5/07, Antonio Petrelli <an...@gmail.com> wrote:
> > 2007/10/5, Ted Husted <hu...@apache.org>:
> > >
> > > I believe the Tiles example we had migrated to tiles.apache.org with
> > > the rest of the Tiles code, and no one has come up with another.
> >
> > This is not true, the original Tiles code resides under Struts.
> >
> > Antonio
> >
> > As always, it's just a matter of someone
> > > volunteering to do the work.
> >
> > Volunteering to do something that is already outdated, and that will be
> > removed in favour of Tiles 2?
> > I think it's a waste of time IMHO, also because in Struts 1.4 there will
> be
> > support for Tiles 2.
> >
> > Antonio
> >
>
>
> --
> HTH, Ted <http://www.husted.com/ted/blog/>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Scott
stanlick@gmail.com

Re: Defining a controller for Tiles?.. and shouldn't we include a Tiles example app in the release?

Posted by Ted Husted <hu...@apache.org>.
Good point. What has actually happened is that there was never a Tiles
example for WebWork, and no one has volunteered to add an extensive
example for Struts 2 yet.

Though, we do have a small Tiles example in the ShowCase

 * http://www.planetstruts.org/struts2-showcase/tiles/index.action

If someone did want to expand the Tiles documentation, the place to
start is here:

 * http://struts.apache.org/2.x/docs/tiles-plugin.html

-Ted.

On 10/5/07, Antonio Petrelli <an...@gmail.com> wrote:
> 2007/10/5, Ted Husted <hu...@apache.org>:
> >
> > I believe the Tiles example we had migrated to tiles.apache.org with
> > the rest of the Tiles code, and no one has come up with another.
>
> This is not true, the original Tiles code resides under Struts.
>
> Antonio
>
> As always, it's just a matter of someone
> > volunteering to do the work.
>
> Volunteering to do something that is already outdated, and that will be
> removed in favour of Tiles 2?
> I think it's a waste of time IMHO, also because in Struts 1.4 there will be
> support for Tiles 2.
>
> Antonio
>


-- 
HTH, Ted <http://www.husted.com/ted/blog/>

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


Re: Defining a controller for Tiles?.. and shouldn't we include a Tiles example app in the release?

Posted by Antonio Petrelli <an...@gmail.com>.
2007/10/5, Ted Husted <hu...@apache.org>:
>
> I believe the Tiles example we had migrated to tiles.apache.org with
> the rest of the Tiles code, and no one has come up with another.



This is not true, the original Tiles code resides under Struts.

Antonio

As always, it's just a matter of someone
> volunteering to do the work.



Volunteering to do something that is already outdated, and that will be
removed in favour of Tiles 2?
I think it's a waste of time IMHO, also because in Struts 1.4 there will be
support for Tiles 2.

Antonio

Re: Defining a controller for Tiles?.. and shouldn't we include a Tiles example app in the release?

Posted by Ted Husted <hu...@apache.org>.
I believe the Tiles example we had migrated to tiles.apache.org with
the rest of the Tiles code, and no one has come up with another. The
same holds true for the documentation. What we had was migrated, and
no one has replaced it. As always, it's just a matter of someone
volunteering to do the work.

-- HTH, Ted
<http://www.husted.com/ted/blog/>


On 10/5/07, Rick Reumann <ri...@gmail.com> wrote:
> I'm working on using IDEA for a Struts1.3 project and IDEA was
> complaining about my Tiles definition that I had declared:
>
> <plug-in className="org.apache.struts.tiles.TilesPlugin">
>                 <set-property property="definitions-config"
> value="/WEB-INF/tiles-definitions.xml" />
>         <set-property property="moduleAware" value="true" />
>     </plug-in>
>
> It was complaining about not defining a controller (even though the
> code actually worked without it.)
>
> I decided to look at some examples that come with Struts, and to my
> surprise, I didn't see a single application example using Tiles??? I
> know this is more of a dev list questoin, but in case a dev is reading
> this, shouldn't we include a simple Tiles example as an example app
> released with Struts 1.x? Before people say the prefer Sitemesh - I
> would prefer Sitemesh also IF I could get an answer about something I
> found fundamentally wrong with it back when I used to use it. (I'm
> going to try to follow up - bottom line is Sitemesh would buffer your
> entire page contents into a Buffer(might have been StringBuffer),
> which had some huge memory impact on some large pages we had. Even a
> bunch of small pages this would be a huge memory footprint having to
> buffer all that.)
>
> Anyway, just playing around I figured if I declared...
>
> <controller processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>
>
> IDEA didn't complain, but I didn't see anywhere in the docs that
> mentioned you should declare a Tiles controller? Maybe I missed it?
>
> I found a Tiles example here that shows a use of declaring a
> controller for Tiles
> http://www.laliluna.de/first-steps-struts-tiles-tutorial.html
>
> But in the Struts Tiles quick start I didn't see it even mentioned nor
> in the user guide
> http://struts.apache.org/1.x/struts-tiles/userGuide.html
>
> Also what's a good buffer size to use (the example above uses 4096)?
>
>
> --
> Rick

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