tiles框架问题 着急 在线等 求求所有高手 我着急啊
我在WEB.XML中配置了:
<!-- tiles框架 -->
<taglib>
<taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
</taglib>
在STRUTS-CONFIG.XML中配置了:
<plug-in className="org.apache.struts.tiles.TilesPlugin">
<set-property property="definitions-config" value="/WEB-INF/tiles-definitions.xml"/>
</plug-in>
在tiles-definitions.xml中:
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
<tiles-definitions>
<definition name="index" page="Layout.jsp">
<put name="Header" value="Header.jsp"></put>
<put name="Footer" value="Footer.jsp"></put>
<put name="Left" value="Left.jsp"></put>
<put name="Center" value="Center.jsp"></put>
</definition>
</tiles-definitions>
Layout.jsp中有:
<table border="1xp" width="100%" height="100%">
<tr><td rowspan="3" width="10%"><tiles:insert attribute="Left"></tiles:insert></td><td height="10%"><tiles:insert attribute="Header"></tiles:insert></td></tr>
<tr><td ><tiles:insert attribute="Center"></tiles:insert></td></tr>
<tr><td height="10%"><tiles:insert attribute="Footer"></tiles:insert></td></tr>
</table>
那么请问!为什么会在访问Layout.jsp的时候报以下错误???!!
org.apache.jasper.JasperException org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
java.lang.NullPointerException org.apache.struts.taglib.tiles.InsertTag.processAttribute(InsertTag.java:689)
org.apache.struts.taglib.tiles.InsertTag.createTagHandler(InsertTag.java:489)
org.apache.struts.taglib.tiles.InsertTag.doStartTag(InsertTag.java:451)
org.apache.jsp.layout_jsp._jspx_meth_tiles_insert_0(layout_jsp.java:177)
org.apache.jsp.layout_jsp._jspx_meth_html_html_0(layout_jsp.java:120)
org.apache.jsp.layout_jsp._jspService(layout_jsp.java:68)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
------解决方案--------------------
看你急的,帮顶