You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Paul Benedict <pa...@yahoo.com> on 2005/11/09 04:23:58 UTC

Tiles without Struts

I have gone to this link:
http://struts.apache.org/struts-tiles/installation.html

I am looking for those 3 WAR files listed but I can't find them. The link in this paragraph is
broken so I can't get to the distribution: "First, download a binary distribution of Tiles by
following the instructions <<--here-->>. Then, make sure you have downloaded and installed the
prerequisite software packages described above."

Someone needs to fix the website.

In any event, I want to know if anyone has used Tiles without Struts. If you're doing the XML
method, I know you need a controller in the middle to decide which Tile to load. So that's really
Struts or Spring. Has anyone done that? Just wanting to know.

Paul


		
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

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


Re:Tiles without Struts

Posted by Klaus O K <ma...@roomity.com>.
george.dinwiddie writes: >Standalone tiles may be downloaded at >http://cvs.apache.org/builds/jakarta-struts/nightly/sandbox/tiles-core/ >per the short FAQ at >http://struts.apache.org/struts-action/struts-tiles/faq.html I downloaded this. It contains no less than 7 nested dist folders, but no binary distribution that I can find. Reddin writes: >If you're willing to work with unreleased software, please do give >Standalone Tiles a try. From the perspective of the JSP API (meaning >the tag interface) nothing has changed. The rest of it is beginning >to stabilize and I hope to have it at al least alpha status before I >leave for JavaOne on Thursday. I'd love for some people to start >testing it. I am not sure I understand. Changed from what? Mistroni writes >I think you have to download >Tiles-1.3 jar file - which comes as a standalone - , it's available from >somewhere on Jakarta site (unfortunately I don't remember exactly where :( That was my impression when first I started looking into this. But I have not been able to find that file. Thanks for you time everybody. But I am now going to give up. My situation is this: I have told some people I am working with that you can use Tiles without Struts, and offered to make a small demonstration. I must now conclude that I was wrong. You can't, That is you can't find instructions for how to do so on the Internet in a reasonable amount of time. Klaus O K


Broadband interface (RIA) + mail box saftey = http://Struts_User_List.roomity.com
*Your* clubs, no sign up to read, ad supported; try broadband internet. 

Re: Tiles without Struts

Posted by Greg Reddin <gr...@apache.org>.
On Nov 8, 2005, at 9:23 PM, Paul Benedict wrote:

> I have gone to this link:
> http://struts.apache.org/struts-tiles/installation.html
>
> I am looking for those 3 WAR files listed but I can't find them.  
> The link in this paragraph is
> broken so I can't get to the distribution: "First, download a  
> binary distribution of Tiles by
> following the instructions <<--here-->>. Then, make sure you have  
> downloaded and installed the
> prerequisite software packages described above."
>
> Someone needs to fix the website.

The website is out of date.  I'm in the process of fixing it in svn  
but haven't copied it over to the site directory yet - maybe today?   
Those .war files are not being built anymore.

You should be able to configure the Tiles Servlet like this:

<servlet>
       <servlet-name>Tiles Servlet</servlet-name>
       <servlet-class>org.apache.struts.tiles.servlets.TilesServlet</ 
servlet-class>
       <init-param>
          <param-name>definitions-config</param-name>
          <param-value>/WEB-INF/tiles-defs.xml</param-value>
       </init-param>
       <load-on-startup>1</load-on-startup>
    </servlet>

>
> In any event, I want to know if anyone has used Tiles without  
> Struts. If you're doing the XML
> method, I know you need a controller in the middle to decide which  
> Tile to load. So that's really
> Struts or Spring. Has anyone done that? Just wanting to know.

You don't have to use a controller servlet.  You can insert a tile  
from a JSP.  It's not pretty, but here's how it might be done:

In tiles-defs.xml

<definition name="main" path="/mailLayout.jsp">
   ....
   <put name="body" value="/body.jsp"/>
</definition>

<definition name="child" extends="main">
     <put name="body" value="/aPage.jsp"/>
</definition>


In your web app you'd have the following JSPs:

/mainLayout.jsp
/body.jsp
/aPage.jsp
/aPageTiles.jsp


/aPageTiles.jsp would look like this:

<tiles:insert definition="child"/>

Then you would link to /aPageTiles.jsp.  I know this isn't elegant,  
but it works.  I'm looking at better ways to do this sort of thing  
with Standalone Tiles using a Filter or something.

HTH,
Greg


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