2015-07-06 170 views
0

在JSP渲染期間,我收到錯誤,指出無法初始化tile容器。 但是,我能夠呈現正常的JSP,但如果我使用瓷磚特定標籤獲取錯誤。TilesContainer未初始化

我使用 爲8.5 日食開普勒 的Java 7.0 所有必要的jar文件存在於我的lib文件夾中。

我的JSP:

<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %> 
<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 
<tiles:insertDefinition name="ToolbarBody"> 
<tiles:putAttribute name="documentTitle" value="findUser" type="string"></tiles:putAttribute> 
<tiles:putAttribute name="bodyarea" value="/WEB-INF/content/findUser_body.jsp" type="page"></tiles:putAttribute> 
<tiles:putAttribute name="menuarea" value="/WEB-INF/content/menu.jsp" type="page"></tiles:putAttribute> 
    </tiles:putAttribute> 
</tiles:insertDefinition> 

日誌:

000000df webapp  E com.ibm.ws.webcontainer.webapp.WebApp logError SRVE0293E: [Servlet Error]-[javax.servlet.jsp.JspException: TilesContainer not initialized]: com.ibm.ws.webcontainer.webapp.WebAppErrorReport: javax.servlet.jsp.JspException: TilesContainer not initialized 
     at com.ibm.ws.webcontainer.webapp.WebAppDispatcherContext.sendError(WebAppDispatcherContext.java:626) 
     at com.ibm.ws.webcontainer.webapp.WebAppDispatcherContext.sendError(WebAppDispatcherContext.java:656) 
     at com.ibm.ws.webcontainer.srt.SRTServletResponse.sendError(SRTServletResponse.java:1301) 
     at javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:127) 
     at net.sf.ehcache.constructs.web.GenericResponseWrapper.sendError(GenericResponseWrapper.java:104) 
     at org.apache.struts2.dispatcher.Dispatcher.sendError(Dispatcher.java:914) 
     at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:574) 
     at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77) 
     at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99) 
     at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195) 
     at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91) 
     at com.keane.util.FunctionAuditFilter.doFilter(FunctionAuditFilter.java:172) 
     at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195) 
     at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91) 
     at net.sf.ehcache.constructs.web.filter.GzipFilter.doFilter(GzipFilter.java:95) 
     at net.sf.ehcache.constructs.web.filter.Filter.doFilter(Filter.java:86) 
     at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195) 
     at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91) 
     at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:928) 
     at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1025) 
     at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3761) 
     at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304) 
     at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:976) 
     at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662) 
     at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200) 
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:459) 
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:526) 
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:312) 
     at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88) 
     at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175) 
     at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) 
     at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) 
     at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) 
     at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) 
     at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) 
     at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) 
     at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1862) 

的web.xml瓷磚映射

​​
+0

哪個S2版本?哪個瓷磚版本?顯示你的web.xml。 –

+0

\t 瓦片 \t org.apache.tiles.web.startup.TilesServlet \t \t ​​ \t有機apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG \t \t \t /WEB-INF/tiles-defs.xml \t \t \t 5 \t

+0

Struts和Tiles集成通過插件連線。 –

回答

0

這可能會幫助你得到你的錯誤一些瞭解。

    在瓦片-defs.xml
  1. 不正確/缺少DTD參考在瓦片-defs.xml
  2. 不正確/缺少XML元素缺少retrotranslator-運行時nnnjar在WEB-INF/lib中

    -Sandeep Seshan的對數

More Details