Struts Tiles Problem - Can't get definitions factory from context.

spivee_at_excite.com
Date: 03/10/05


Date: 10 Mar 2005 09:11:05 -0800

This is a common error, as I have found from searching for a solution.
Unfortunately, I haven't been able to find anything that helped me fix
my problem. I'm running struts 1.2 on windows XP with Tomcat 5.5.7.

I've been working on this for a while, but haven't gotten anywhere. I
chopped it down to a minimum. index.jsp works fine unless there is a
tile reference, in which case it throws the exception.

I do have the tiles.jar file in my WEB-INF/lib folder. The taglib
location on the webpages is correct. The location of the
struts-tile-defs.xml file is correct in the plugin.

Here is what I have so far..

----> PLUGIN from struts-config.xml

   <plug-in className="org.apache.struts.tiles.TilesPlugin" >
      <set-property property="definitions-config"
value="/WEB-INF/configs/struts-tile-defs.xml" />
      <set-property property="definitions-debug" value="2" />
      <set-property property="definitions-parser-details" value="2" />
      <set-property property="definitions-parser-validate" value="true"
/>
      <set-property property="moduleAware" value="true" />
   </plug-in>

----> JSP Page index.jsp...

<%@ page language="java"%>
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html:html locale="true">
  <head>
    <html:base />
     <tiles:insert definition="page.default" />
</html:html>

----> struts-tile-defs.xml file entry for page.default

<definition name="page.default"
path="/WEB-INF/pages/layouts/defaultlayout.jsp" />

----> defaultlayout.jsp

<%@ page language="java"%>
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html:html locale="true">
  <table border="0" width="80%">
    Start Page
  </table>
</html:html>

----> The Exception..

javax.servlet.ServletException: Can't get definitions factory from
context.
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:846)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.WEB_002dINF.pages.index_jsp._jspService(org.apache.jsp.WEB_002dINF.pages.index_jsp:86)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause
javax.servlet.jsp.JspException: Can't get definitions factory from
context.
org.apache.struts.taglib.tiles.InsertTag.processDefinitionName(InsertTag.java:583)
org.apache.struts.taglib.tiles.InsertTag.createTagHandler(InsertTag.java:487)
org.apache.struts.taglib.tiles.InsertTag.doStartTag(InsertTag.java:451)
org.apache.jsp.WEB_002dINF.pages.index_jsp._jspx_meth_tiles_insert_0(org.apache.jsp.WEB_002dINF.pages.index_jsp:162)
org.apache.jsp.WEB_002dINF.pages.index_jsp._jspx_meth_html_html_0(org.apache.jsp.WEB_002dINF.pages.index_jsp:123)
org.apache.jsp.WEB_002dINF.pages.index_jsp._jspService(org.apache.jsp.WEB_002dINF.pages.index_jsp:77)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



Relevant Pages

  • Re: How to find if opened Recordsets are closed properly?
    ... > I have tried TextPad, searching through all of the ... One approach might be to write a generic subroutine to perform the .source ... Ifthe code, as written, is well structured, this might be a reasonable ... them as a string concatenating with their correspondent object and context making a sort of a unique key for later finding the related ".close" methods appling the same contextualization. ...
    (microsoft.public.scripting.vbscript)
  • Re: Is it worth collecting rare CDs?
    ... Then speed is not an issue for the shelf method or the iTunes method. ... Second of all, I like context. ... searching for specific files, just as I like going up to a specific CD ...
    (rec.music.classical.recordings)
  • Re: Bat File Options Missing
    ... Great info, Wes. ... > click context menu. ... the fix doesn't remove what should not be ... >>> download is a REG file, ...
    (microsoft.public.windowsxp.general)
  • Re: SElinux
    ... similar denials requires quite a bit of knowledge and analysis. ... help identify what needs to be changed to fix any particular denial. ... Should executables with this type always be ... Does the target file have the wrong context, and if so, ...
    (Fedora)
  • pull request: wireless-2.6 2009-10-13
    ... context problem, a related documentation change, and a minor build ... fix logic error ibss merge bssid check ... single hardware. ...
    (Linux-Kernel)