| Author |
Cannot find bean: " in any scope
|
Pradeep
Ranch Hand
Joined: Sep 19, 2006
Posts: 49
|
|
i got following error javax.servlet.ServletException: Cannot find bean: "displaySharesToFundForm" in any scope and my action class is public class DisplaySharesToFundAction extends AbstractBaseAction{ public ActionForward process(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response) throws Throwable{ DisplaySharesToFundForm displaySharesToFundForm = (DisplaySharesToFundForm)form; SharesToFundValidationHelper sharesToFundValidationHelper = new SharesToFundValidationHelper(); HttpSession session = request.getSession(false); ArrayList shareTypeList = (ArrayList)TypeCodeTableHelper.getInstance().getTypeCodeList(KMSConstants.SHARE_TYPE);; displaySharesToFundForm.setShareTypeList(shareTypeList); ArrayList currencyList = (ArrayList)TypeCodeTableHelper.getInstance().getTypeCodeList(KMSConstants.BASE_CURRENCY);; displaySharesToFundForm.setCurrencyList(currencyList); session.setAttribute("CurrencyList",displaySharesToFundForm .getCurrencyList()); session.setAttribute("ShareTypeList",displaySharesToFundForm .getShareTypeList()); return null; } } please help thanks in advance
|
 |
sridhar ravi
Greenhorn
Joined: Aug 24, 2006
Posts: 3
|
|
Hi, Check whether displaySharesToFundForm this name is matched with struts-config.xml entry i both <form-bean> and <action-mapping> if it is ok then check in jsp <form > tag whether name is mentioned and type is pointing to the form name path. Thank & Regards Ravi.
|
 |
Merrill Higginson
Ranch Hand
Joined: Feb 15, 2005
Posts: 4864
|
|
This message is being thrown by Struts as it's trying to process your JSP. It's saying you've referred to a bean named displaySharesToFundForm that doesn't exist. Struts will only instantiate the bean associated with the action. So, if you have an html:form tag with action="myAction", when you define the mapping for "myAction", you must specify "displaySharesToFundForm" as the name associated with that action. If you still can't find the problem, show us your JSP, and the relevant portions of your struts-config.xml file. Showing us the code in your Action class doesn't help.
|
Merrill
Consultant, Sima Solutions
|
 |
 |
|
|
subject: Cannot find bean: " in any scope
|
|
|