You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jeff Conrad <jc...@yahoo.com> on 2006/07/06 14:22:13 UTC

Tiles W/JSP Sans Struts

My goal was to form a complete example of a
working Tiles/JSP example  independently of Struts. However
the links
are dead in the current version. Also, I believe some of
the
documentation is dated, and some of what comes back from a
GIS are
leftover descriptions from an older version of Tiles. I
have created a fixed example that fits with some of the
previous
documentation, but actually will work in the case of using
Tiles
definitions.

Tiles Background
1. The <a
href="http://struts.apache.org/1.x/struts-tiles/installation.html">Tiles
installation document</a> states that in order
to use Tiles independently, you would use the TilesServlet,
located in the struts-tiles-VERSION.jar. There is not a
TilesServlet, nor a struts-tiles-VERSION.jar, in the
struts-1.2.9-src, -lib, or -bin deliveries. The <a
href="http://struts.apache.org/1.x/struts-tiles/installation.html">Tiles
installation document</a> has a dead link to
http://struts.apache.org/1.x/struts-tiles/cvs-usage.html.
2.  The <a
href="http://struts.apache.org/1.x/struts-tiles/faq.html">Tiles
FAQ page</a> has a dead link to
http://cvs.apache.org/builds/jakarta-struts/nightly/sandbox/tiles-core/.
3.  The example in the <a
href="http://struts.apache.org/1.x/struts-tiles/apidocs/org/apache/struts/tiles/package-summary.html">API
from 1.x Struts</a> has some extra escaping
of &amp;gt; characters.
4.  The
http://struts.apache.org/1.x/struts-tiles/examples.html
(Examples from 1.x Struts) page is incomplete.
5.  The
http://struts.apache.org/1.x/struts-tiles/tagreference.html
definition tag does not mention name. Name is a required
attribute for definition.

Solutions
1.  To use the Tiles in the current version of Struts, you
will need to
use the Struts servlet.  I have uploaded a working example
with all of the necessary components (minus the libraries)
at
http://www.guesttime.com/members/ledlogic/struts/TilesTest-0.1-src.jar

If you build this and deploy the war to a webserver, there
are 3 examples in the line of the original struts examples,
one for pure JSP (/jsp/jspExample.jsp), one with JSP +
tiles (/jsp/tilesExample.jsp), and the last is
(/jsp/tilesXMLExample.jsp).

2.  I am not sure if there are nightly builds
somewhere for tiles.  Who manages these for Struts?
3.  The javadoc needs to be fixed in the java
source for the tiles package.
4.  Perhaps some of the information here could be
incorporated. Do you need someone to finish the
documentation for
Tiles? If so I can help.
5.  See the above example source package for an
example.  I used name, not id.  Here is the sample code:

	<definition name="tilesXMLDefinition"
template="/jsp/layout.jsp">
		<put name="title"  value="Tiles XML Definition Example"
/>
		<put name="header" value="/jsp/header.jsp" />
		<put name="body"   value="/jsp/body.jsp" />
	</definition>


Jeff Conrad
jconradmn@yahoo.com
dmitri2060 on ebay / half.com

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: Tiles W/JSP Sans Struts

Posted by Wendy Smoak <ws...@gmail.com>.
On 7/6/06, Jeff Conrad <jc...@yahoo.com> wrote:
> My goal was to form a complete example of a
> working Tiles/JSP example  independently of Struts. However
> the links are dead in the current version. Also, I believe some of
> the documentation is dated, and some of what comes back from a
> GIS are leftover descriptions from an older version of Tiles. I
> have created a fixed example that fits with some of the
> previous documentation, but actually will work in the case of using
> Tiles definitions.

Thanks.  Can you please open an issue for the documentation problems?
 * http://issues.apache.org/struts

And yes, help is appreciated. :)  Please come join us on the
developers list if you would like to help with Tiles or the
documentation.  http://struts.apache.org/mail.html

Most of the Tiles development effort is now going towards "Tiles 2"
(the stand-alone version of Tiles) which is in the Sandbox area of the
Struts svn repo.

I updated http://wiki.apache.org/struts/StandaloneTiles (thanks,
George!) with some additional information including a link to the
Tiles 2 API docs and a recent snapshot of tiles-core.jar.

-- 
Wendy

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


Re: Tiles W/JSP Sans Struts

Posted by Greg Reddin <gr...@apache.org>.
On Jul 10, 2006, at 2:24 PM, Wendy Smoak wrote:

