---
title: "Cannot find bean XXXForm in any scope"
author: "wangyanlong0107"
date: "2012-06-15T13:43:26Z"
tags: []
categories: ["企业架构"]
slug: "cannot-find-bean-xxxform-in-any-scope"
draft: false
lastmod: "2012-06-15T13:43:26Z"
id: 1561569
url: "https://bigdragon.iteye.com/blog/1561569"
---

action-mappings &gt;  
    &lt;action  
      attribute="calcForm"  
      input="/form/calc.jsp"  
      name="calcForm"  
      path="/calc"  
      scope="request"  
      type="com.yourcompany.struts.action.CalcAction"&gt;  
      &lt;forward name="result" path="/result.jsp" /&gt;  
    &lt;/action&gt;

原来实例化对象的名字叫“calcForm”，而我将jsp页面的form首字母大写了CalcForm，故造成错误。

也就是说，**&lt;bean:write name="CalcForm" property="result"/&gt;里用到的实例化对象和配置文件里的实例化对象不匹配造成此错误的！**