jeudi 26 février 2015

org.apache.tiles.TilesException: Attribute 'console' not found

I don't understand what's wrong with my code since the other tiles are working fine, so I guess it's a mapping problem but I can't find the origin of it.


console :



2015-02-26 14:41:32,200 [http-bio-8080-exec-7] ERROR org.apache.tiles.jsp.taglib.RoleSecurityTagSupport - Error executing tag: Attribute 'console' not found.
org.apache.tiles.TilesException: Attribute 'console' not found.
at org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:112)
at org.apache.tiles.jsp.taglib.RenderTagSupport.execute(RenderTagSupport.java:171)
at org.apache.tiles.jsp.taglib.RoleSecurityTagSupport.doEndTag(RoleSecurityTagSupport.java:75)
at org.apache.tiles.jsp.taglib.ContainerTagSupport.doEndTag(ContainerTagSupport.java:80)
at org.apache.jsp.HelloWorld_jsp._jspx_meth_tiles_005finsertAttribute_005f0(HelloWorld_jsp.java:142)
at org.apache.jsp.HelloWorld_jsp._jspService(HelloWorld_jsp.java:84)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:744)
2015-02-26 14:41:32,200 [http-bio-8080-exec-7] ERROR org.apache.tiles.jsp.taglib.RenderTagSupport - Error during rendering
javax.servlet.jsp.JspException: Error executing tag: Attribute 'console' not found.
at org.apache.tiles.jsp.taglib.RoleSecurityTagSupport.doEndTag(RoleSecurityTagSupport.java:80)
at org.apache.tiles.jsp.taglib.ContainerTagSupport.doEndTag(ContainerTagSupport.java:80)
at org.apache.jsp.HelloWorld_jsp._jspx_meth_tiles_005finsertAttribute_005f0(HelloWorld_jsp.java:142)
at org.apache.jsp.HelloWorld_jsp._jspService(HelloWorld_jsp.java:84)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.apache.tiles.TilesException: Attribute 'console' not found.
at org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:112)
at org.apache.tiles.jsp.taglib.RenderTagSupport.execute(RenderTagSupport.java:171)
at org.apache.tiles.jsp.taglib.RoleSecurityTagSupport.doEndTag(RoleSecurityTagSupport.java:75)
... 32 more


tiles.xml :



<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
"http://ift.tt/19E1atl">

<tiles-definitions>

<definition name="accueil" template="/baseLayout.jsp">
<put-attribute name="title" value="Accueil"/>
<put-attribute name="header" value="/tiles/header.jsp"/>
<put-attribute name="console" value="/test1.jsp" />
<put-attribute name="footer" value="/tiles/footer.jsp"/>
</definition>

<definition name="/logged" extends="accueil">
<put-attribute name="title" value="Bienvenue"/>
<put-attribute name="console" value="/test1.jsp" />
<put-attribute name="body" value=""/>
</definition>

<definition name="/notLogged.tiles" extends="accueil">
<put-attribute name="title" value="Bienvenue"/>

<put-attribute name="body" value="/context/errorLog.jsp"/>
</definition>


<definition name="/error.tiles" extends="accueil">

<put-attribute name="title" value="Erreur"/>
<put-attribute name="body" value="/context/error.jsp"/>
</definition>

</tiles-definitions>


web.xml :



<web-app xmlns="http://ift.tt/qzwahU" xmlns:xsi="http://ift.tt/ra1lAU"
xsi:schemaLocation="http://ift.tt/qzwahU
http://ift.tt/16hRdKA"
version="2.4">

<display-name>Projet DAR</display-name>

<!-- <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/classes/spring/applicationContext.xml</param-value>
</context-param> <filter> <filter-name>encodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param> <param-name>encoding</param-name> <param-value>UTF-8</param-value>
</init-param> <init-param> <param-name>forceEncoding</param-name> <param-value>true</param-value>
</init-param> </filter>-->

<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/classes/spring/applicationContext.xml</param-value>
</context-param>

<context-param>
<param-name>
org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG
</param-name>
<param-value>
/WEB-INF/tiles.xml
</param-value>
</context-param>


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

<!-- <filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping> -->


<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>
<listener-class> fr.altares.jupiter.intuizhtml.web.listener.ApplicationInitListener</listener-class>
</listener> -->

<listener>
<listener-class>
org.apache.struts2.tiles.StrutsTilesListener
</listener-class>
</listener>

<welcome-file-list>
<welcome-file>baseLayout.jsp</welcome-file>
</welcome-file-list>

<session-config>
<session-timeout>500</session-timeout>
</session-config>

<!-- <error-page> <error-code>404</error-code> <location>/context/error404.jsp</location>
</error-page> -->

</web-app>


struts.xml :



<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://ift.tt/1iwXH3l">

<struts>
<constant name="struts.enable.DynamicMethodInvocation" value="true" />
<constant name="struts.devMode" value="true" />


<package name="main" namespace="/" extends="struts-default">
<result-types>
<result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult" />
</result-types>

<action name="Accueil">
<result>/baseLayout.jsp</result>

</action>

<action name="Accueil" class="com.opensymphony.xwork2.ActionSupport">
<result name="success" type="tiles">accueil</result>
</action>

<action name="Login" class="com.tutorialspoint.struts2.action.LoginAction">
<result name="success" type="redirectAction">HelloWorld.jsp</result>
<result name="notLogged" type="redirectAction">context/errorLog.jsp</result>
</action>






</package>
</struts>


I constantly get this error on this tile while other are loaded perfectly fine, so I just don't understand :/


Aucun commentaire:

Enregistrer un commentaire