Exception using Tiles
---------------------

                 Key: TILES-194
                 URL: https://issues.apache.org/struts/browse/TILES-194
             Project: Tiles
          Issue Type: Bug
          Components: tiles-jsp (jsp support)
    Affects Versions: 2.0.4
         Environment: Windows XP, Eclipse 3.2, jboss-web 1.01, 
            Reporter: Ramon Andrade


Hy guys,

I`m starting to use Tiles 2 and I`m getting an exception.  Follow the exception:

18:36:53,848 ERROR [org.apache.tiles.jsp.taglib.RenderTagSupport] Error during 
rendering
java.lang.IllegalArgumentException: Cannot find a factory to create the request 
context
        at 
org.apache.tiles.context.ChainedTilesContextFactory.createRequestContext(ChainedTilesContextFactory.java:129)
        at 
org.apache.tiles.impl.BasicTilesContainer.getRequestContext(BasicTilesContainer.java:256)
        at 
org.apache.tiles.impl.BasicTilesContainer.startContext(BasicTilesContainer.java:128)
        at 
org.apache.tiles.jsp.taglib.ContainerTagSupport.startContext(ContainerTagSupport.java:102)
        at 
org.apache.tiles.jsp.taglib.ContainerTagSupport.doStartTag(ContainerTagSupport.java:69)
        at 
org.apache.tiles.jsp.taglib.RenderTagSupport.doStartTag(RenderTagSupport.java:146)
        at 
org.apache.jsp.glb_005fcontcma_005fcma_jsp._jspx_meth_tiles_005finsertDefinition_005f1(glb_005fcontcma_005fcma_jsp.java:474)
        at 
org.apache.jsp.glb_005fcontcma_005fcma_jsp._jspx_meth_s_005fform_005f0(glb_005fcontcma_005fcma_jsp.java:252)
        at 
org.apache.jsp.glb_005fcontcma_005fcma_jsp._jspService(glb_005fcontcma_005fcma_jsp.java:116)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
        at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
...


Follow my configurations:

[web.xml]

<?xml version="1.0" encoding="ISO-8859-1" ?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
        version="2.4">

        <display-name>ContCMA</display-name>

        <context-param>
                <param-name>contextConfigLocation</param-name>
                
<param-value>/WEB-INF/classes/application-context.xml</param-value>
        </context-param>
       
        <context-param>
                <param-name>javax.servlet.jsp.jstl.fmt.locale</param-name>
                <param-value>pt_BR</param-value>
        </context-param>

        <filter>
        <filter-name>struts2</filter-name>
        <filter-class>
            org.apache.struts2.dispatcher.FilterDispatcher
        </filter-class>
    </filter>

    <filter-mapping>
        <filter-name>struts2</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
   
        <listener>
                
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
        </listener>

        <listener>
                <description>Listener para inicialização da 
aplicação</description>
                <display-name>ContCMAInitializationListener</display-name>
                
<listener-class>com.globo.contcma.controller.ContCMAInitializationListener</listener-class>
        </listener>
       
        <listener>
      <listener-class>org.apache.tiles.listener.TilesListener</listener-class>
    </listener>
        ....


[tiles.xml]
<?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>
    <!-- definição do layout da página principal -->
        <definition name="header" 
template="/admin/public/jsp/glb_contcma_header.jsp">
                <put-attribute name="titulo" value="" />
        </definition>
        <definition name="footer" 
template="/admin/public/jsp/glb_contcma_footer.jsp"/>
</tiles-definitions>


[jsp that occurs the error]:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib prefix="s" uri="/tags/struts-tags" %>
<%@ taglib prefix="tiles" uri="/tags/tiles" %>
<html>
        <body>
                <s:form action="login.ssp" method="post">
                        <table width="600" border="0" cellspacing="0" 
cellpadding="0" align="center">
                                <tiles:insertDefinition name="header">
                                        <tiles:putAttribute name="titulo" 
value="Login de Usuário" />
                                </tiles:insertDefinition>
                                <tr>
                                        <td>
                                                <table width="100%" 
class="lista">
                                               
                                                        <!--- LOGIN --->
                                                        <tr>
                                                    <td class="label">
                                             Login:
                                            <s:textfield name="login" 
id="login" size="20" maxlength="10" cssClass="campo" tabindex="1"/>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                    <td class="label">
                                             Senha:
                                            <s:password name="senha" id="senha" 
size="20" maxlength="8" cssClass="campo" tabindex="2"/>
                                                                </td>
                                                        </tr>
                                                        <!--- /LOGIN --->
                                                        <tr>
                                <td align="center">
                                                                        <input 
type="button" name="btLogin" id="btLogin" value="Aceitar" class="botao" 
onClick="autenticar();">  
                                                                </td>
                                                        </tr>
                                                       
                                                </table>
                                        </td>
                                </tr>
                                <tiles:insertDefinition name="footer" />
                        </table>
                </s:form>
        </body>
</html>


Is there any configuration that I have to put in other file?

Thanks all.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to