struts-config.xml中
<form-beans>
<form-bean name="addEmpActionForm" type="com.iss.ipolicy.demo.actionform.AddEmpActionForm"/>
</form-beans>

<action-mappings>
        <action path="/addEmp" name="addEmpActionForm" scope="request" type ="org.springframework.web.struts.DelegatingActionProxy" >
           <forward name="success" path="/add_success.jsp"/>
        </action>
</action-mappings>


<controller inputForward="true" processorClass="org.springframework.web.struts.DelegatingRequestProcessor"/>
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">  
      <set-property property="contextConfigLocation" value="/WEB-INF/applicationContext.xml" />  
    </plug-in>applicationContext.xml中
<bean name="/addEmp" class="com.iss.ipolicy.demo.action.AddEmpAction"/>这样配不对吗?
actionform里总是空的。

解决方案 »

  1.   

    type ="org.springframework.web.struts.DelegatingActionProxy"  这个不用写。
    你的actionform里面有定义属性吗。
    还有就是你的页面的<html:form action是不是写的/addEmp
      

  2.   

    form里的action写的是addEmp.do 
    属性名也都用小写定义了  getter和setter有了。
      

  3.   

    早上来启动MYECLIPSE 
    把form的addEmp.do 改成/addEmp,结果不行,又改回来。这下可以了晕 。。这是怎么回事。。我只做了2个动作   
    1)重启MYECLIPSE
    2) 把form的addEmp.do 改成/addEmp又改回addEmp.do。
      

  4.   

    没自动编译呗,改希姆莱文件和bean的话,要重新编译!
      

  5.   

    Build  Automatically 已经打钩了 应该怎么样设置,每次启动tomcat就自动编译?
      

  6.   

    有时候需要clean一下,o(∩_∩)o...哈哈