my dog learned polymorphism
The moose likes Struts and the fly likes Cannot Find bean under name productInfo in jsp struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Cannot Find bean under name productInfo in jsp struts" Watch "Cannot Find bean under name productInfo in jsp struts" New topic

Cannot Find bean under name productInfo in jsp struts

Santhosh KumarS

Joined: Feb 14, 2007
Posts: 1
Hi Forum,

Im doing a project using struts and jsp in eclipse.
My problem is, i have two select box(Combo box), if i select a data i.e clientName from second select box, corresponding productName

should be displayed in first select box..

Here for me, second select box is working properly but the problem is with the first select box, im getting following errors..

org.apache.jasper.JasperException: Cannot find bean under name productInfo
Root Cause:<CODE>
Root Cause:<CODE>
<QUOTE>What i am doing in my program is, as you see below my code,

When the user selects the clientName from second select box, i am dispatching a message named "select" from the

"". Then map.findForward function forwards to
In i have written the code to get the data from the database and i have set the attribute Arraylist

productInfo, which has the data in session scope.And one more thing there is no problem in fetching the data from the database

into productInfo arraylist. </QUOTE>
I dont understand where i am doing wrong..please help me...
Thanks in advance..


return map.findForward((String)tForm.getDispatch());

ArrayList productInfo = new ArrayList();
if(ProIdYear != null){
productInfo = bService.getProductName(ProIdYear);

session.setAttribute("productInfo", productInfo);

(First Selectbox: to select the productName)

<html:select property="projectSelection" style="WIDTH: 290px;" onklick="copyText()" onshange="copyText()" >
<html ptions collection="productInfo" property="productClass" labelProperty ="productName" />

(Second SelectBox: to select the clientName)

<html:select property="clientName1" style="WIDTH: 170px;" onshange=document.forms[0].projectSelection[0].selected='1';

document.forms['TourokuForm'].dispatch.value='select';document.forms[0].submit();" >
<html ptions collection="clientInfo" property="clientId" labelProperty="description"/>


<action path="/TourokuAction" type="login.web.action.TourokuAction"
name="TourokuForm" scope="session" input = "/pages/output.jsp">
<forward name="select" path="/" />
<forward name="success" path="/pages/success.jsp" redirect = "false" />
<forward name="failure" path="/pages/Failure.jsp" redirect = "false" />

<action path="/select" type="login.web.action.SetTourokuAction"
name="TourokuForm" scope="request" validate="true" input = "/pages/output.jsp">
<forward name="success" path="/pages/output.jsp" redirect = "false" />
<forward name="failure" path="/pages/Failure.jsp" redirect = "false" />

I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Cannot Find bean under name productInfo in jsp struts
It's not a secret anymore!