struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul-J Woodward" <paul-j.woodw...@db.com>
Subject Re: [Tiles] Populating Tiles definition attribute at runtime
Date Mon, 29 Dec 2003 20:00:40 GMT

I modified the ActionServlet (might not be necessary - need to investigate the dynamic module
config stuff further), created a new TilesDefinitionFactory and changed a few other bits and
made tiles extract all of its definitions from a database. I also implemented a cache mechanism
as a Java servlet so that database access was minimal.

This was all because I need a site that was truly dynamic, whilst running on a cluster of
servers.

Paul
------------------------------------------------------------
Global Equity Derivatives Technology
Deutsche Bank [/]
Office  +44 (0)20 754 55458
Mobile +44 (0)7736 299483
Fax      +44 (0)20 7547 2752
------------------------------------------------------------


                                                                                         
                                                                                         
                           
                      Brice Ruth                                                         
                                                                                         
                           
                      <bruth@fiskars.co        To:       Struts Users Mailing List <struts-user@jakarta.apache.org>
                                                                                         
 
                      m>                       cc:                                    
                                                                                         
                              
                                               Subject:  Re: [Tiles] Populating Tiles definition
attribute at runtime                                                                     
                    
                      29/12/2003 19:20                                                   
                                                                                         
                           
                      Please respond to                                                  
                                                                                         
                           
                      "Struts Users                                                      
                                                                                         
                           
                      Mailing List"                                                      
                                                                                         
                           
                                                                                         
                                                                                         
                           
                                                                                         
                                                                                         
                           




Wow, that's pretty cool ... I'll have to check out the controllerClass
stuff sometime :)

Domingo A. Rodriguez S. wrote:

>Hi Robert..
>
>I guess you could achieve the same using the controllerClass attribute and
>building your class.. For instance, I have this definition in the
>tiles-defs.xml file:
>---
>   <definition name=".layout"
>               path="/common/layout.jsp"
>    controllerClass='com.dars.XTileAction'>
>     <put name="title"       value="Encabezado primario"/>
>     <put name="leftside"    value="/common/leftside.jsp"/>
>     <put name="rightside"   value="/common/rightside.jsp"/>
>     <put name="header"      value="/common/header.jsp"/>
>     <put name="footer"      value="/common/footer.jsp"/>
>     <put name="body"        value="/common/body.jsp"/>
>   </definition>
>---
>  And I have this controllerClass
>---
>package com.dars;
>import org.apache.struts.tiles.actions.TilesAction;
>import org.apache.struts.tiles.ComponentContext;
>import org.apache.struts.tiles.Controller;
>import javax.servlet.http.HttpServletRequest;
>import javax.servlet.http.HttpServletResponse;
>import javax.servlet.ServletContext;
>import javax.servlet.ServletException;
>import java.io.IOException;
>
>public class XTileAction extends TilesAction implements Controller{
Mime
View raw message