struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prakash Inuganti -X \(pinugant - Digital-X, Inc. at Cisco\)" <>
Subject Cannot find bean countDetails in any scope
Date Thu, 02 Nov 2006 12:49:57 GMT

I am a newbie to struts and trying to figure out a way to solve the
problem "Cannot find bean countDetails in any scope" I am getting when
trying to show an error when first option in select box is chosen. I
have an action class that reads data from database and populates in the
jsp. Then on this page, I have a select box and if user doesn't make a
selection, I should display an error. I am providing the classes, jsp
and struts-config.xml below
public class ExsHomeAction extends Action {
	public ActionForward execute(ActionMapping mapping, ActionForm
			HttpServletRequest request, HttpServletResponse
			throws Exception {
		ExsStatesCount excnt = new ExsStatesCount();
		HashMap counts = excnt.getStateCounts(); 
		request.setAttribute("countDetails", counts);
		return (mapping.findForward("home"));


<bean:define id="counts"  name="countDetails" property="Counts"/>
<html:form action="/ExsProduct">
<logic:greaterThan value="0" name="counts" property="draft">
<TR><TD><bean:message key="home.draft"/></TD><TD
align="right"><bean:write name="counts" property="draft"/></TD></TR>
<html:select property="committype" tabindex="1">
<html:option value ="Select One">Select One</html:option>
<html:option value ="IB">IB</html:option>
<html:option value="RFPwPID">RFPwPID</html:option>
<html:errors />
<html:submit><bean:message key="home.submit"/></html:submit>


    <form-bean name="exsHomeForm" type="xxx.request.ExsHomeForm"/>
    <form-bean name="exsProductForm"
    <forward name="/Home" path="/tiles/ExsHome.jsp"/>
    <action path="/Home" type="xxx.request.ExsHomeAction"
scope="request" >
      <forward name="home" path="exs.home"/>
    <action path="/ExsProduct" name="exsProductForm"
type="xxx.request.product.ExsProductAction" scope="session"
      <forward name="product" path="exs.product"/>

The home page displays properly when I try
http://localhost:8080/Support/ Now in the displayed form, If I
choose 'Select One' and click submit, I am trying to display error but
it throws error javax.servlet.ServletException: Cannot find bean
countDetails in any scope 

If I choose other options, I am able to proceed to next screen without
issue. Any help is greatly appreciated.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message