tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vernon <vwu...@yahoo.com>
Subject Error during using a view preparer
Date Tue, 04 Mar 2008 06:15:45 GMT
The definition:

    <definition name="directory.categories"
extends="template2">
        <put-attribute name="title"    
value="Business Categories"/>
        <put-attribute name="content" 
value="/WEB-INF/jsp/directory/categories/content.jsp"
type="template"/>
        <put-attribute name="menu"     
value="/WEB-INF/jsp/directory/categories/menu.jsp"
type="template"/>
        <put-attribute name="new_items"
value="new_entries" 
type="definition"/>
        <put-attribute name="hnav"     
value="/WEB-INF/jsp/directory/hnav.jsp"
type="template"/>
    </definition>

    <definition name="new_entries" 
template="/WEB-INF/jsp/directory/categories/new_entries.jsp"

preparer="com.abc.xyz.web.directory.NewEntriesPreparer">
        <put-attribute name="size" value="50"/>
    </definition>

And the preparer class:

package com.abc.xyz.web.directory;

import org.apache.tiles.Attribute;
import org.apache.tiles.AttributeContext;
import org.apache.tiles.context.TilesRequestContext;
import org.apache.tiles.preparer.PreparerException;
import org.apache.tiles.preparer.ViewPreparer;
import
org.springframework.beans.factory.annotation.Autowired;

public class NewEntriesPreparer implements
ViewPreparer {

    @Autowired
    private    ... ;
   

    public void execute(TilesRequestContext
tilesContext, 
AttributeContext attributeContext)
    throws PreparerException {

        attributeContext.putAttribute("entries", new
Attribute(...));  
    }

}

I get the following exception:

ERROR
org.apache.tiles.jsp.taglib.RenderTagSupport.doCatch:152
- Error 
during rendering
javax.servlet.jsp.JspException: Error executing tag:
No bean named 
'com.abc.xyz.web.directory.NewEntriesPreparer' is
defined
    at 
org.apache.tiles.jsp.taglib.RoleSecurityTagSupport.doEndTag(RoleSecurityTagSupport.java:80)
    at 
org.apache.tiles.jsp.taglib.ContainerTagSupport.doEndTag(ContainerTagSupport.java:80)
    at 
org.apache.jsp.WEB_002dINF.jsp.template.main2_jsp._jspx_meth_tiles_insertAttribute_3(main2_jsp.java:571)
    at 
org.apache.jsp.WEB_002dINF.jsp.template.main2_jsp._jspService(main2_jsp.java:186)
    at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
    at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
    at 
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
    at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
    at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
    at 
org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(ServletTilesRequestContext.java:198)
    at 
org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(ServletTilesRequestContext.java:185)
    at 
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:419)
    at 
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:370)

I can't find any document nor example on how to
resolve this problem. 
What I don't do right here?

Thanks for your help.

Vernon


      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ



Mime
View raw message