Do you have the statement below toward the very end of
the struts-config.xml file?

  <plug-in
className="org.apache.struts.tiles.TilesPlugin" >
    <set-property property="definitions-config"
                     value="/WEB-INF/tiles-defs.xml"/>
    <set-property property="definitions-debug"
value="1" />
    <set-property
property="definitions-parser-details" value="0" />
    <set-property
property="definitions-parser-validate" value="true" />
  </plug-in>

-Caroline
--- PC Leung <[EMAIL PROTECTED]> wrote:

> Can anyone give me a simple enough example
> so that I can modify my little app of using Tiles?
> 
> my little app has basic tiles config
> header, menu, content and footer.
> 
> When a URL in JSP of the content layout is clicked,
> the content layout is expected to change with
> another
> JSP. Header, menu and footer is expected to be kept
> unchanged.
> Simple enough.
> 
> However after clicking in the first page, nothing is
> changed!!!
> It stays at the welcome page; it does not go to
> login page.
> 
> Someone suggests to use ComponentContext
> so that content layout JSP can be changed
> dynamically.
> But I do not know how to define in Struts-Config.xml
> and where to put the ComponentContext
> (in a separate class file or in the same Action
> class)?
> 
> My first page:
> <%@ page contentType="text/html;charset=UTF-8"
> language="java" %>
> <%@ taglib uri="/WEB-INF/struts-tiles.tld"
> prefix="tiles" %>
> 
> <tiles:insert definition="erp.mainLayout"
> flush="true" />
> 
> My tiles-defs.xml:
>   <definition name="erp.mainLayout"
> path="/layout/classicLayout.jsp">
>         <put name="title"  value="ERP Testing" />
>         <put name="header" value="/common/header.jsp" />
>         <put name="menu"   value="erp.menu.main" />
>         <put name="footer" value="/common/footer.jsp" />
>         <put name="body"   value="/Main.jsp" />
>   </definition>
> 
> My Main.jsp content layout (Welcome page):
> ...
> <bean:message  key="main.welcome"/>
> <html:link forward="login">
> <bean:message  key="main.login"/>
> </html:link>
> ...
> 
> My struts-config.xml:
>     <action    path="/login"
>                type="com.security.user.LoginAction"
>                name="loginForm"
>                  scope="request" 
>                  validate="true" 
>                input="/Login.jsp">
>       <forward name="success"
> path="/SecurityMaint.jsp"/>
>       <forward name="failure" path="/Login.jsp"/>
>       <forward name="cancel" path="/Welcome.jsp"/>
>     </action>
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



                
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to