> Keep in mind that this is in the sandbox, unreleased, and subject to
> change!  In particular, issues SB-21 and SB-30 call for removing
> several elements and attributes from the TLD and DTD.

This is very true.  I have not closed the TLD ticket yet because I'm  
still testing, but the current version of the TLD in svn should be  
mostly compacted.

Greg


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


Re: Tiles W/JSP Sans Struts

Posted by Jeff Conrad <jc...@yahoo.com>.
Thanks, I will take a look tonight.

--- Wendy Smoak <ws...@gmail.com> wrote:

> On 7/8/06, Jeff Conrad <jc...@yahoo.com> wrote:
> 
> > As we are currently using Spring+Tiles, I am going to
> try
> > to stay abreast of the new Tiles 2.0.
> 
> After a bit of work over the weekend, the Tiles 2 website
> is in
> slightly better condition (as in, it's visible now... :)
> )
> 
> * http://struts.apache.org/struts-sandbox/tiles/
> 
> Keep in mind that this is in the sandbox, unreleased, and
> subject to
> change!  In particular, issues SB-21 and SB-30 call for
> removing
> several elements and attributes from the TLD and DTD.
> 
> -- 
> Wendy
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
> 
> 


Jeff Conrad
jconradmn@yahoo.com

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: Tiles W/JSP Sans Struts

Posted by Wendy Smoak <ws...@gmail.com>.
On 7/8/06, Jeff Conrad <jc...@yahoo.com> wrote:

> As we are currently using Spring+Tiles, I am going to try
> to stay abreast of the new Tiles 2.0.

