javax.servlet.jsp.JspException: Exception creating bean of class web.CardAddForm: {1}
at org.apache.struts.taglib.html.FormTag.initFormBean(FormTag.java:515)
at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:482)spring里的配置
<bean name="/cardView" class="web.CardAction">
<property name="cardService">
<ref bean="cardService" />
</property> </bean>
<bean name="/cardAdd" class="web.CardAction" >
<property name="cardService">
<ref bean="cardService"></ref>
</property>
</bean>
struts配置
  <form-bean name="cardAddForm" type="web.CardAddForm" />
<action
      attribute="cardAddForm"
      input="/cardAdd.jsp"
      name="cardAddForm"
      
      path="/cardAdd"
      scope="request"
      type="org.springframework.web.struts.DelegatingActionProxy"
     
      cancellable="true" />

解决方案 »

  1.   

    public class CardAction extends DispatchActionSupport{
    public ActionForward cardView(ActionMapping mapping, ActionForm form,
    HttpServletRequest request, HttpServletResponse response) 
    public ActionForward cardAdd(ActionMapping mapping, ActionForm form,
    HttpServletRequest request, HttpServletResponse response) 
      

  2.   

    如果想想用这个action的话,配置文件中要配置parmater这个属性
      

  3.   

    具体报错的是 <html:form action="cardAdd" method="post" >
    还没进入action 呢。。你想说加 parameter="method" 我没让action对应多个form的没的问题。。
      

  4.   

    采用代理action继承dispatchAction 对不 还是要继承dispatchActionSupport
      

  5.   

    结贴myeclipse重启 没问题了。整哭我了 浪费我2h 还好是学习。。