1. The error message:

root cause

javax.servlet.ServletException: Can't get definitions factory from context.
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:533)
at org.apache.jsp.page_jsp._jspService(page_jsp.java:189)


2. The translated JSP file

public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {


   JspFactory _jspxFactory = null;
   javax.servlet.jsp.PageContext pageContext = null;
   HttpSession session = null;
   ServletContext application = null;
   ServletConfig config = null;
   JspWriter out = null;
   Object page = this;
   JspWriter _jspx_out = null;


try { _jspxFactory = JspFactory.getDefaultFactory(); response.setContentType("text/html;charset=ISO-8859-1"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out;

out.write("\r\n");
out.write("\r\n");
out.write("\r\n\r\n");
if (_jspx_meth_c_if_0(pageContext))
return;
out.write("\r\n");
if (_jspx_meth_c_if_1(pageContext))
return;
// ...
out.write("\r\n");
if (_jspx_meth_c_if_37(pageContext))
return;
out.write("\r\n\r\n\r\n\r\n\r\n\r\n\r\n");
out.write("\r\n\r\n");
if (_jspx_meth_tiles_insert_0(pageContext))
return;
} catch (Throwable t) {
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (pageContext != null) pageContext.handlePageException(t); <---- line 189
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
}
3. The JSP file with the definitions


<%@ taglib prefix="tiles" uri="/WEB-INF/tlds/struts-tiles.tld" %>
<%@ taglib prefix="c" uri="/WEB-INF/tlds/c.tld" %>

<c:if test="${empty applicationScope.FRONT}">
   <tiles:definition id="FRONT" template="/jsp/templates/myLayout.jsp">
       <put name="title"  value="Front Page" />
       <put name="header" value="/jsp/signon/header.jsp" />
       <put name="footer" value="/jsp/homepage/footer.jsp" />
       <put name="body"   value="/jsp/frontpage/content.jsp" />
   </tiles:definition>
</c:if>
<c:if test="${empty applicationScope.SIGNON}">
   <tiles:definition id="SIGNON" extends="FRONT">
       <put name="title"  value="Sign On" />
       <put name="body"   value="/jsp/signon/content.jsp" />
   </tiles:definition>
</c:if>
<!--

....
-->

If I erase all defintions, but keep the first one, the attributes wouldn't loaded.

The Tiles is from http://www.lifl.fr/~dumoulin/tiles/.

I don't have any JSP debugging tool. Can someone please tell me where is wrong or how to find out the cause.

Vernon

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to