After a bit of work over the weekend, the Tiles 2 website is in
slightly better condition (as in, it's visible now... :) )

* http://struts.apache.org/struts-sandbox/tiles/

Keep in mind that this is in the sandbox, unreleased, and subject to
change!  In particular, issues SB-21 and SB-30 call for removing
several elements and attributes from the TLD and DTD.

-- 
Wendy

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


Re: Tiles W/JSP Sans Struts

Posted by Jeff Conrad <jc...@yahoo.com>.
Thanks for all the feedback, I read through the responses
yesterday but didn't have any time to do anything until the
weekend.

As we are currently using Spring+Tiles, I am going to try
to stay abreast of the new Tiles 2.0.

--- Greg Reddin <gr...@apache.org> wrote:

> Hi Jeff,  I'd recommend taking a look at Standalone
> Tiles.   
> Basically, Struts-Tiles is Tiles 1.0 and Standalone Tiles
> is Tiles  
> 2.0.  Honestly, I'm not putting any efforts into
> improving Tiles 1.0,  
> but focusing on making 2.0 stable and ready.  You can
> search for  
> Standalone Tiles on the dev list to follow the progress. 
>  See other  
> comments below...
> 
> On Jul 6, 2006, at 7:22 AM, Jeff Conrad wrote:
> 
> > 1. The <a
> > href="http://struts.apache.org/1.x/struts-tiles/ 
> > installation.html">Tiles
> > installation document</a> states that in order
> > to use Tiles independently, you would use the
> TilesServlet,
> > located in the struts-tiles-VERSION.jar. There is not a
> > TilesServlet, nor a struts-tiles-VERSION.jar, in the
> > struts-1.2.9-src, -lib, or -bin deliveries.
> 
> Wow.  You're right and I'm really surprised.  I'll have
> to check into  
> that.  I really have no idea when, how, or why that was
> removed.   
> There is one in Tiles 2.0.
> 
> > The <a
> > href="http://struts.apache.org/1.x/struts-tiles/ 
> > installation.html">Tiles
> > installation document</a> has a dead link to
> >
> http://struts.apache.org/1.x/struts-tiles/cvs-usage.html.
> 
> That's supposed to point to the Struts source
> distribution download  
> page.  It needs to be fixed.
> 
> > 2.  The <a
> >
>
href="http://struts.apache.org/1.x/struts-tiles/faq.html">Tiles
> > FAQ page</a> has a dead link to
> >
>
http://cvs.apache.org/builds/jakarta-struts/nightly/sandbox/tiles-
> 
> > core/.
> 
> That's supposed to point to Standalone Tiles.  It also
> needs to be  
> fixed.
> 
> > 3.  The example in the <a
> >
>
href="http://struts.apache.org/1.x/struts-tiles/apidocs/org/apache/
> 
> > struts/tiles/package-summary.html">API
> > from 1.x Struts</a> has some extra escaping
> > of &amp;gt; characters.
> 
> This will be superceded by Standalone Tiles.  Actually it
> will  
> probably be ported to Standalone Tiles and needs to be
> fixed.
> 
> > 4.  The
> > http://struts.apache.org/1.x/struts-tiles/examples.html
> > (Examples from 1.x Struts) page is incomplete.
> 
> Yes, intentionally so.  I left some gaping holes in the
> hopes that  
> patches would soon follow from people who have better
> ideas than  
> myself :-)  Actually, I think the doc would flow better
> if the  
> Examples page was just Chapter 2 of the User Guide. 
> Basically,  
> replace the bottom section of the User Guide page with
> the Examples  
> stuff.
> 
> > 5.  The
> >
>
http://struts.apache.org/1.x/struts-tiles/tagreference.html
> > definition tag does not mention name. Name is a
> required
> > attribute for definition.
> 
> I thought that doc was auto-generated from the TLD file. 
> Perhaps it  
> is out of date or something.
> 
> >
> > Solutions
> > 1.  To use the Tiles in the current version of Struts,
> you
> > will need to
> > use the Struts servlet.  I have uploaded a working
> example
> > with all of the necessary components (minus the
> libraries)
> > at
> >
>
http://www.guesttime.com/members/ledlogic/struts/TilesTest-0.1-src.jar
> >
> > If you build this and deploy the war to a webserver,
> there
> > are 3 examples in the line of the original struts
> examples,
> > one for pure JSP (/jsp/jspExample.jsp), one with JSP +
> > tiles (/jsp/tilesExample.jsp), and the last is
> > (/jsp/tilesXMLExample.jsp).
> 
> If you look in the sandbox there is a skeletal test app
> taking shape  
> for Standalone Tiles (tiles-test).  There's also a
> TilesServlet  
> there.  I'd also like to take a look at your examples and
> see what  
> you've done.
> 
> 
>
http://svn.apache.org/repos/asf/struts/sandbox/trunk/tiles/tiles-test/
> 
> >
> > 2.  I am not sure if there are nightly builds
> > somewhere for tiles.  Who manages these for Struts?
> 
> You should find a nightly for struts-tiles-x.jar in the
> same place as  
> Struts 1.3 jars.  (Sorry I don't know off the top where
> that is.)   
> Prior to Struts 1.3, Tiles was just a subdirectory of the
> Struts  
> distro.  As of 1.3, it is a sub-project, and "nomadic" is
> a pretty  
> good way to describe it.  I really can't tell you where
> it will  
> live.  I am forming an opinion about where I think it
> *should* live,  
> but that's another discussion.
> 
> > 3.  The javadoc needs to be fixed in the java
> > source for the tiles package.
> > 4.  Perhaps some of the information here could be
> > incorporated. Do you need someone to finish the
> > documentation for
> > Tiles? If so I can help.
> 
> Yes :-)  That would be awesome!!
> 
> If you're offering to help I would point you to
> Standalone Tiles.   
> (Check the links George Dinwiddie sent.)  There are hooks
> in the  
> (Tiles 1.x) doc where the missing information should go,
> but I would  
> like to see that information added based on Tiles 2.0. 
> If you're  
> still committed to advancing the 1.x product, then we
> welcome any  
> work in that arena as well.
> 
> Here's a fairly definitive list of outstanding
> tasks/issues related  
> to Tiles:
> 
> 
>
http://issues.apache.org/struts/secure/IssueNavigator.jspa?
> 
> reset=true&mode=hide&pid=10122&sorter/order=DESC&sorter/ 
> field=priority&resolution=-1&component=21260
> 
> Thanks,
> Greg
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
> 
> 


Jeff Conrad
jconradmn@yahoo.com
dmitri2060 on ebay / half.com

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: Tiles W/JSP Sans Struts

Posted by Greg Reddin <gr...@apache.org>.
Hi Jeff,  I'd recommend taking a look at Standalone Tiles.   
Basically, Struts-Tiles is Tiles 1.0 and Standalone Tiles is Tiles  
2.0.  Honestly, I'm not putting any efforts into improving Tiles 1.0,  
but focusing on making 2.0 stable and ready.  You can search for  
Standalone Tiles on the dev list to follow the progress.   See other  
comments below...

On Jul 6, 2006, at 7:22 AM, Jeff Conrad wrote:

