Hi Lionel,

I'm not an expert on TIles, but the way I have configured it into may
application is different from yours. That is what I've put in my web.xml:

  <!-- Tiles Servlet -->
   <servlet>
       <servlet-name>tiles</servlet-name>
       <servlet-class>org.apache.tiles.servlet.TilesServlet</servlet-class>
       <init-param>
           <param-name>org.apache.tiles.DEFINITIONS_CONFIG</param-name>
           <param-value>/WEB-INF/tiles-defs.xml</param-value>
       </init-param>
       <load-on-startup>2</load-on-startup>
   </servlet>

Hope it works.

Best regards,
Alexandre

On 5/10/07, Lionel Port <[EMAIL PROTECTED]> wrote:

Hi,

I'm having some trouble with the shale integration with tiles. I think
I've got everything setup right, but, everytime I go to a page I get
an empty page and the exception.

javax.servlet.jsp.JspException: TilesContainer not initialized


web.xml contains this:

        <context-param>
            <param-name>definitions-config</param-name>
            <param-value>/WEB-INF/tiles-def.xml</param-value>
        </context-param>

        <listener>
            <listener-class>
              org.apache.tiles.listener.TilesListener
            </listener-class>
        </listener>


tiles-def.xml looks like this:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD
Tiles Configuration 2.0//EN"
"http://tiles.apache.org/dtds/tiles-config_2_0.dtd";>
<tiles-definitions>
    <definition name="mainTemplate" template="/layout/layout.jsp">
        <put-attribute name="header" value="/layout/header.jsp"/>
        <put-attribute name="footer" value="/layout/footer.jsp"/>
        <put-attribute name="body" value="/jsp/report.jsp"/>
    </definition>
    <definition name="/jsp/report" extends="mainTemplate">
        <put-attribute name="body" value="/jsp/report.jsp"/>
    </definition>
    <definition name="/jsp/validationTest" extends="mainTemplate">
        <put-attribute name="body" value="/jsp/validationTest.jsp"/>
    </definition>
</tiles-definitions>


When I deploy the application I see the messages

11/05/2007 08:58:41 org.apache.tiles.listener.TilesListenercontextInitialized
INFO: Initializing TilesListener
11/05/2007 08:58:41 org.apache.tiles.listener.TilesListenerreadFactoryConfig
INFO: CONFIG FILES DEFINED IN WEB.XML
11/05/2007 08:58:41 org.apache.tiles.listener.TilesListener
initDefinitionsFactory
INFO: initializing definitions factory...


But when I access /jsp/report.jsf I get this error message

javax.servlet.jsp.JspException: TilesContainer not initialized
        at org.apache.tiles.jsp.taglib.ContainerTagSupport.doStartTag(
ContainerTagSupport.java:74)
        at org.apache.tiles.jsp.taglib.RenderTagSupport.doStartTag(
RenderTagSupport.java:147)
        at jsp_servlet._layout.__layout._jsp__tag0(__layout.java:131)
        at jsp_servlet._layout.__layout._jspService(__layout.java:97)
        at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
        at
weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(
StubSecurityHelper.java:225)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(
StubSecurityHelper.java:127)
        at weblogic.servlet.internal.ServletStubImpl.execute(
ServletStubImpl.java:283)
        at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(
ServletStubImpl.java:391)
        at weblogic.servlet.internal.ServletStubImpl.execute(
ServletStubImpl.java:309)
        at weblogic.servlet.internal.ServletStubImpl.execute(
ServletStubImpl.java:175)
        at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(
RequestDispatcherImpl.java:496)
        at weblogic.servlet.internal.RequestDispatcherImpl.forward(
RequestDispatcherImpl.java:245)
        at
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(
ServletExternalContextImpl.java:416)
        at org.apache.shale.tiles.TilesViewHandler.dispatchToTile(
TilesViewHandler.java:319)



What am I doing wrong?

thanks for your help,
Lionel




--
Alexandre Corrêa Barbosa
http://mydevelopmentjournal.blogspot.com (meu blog de tecnologia)
http://log4dev.wordpress.com (blog de tecnologia de Miguel Galves, onde sou
colaborador)

Reply via email to