Struts - Tile Error Please Help me
843836Mar 2 2004 — edited Mar 2 2004Hai all
i just using Tiles in my program
i added tile in ActionServlet and i wrotte following in tiles-defs.xml
<definition name="homeLayout" path="/layouts/home.jsp">
<put name="title" value="GKB Forums" />
<put name="header" value="/pages/header.jsp" />
<put name="footer" value="/pages/footer.jsp" />
<put name="body" value="/pages/login.jsp" />
</definition>
and i designed layout file /layouts/home.jsp.
i created file userdesktop.jsp and i added
in first time i tryed to call directly the layout file like
<tiles:insert page="/layouts/desktop.jsp" flush="true">
<tiles:put name="title" value="My Desktop" />
<tiles:put name="header" value="/pages/header.jsp" />
<tiles:put name="footer" value="/pages/footer.jsp" />
<tiles:put name="body" value="/pages/login.jsp" />
</tiles:insert>
it worked fine
when i used xml and calling file
javax.servlet.ServletException: Can't get definitions factory from context.
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
org.apache.jsp.pages.userdesktop_jsp._jspService(userdesktop_jsp.java:67)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1014)
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:257)
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:417)
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:300)
org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:390)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:271)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
root cause
javax.servlet.jsp.JspException: Can't get definitions factory from context.
org.apache.struts.taglib.tiles.InsertTag.processDefinitionName(InsertTag.java:616)
org.apache.struts.taglib.tiles.InsertTag.createTagHandler(InsertTag.java:503)
org.apache.struts.taglib.tiles.InsertTag.doStartTag(InsertTag.java:460)
org.apache.jsp.pages.userdesktop_jsp._jspx_meth_tiles_insert_0(userdesktop_jsp.java:82)
org.apache.jsp.pages.userdesktop_jsp._jspService(userdesktop_jsp.java:59)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1014)
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:257)
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:417)
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:300)
org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:390)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:271)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
when i included following tile in userdesktop.jsp
<tiles:insert definition="homeLayout" >
<tiles:put name="title" type="string" value="My Desktop" />
<tiles:put name="header" value="/pages/header.jsp" />
<tiles:put name="footer" value="/pages/footer.jsp" />
<tiles:put name="body" value="/pages/login.jsp" />
</tiles:insert>
then above error displays
please help me why