> 1. The <a
> href="http://struts.apache.org/1.x/struts-tiles/ 
> installation.html">Tiles
> installation document</a> states that in order
> to use Tiles independently, you would use the TilesServlet,
> located in the struts-tiles-VERSION.jar. There is not a
> TilesServlet, nor a struts-tiles-VERSION.jar, in the
> struts-1.2.9-src, -lib, or -bin deliveries.

Wow.  You're right and I'm really surprised.  I'll have to check into  
that.  I really have no idea when, how, or why that was removed.   
There is one in Tiles 2.0.

> The <a
> href="http://struts.apache.org/1.x/struts-tiles/ 
> installation.html">Tiles
> installation document</a> has a dead link to
> http://struts.apache.org/1.x/struts-tiles/cvs-usage.html.

That's supposed to point to the Struts source distribution download  
page.  It needs to be fixed.

> 2.  The <a
> href="http://struts.apache.org/1.x/struts-tiles/faq.html">Tiles
> FAQ page</a> has a dead link to
> http://cvs.apache.org/builds/jakarta-struts/nightly/sandbox/tiles- 
> core/.

That's supposed to point to Standalone Tiles.  It also needs to be  
fixed.

> 3.  The example in the <a
> href="http://struts.apache.org/1.x/struts-tiles/apidocs/org/apache/ 
> struts/tiles/package-summary.html">API
> from 1.x Struts</a> has some extra escaping
> of &amp;gt; characters.

This will be superceded by Standalone Tiles.  Actually it will  
probably be ported to Standalone Tiles and needs to be fixed.

> 4.  The
> http://struts.apache.org/1.x/struts-tiles/examples.html
> (Examples from 1.x Struts) page is incomplete.

Yes, intentionally so.  I left some gaping holes in the hopes that  
patches would soon follow from people who have better ideas than  
myself :-)  Actually, I think the doc would flow better if the  
Examples page was just Chapter 2 of the User Guide.  Basically,  
replace the bottom section of the User Guide page with the Examples  
stuff.

> 5.  The
> http://struts.apache.org/1.x/struts-tiles/tagreference.html
> definition tag does not mention name. Name is a required
> attribute for definition.

I thought that doc was auto-generated from the TLD file.  Perhaps it  
is out of date or something.

>
> Solutions
> 1.  To use the Tiles in the current version of Struts, you
> will need to
> use the Struts servlet.  I have uploaded a working example
> with all of the necessary components (minus the libraries)
> at
> http://www.guesttime.com/members/ledlogic/struts/TilesTest-0.1-src.jar
>
> If you build this and deploy the war to a webserver, there
> are 3 examples in the line of the original struts examples,
> one for pure JSP (/jsp/jspExample.jsp), one with JSP +
> tiles (/jsp/tilesExample.jsp), and the last is
> (/jsp/tilesXMLExample.jsp).

If you look in the sandbox there is a skeletal test app taking shape  
for Standalone Tiles (tiles-test).  There's also a TilesServlet  
there.  I'd also like to take a look at your examples and see what  
you've done.

	http://svn.apache.org/repos/asf/struts/sandbox/trunk/tiles/tiles-test/

>
> 2.  I am not sure if there are nightly builds
> somewhere for tiles.  Who manages these for Struts?

You should find a nightly for struts-tiles-x.jar in the same place as  
Struts 1.3 jars.  (Sorry I don't know off the top where that is.)   
Prior to Struts 1.3, Tiles was just a subdirectory of the Struts  
distro.  As of 1.3, it is a sub-project, and "nomadic" is a pretty  
good way to describe it.  I really can't tell you where it will  
live.  I am forming an opinion about where I think it *should* live,  
but that's another discussion.

> 3.  The javadoc needs to be fixed in the java
> source for the tiles package.
> 4.  Perhaps some of the information here could be
> incorporated. Do you need someone to finish the
> documentation for
> Tiles? If so I can help.

Yes :-)  That would be awesome!!

If you're offering to help I would point you to Standalone Tiles.   
(Check the links George Dinwiddie sent.)  There are hooks in the  
(Tiles 1.x) doc where the missing information should go, but I would  
like to see that information added based on Tiles 2.0.  If you're  
still committed to advancing the 1.x product, then we welcome any  
work in that arena as well.

Here's a fairly definitive list of outstanding tasks/issues related  
to Tiles:

	http://issues.apache.org/struts/secure/IssueNavigator.jspa? 
reset=true&mode=hide&pid=10122&sorter/order=DESC&sorter/ 
field=priority&resolution=-1&component=21260

Thanks,
Greg

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