Hi,

The "Cannot find bean org.apache.struts.taglib.html.BEAN in any scope' error is usually caused by a struts tag which doesn't find its needed bean. For example it can be caused by a <html:form ...> tag. Do you have such tag in "c_search_form.jsp" ? I suppose the answer is yes.
The beans needed by struts tags are set in appropriate context by the struts RequestProcessor, which is called automatically when you hit an struts action address (*.do).
To be short, to use a struts html tag, you need to go throw a struts action. So, if your "c_search_form.jsp" page have such tag, you need to access it throw an associated struts action which then forward to the jsp.
Then, you specify the action URL in the tiles definition instead of the jsp url.

Cedric


Juri Smarschevski wrote:

hi all,

have a problem with tile's scopes. (struts-1.1-b2)

my simple tiles structure looks as follows:
[tiles-defs.xml]
<definition name="mainLayout" path="/WEB-INF/tiles/layout_main.jsp">
<put name="title" value="Sample Page Title" type="string" />
<put name="header" value="/WEB-INF/tiles/header.jsp" />
<put name="js_header" value="" />
<put name="menu" value="/WEB-INF/tiles/menu.jsp" />
<put name="body" value="/WEB-INF/tiles/body.jsp" />
<put name="footer" value="/WEB-INF/tiles/footer.jsp" />
</definition>

<definition name="searchAlb" extends="mainLayout">
<put name="body" value="searchAlb.body" />
</definition>

<definition name="searchAlb.body"
path="/WEB-INF/tiles/layout_search_alb_body.jsp">
<put name="search_form" value="/WEB-INF/contents/c_search_form.jsp" />
<!-- etc. -->
</definition>


[layout_search_alb_body.jsp]
<%@ taglib uri="/tags/struts-tiles" prefix="tiles" %>
<tiles:get name="search_form"/>

[c_search_form.jsp]
<%@ taglib uri="/tags/struts-tiles" prefix="tiles" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<center>hi from search form</center>

the called jsp-page is [alb_search.jsp]
<%@ taglib uri="/tags/struts-tiles" prefix="tiles" %>
<tiles:insert definition="searchAlb" flush="true"/>

and the c_search_form.jsp throws the exception
[ServletException in:/WEB-INF/contents/c_search_form.jsp] Cannot find
bean org.apache.struts.taglib.html.BEAN in any scope'
cause by the line
<%@ taglib uri="/tags/struts-html" prefix="html" %>

Any ideas why ? Have I (can I) to define a scope in the tiles
definitions ?
The http://jakarta.apache.org/struts/userGuide/struts-tiles.htm
did not help me at this point. Any RTFM-links are welcome ;-)

thx in advance and regards,
juri







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



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

Reply via email to