struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From styl9090 <styl9...@gmail.com>
Subject Re: Exception when tying to display a 404 error page.
Date Fri, 30 May 2008 13:36:15 GMT

Baptiste, How did you overcome with this problem.

I am getting the same error in my application while accessing any error
pages with Struts2 tags.
Please help me if anybody knows the solution for this.

Thanks.


Baptiste GAILLARD-2 wrote:
> 
> Hi, i'm developping a blog using Struts 2 (2.0.11), I have a strange 
> error in a 404 error page.
> 
> This error page is defined in my web.xml:
> 
> <error-page>
>     <error-code>404</error-code>
>     <location>/pages/errors/page404.jsp</location>
> </error-page>
> 
> Struts 2 is configured with those lines :
> 
>         <!-- Struts 2 configuration -->
>         <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>
> 
>         <!-- Tiles 2 integration into Struts 2 -->
>         <listener>
>                 
> <listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
>         </listener>
> 
> 
> The problem is the folowing :
> If I enter a bad address in my web browser the application must redirect 
> me to the 404 error page, but this exception is generated :
> 
> 12:09:26,047 INFO  [STDOUT] 12:09:26,047 ERROR [[jsp]] 
> "Servlet.service()" pour la servlet jsp a lanc? une exception
> The Struts dispatcher cannot be found.  This is usually caused by using 
> Struts tags without the associated filter. Struts tags are only usable 
> when the request has passed through its servlet filter, which 
> initializes the Struts dispatcher needed for this tag. - [unknown
> location]
>         at
> org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:60)
>         at 
> org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:52)
>         at 
> org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:49)
>         at 
> org.apache.jsp.pages.public_.pageLayout.pageLayout_jsp._jspx_meth_s_005furl_005f0(pageLayout_jsp.java:175)
>         at 
> org.apache.jsp.pages.public_.pageLayout.pageLayout_jsp._jspService(pageLayout_jsp.java:84)
>         at 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
>         at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
>         at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:590)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:505)
>         at 
> org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
>         at 
> org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:643)
>         at 
> org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:637)
>         at sun.reflect.GeneratedMethodAccessor95.invoke(Unknown Source)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.tiles.jsp.context.JspUtil.doInclude(JspUtil.java:87)
>         at 
> org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:88)
>         at 
> org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch(JspTilesRequestContext.java:82)
>         at 
> org.apache.tiles.context.TilesRequestContextWrapper.dispatch(TilesRequestContextWrapper.java:72)
>         at 
> org.apache.struts2.tiles.StrutsTilesRequestContext.dispatch(StrutsTilesRequestContext.java:86)
>         at 
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:417)
>         at 
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:368)
>         at 
> org.apache.tiles.jsp.taglib.InsertDefinitionTag.render(InsertDefinitionTag.java:63)
>         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.pages.errors.page404_jsp._jspx_meth_tiles_005finsertDefinition_005f0(page404_jsp.java:87)
>         at 
> org.apache.jsp.pages.errors.page404_jsp._jspService(page404_jsp.java:59)
>         at 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
>         at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
>         at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
>         at 
> org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:424)
>         at 
> org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:343)
>         at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:144)
>         at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
>         at 
> org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
>         at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>         at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
>         at 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>         at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
>         at 
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>         at java.lang.Thread.run(Thread.java:613)
> 12:09:26,053 INFO  [STDOUT] 12:09:26,052 ERROR [[jsp]] 
> "Servlet.service()" pour la servlet jsp a lanc? une exception
> The Struts dispatcher cannot be found.  This is usually caused by using 
> Struts tags without the associated filter. Struts tags are only usable 
> when the request has passed through its servlet filter, which 
> initializes the Struts dispatcher needed for this tag. - [unknown
> location]
>         at
> org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:60)
>         at 
> org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:52)
>         at 
> org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:49)
>         at 
> org.apache.jsp.pages.public_.pageLayout.pageLayout_jsp._jspx_meth_s_005furl_005f0(pageLayout_jsp.java:175)
>         at 
> org.apache.jsp.pages.public_.pageLayout.pageLayout_jsp._jspService(pageLayout_jsp.java:84)
>         at 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
>         at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
>         at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:590)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:505)
>         at 
> org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
>         at 
> org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:614)
>         at org.apache.tiles.jsp.context.JspUtil.doInclude(JspUtil.java:98)
>         at 
> org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:88)
>         at 
> org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch(JspTilesRequestContext.java:82)
>         at 
> org.apache.tiles.context.TilesRequestContextWrapper.dispatch(TilesRequestContextWrapper.java:72)
>         at 
> org.apache.struts2.tiles.StrutsTilesRequestContext.dispatch(StrutsTilesRequestContext.java:86)
>         at 
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:417)
>         at 
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:368)
>         at 
> org.apache.tiles.jsp.taglib.InsertDefinitionTag.render(InsertDefinitionTag.java:63)
>         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.pages.errors.page404_jsp._jspx_meth_tiles_005finsertDefinition_005f0(page404_jsp.java:87)
>         at 
> org.apache.jsp.pages.errors.page404_jsp._jspService(page404_jsp.java:59)
>         at 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
>         at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
>         at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
>         at 
> org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:424)
>         at 
> org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:343)
>         at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:144)
>         at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
>         at 
> org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
>         at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>         at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
>         at 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>         at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
>         at 
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>         at java.lang.Thread.run(Thread.java:613)
> 12:09:26,068 INFO  [STDOUT] 12:09:26,065 ERROR [JspTilesRequestContext] 
> JSPException while including path 
> '/pages/public/pageLayout/pageLayout.jsp'.
> javax.servlet.jsp.JspException: ServletException while including page.
>         at
> org.apache.tiles.jsp.context.JspUtil.doInclude(JspUtil.java:102)
>         at 
> org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:88)
>         at 
> org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch(JspTilesRequestContext.java:82)
>         at 
> org.apache.tiles.context.TilesRequestContextWrapper.dispatch(TilesRequestContextWrapper.java:72)
>         at 
> org.apache.struts2.tiles.StrutsTilesRequestContext.dispatch(StrutsTilesRequestContext.java:86)
>         at 
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:417)
>         at 
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:368)
>         at 
> org.apache.tiles.jsp.taglib.InsertDefinitionTag.render(InsertDefinitionTag.java:63)
>         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.pages.errors.page404_jsp._jspx_meth_tiles_005finsertDefinition_005f0(page404_jsp.java:87)
>         at 
> org.apache.jsp.pages.errors.page404_jsp._jspService(page404_jsp.java:59)
>         at 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
>         at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
>         at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
>         at 
> org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:424)
>         at 
> org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:343)
>         at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:144)
>         at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
>         at 
> org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
>         at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>         at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
>         at 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>         at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
>         at 
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>         at java.lang.Thread.run(Thread.java:613)
> Caused by: org.apache.jasper.JasperException: An exception occurred 
> processing JSP page /pages/public/pageLayout/pageLayout.jsp at line 24
> 
> 21:     <link rel="index" 
> href="http://www.oswd.org/files/designs/3465/CrystalX/" title="Home" />
> 22:    
> 23:     <link rel="stylesheet" media="screen,projection" type="text/css"
> 24:           href="<s:url 
> value="/pages/public/pageLayout/styles/main.css" />" />
> 25:    
> 26:     <link rel="stylesheet" media="print" type="text/css"
> 27:           href="<s:url 
> value="/pages/public/pageLayout/styles/print.css" />" />
> 
> 
> Stacktrace:
>         at 
> org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:518)
>         at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:429)
>         at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
>         at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:590)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:505)
>         at 
> org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
>         at 
> org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:614)
>         at org.apache.tiles.jsp.context.JspUtil.doInclude(JspUtil.java:98)
>         ... 35 more
> Caused by: The Struts dispatcher cannot be found.  This is usually 
> caused by using Struts tags without the associated filter. Struts tags 
> are only usable when the request has passed through its servlet filter, 
> which initializes the Struts dispatcher needed for this tag. - [unknown 
> location]
>         at
> org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:60)
>         at 
> org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:52)
>         at 
> org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:49)
>         at 
> org.apache.jsp.pages.public_.pageLayout.pageLayout_jsp._jspx_meth_s_005furl_005f0(pageLayout_jsp.java:175)
>         at 
> org.apache.jsp.pages.public_.pageLayout.pageLayout_jsp._jspService(pageLayout_jsp.java:84)
>         at 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
>         ... 46 more
> 12:09:26,097 INFO  [STDOUT] 12:09:26,096 ERROR [BasicTilesContainer] 
> Error rendering tile
> java.io.IOException: JSPException while including path 
> '/pages/public/pageLayout/pageLayout.jsp'. ServletException while 
> including page.
>         at 
> org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:91)
>         at 
> org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch(JspTilesRequestContext.java:82)
>         at 
> org.apache.tiles.context.TilesRequestContextWrapper.dispatch(TilesRequestContextWrapper.java:72)
>         at 
> org.apache.struts2.tiles.StrutsTilesRequestContext.dispatch(StrutsTilesRequestContext.java:86)
>         at 
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:417)
>         at 
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:368)
>         at 
> org.apache.tiles.jsp.taglib.InsertDefinitionTag.render(InsertDefinitionTag.java:63)
>         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.pages.errors.page404_jsp._jspx_meth_tiles_005finsertDefinition_005f0(page404_jsp.java:87)
>         at 
> org.apache.jsp.pages.errors.page404_jsp._jspService(page404_jsp.java:59)
>         at 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
>         at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
>         at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
>         at 
> org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:424)
>         at 
> org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:343)
>         at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:144)
>         at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
>         at 
> org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
>         at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>         at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
>         at 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>         at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
>         at 
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>         at java.lang.Thread.run(Thread.java:613)
> 12:09:26,098 INFO  [STDOUT] 12:09:26,098 ERROR [RoleSecurityTagSupport] 
> Error executing tag: JSPException while including path 
> '/pages/public/pageLayout/pageLayout.jsp'. ServletException while 
> including page.
> org.apache.tiles.TilesException: JSPException while including path 
> '/pages/public/pageLayout/pageLayout.jsp'. ServletException while 
> including page.
>         at 
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:425)
>         at 
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:368)
>         at 
> org.apache.tiles.jsp.taglib.InsertDefinitionTag.render(InsertDefinitionTag.java:63)
>         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.pages.errors.page404_jsp._jspx_meth_tiles_005finsertDefinition_005f0(page404_jsp.java:87)
>         at 
> org.apache.jsp.pages.errors.page404_jsp._jspService(page404_jsp.java:59)
>         at 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
>         at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
>         at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
>         at 
> org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:424)
>         at 
> org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:343)
>         at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:144)
>         at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
>         at 
> org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
>         at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>         at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
>         at 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>         at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
>         at 
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>         at java.lang.Thread.run(Thread.java:613)
> Caused by: java.io.IOException: JSPException while including path 
> '/pages/public/pageLayout/pageLayout.jsp'. ServletException while 
> including page.
>         at 
> org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:91)
>         at 
> org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch(JspTilesRequestContext.java:82)
>         at 
> org.apache.tiles.context.TilesRequestContextWrapper.dispatch(TilesRequestContextWrapper.java:72)
>         at 
> org.apache.struts2.tiles.StrutsTilesRequestContext.dispatch(StrutsTilesRequestContext.java:86)
>         at 
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:417)
>         ... 30 more
> 12:09:26,100 INFO  [STDOUT] 12:09:26,099 ERROR [RenderTagSupport] Error 
> during rendering
> javax.servlet.jsp.JspException: Error executing tag: JSPException while 
> including path '/pages/public/pageLayout/pageLayout.jsp'. 
> ServletException while including page.
>         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.pages.errors.page404_jsp._jspx_meth_tiles_005finsertDefinition_005f0(page404_jsp.java:87)
>         at 
> org.apache.jsp.pages.errors.page404_jsp._jspService(page404_jsp.java:59)
>         at 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
>         at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
>         at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
>         at 
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
>         at 
> org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:424)
>         at 
> org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:343)
>         at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:144)
>         at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
>         at 
> org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
>         at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>         at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
>         at 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>         at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
>         at 
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>         at java.lang.Thread.run(Thread.java:613)
> Caused by: org.apache.tiles.TilesException: JSPException while including 
> path '/pages/public/pageLayout/pageLayout.jsp'. ServletException while 
> including page.
>         at 
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:425)
>         at 
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:368)
>         at 
> org.apache.tiles.jsp.taglib.InsertDefinitionTag.render(InsertDefinitionTag.java:63)
>         at 
> org.apache.tiles.jsp.taglib.RenderTagSupport.execute(RenderTagSupport.java:171)
>         at 
> org.apache.tiles.jsp.taglib.RoleSecurityTagSupport.doEndTag(RoleSecurityTagSupport.java:75)
>         ... 26 more
> Caused by: java.io.IOException: JSPException while including path 
> '/pages/public/pageLayout/pageLayout.jsp'. ServletException while 
> including page.
>         at 
> org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:91)
>         at 
> org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch(JspTilesRequestContext.java:82)
>         at 
> org.apache.tiles.context.TilesRequestContextWrapper.dispatch(TilesRequestContextWrapper.java:72)
>         at 
> org.apache.struts2.tiles.StrutsTilesRequestContext.dispatch(StrutsTilesRequestContext.java:86)
>         at 
> org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:417)
>         ... 30 more
> 
> 
> But, if I manually enter the address of the error page in my browser 
> (http://localhost:8080/blog-0.0.1/pages/errors/page404.jsp) everything 
> is ok (no exceptions are generated).
> I've tried to replace the page404.jsp error page (in web.xml) with an 
> HTML page without struts 2 tags and the redirection works.
> So my error appear when I'm using struts 2 tags (for the moment only the 
> <s:url value="...."/> tag) in the error page and only if I do not access 
> "directly" to that error page (when a bad URL address is entered in the 
> browser).
> 
> Thanks for your help,
> 
> 
> Baptiste Gaillard
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Exception-when-tying-to-display-a-404-error-page.-tp13486643p17559063.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message