action="/insertFesDisAction.do"是不是路径写错了

解决方案 »

  1.   

    其他的.do成功过吗?
    type="com.suntek.chargeterm.Actions.insertFesDisAction  /路径,名字大小写是否一样
    input="/dbform_view/Discount/Fesdisconf.jsp        //有无?
      

  2.   

    web.xml:因该还有一段  <servlet>
        <servlet-name>action</servlet-name>
        <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
        <init-param>
          <param-name>config</param-name>
          <param-value>
          /WEB-INF/struts-config.xml
          </param-value>
        </init-param>
        <init-param>
          <param-name>debug</param-name>
          <param-value>3</param-value>
        </init-param>
        <init-param>
          <param-name>detail</param-name>
          <param-value>3</param-value>
        </init-param>
        <load-on-startup>0</load-on-startup>
      </servlet>
      

  3.   

    action="/insertFesDisAction.do"
    改成
    action="insertFesDisAction.do"
    你试一下
      

  4.   

    往往是action的路径设置有误,或者是classpath设置不全,多试一试就知道了。
      

  5.   

    ----------------------其他的.do成功过吗?
    type="com.suntek.chargeterm.Actions.insertFesDisAction  /路径,名字大小写是否一样
    input="/dbform_view/Discount/Fesdisconf.jsp        //有无?----------------------
    回复上面的,刚开始不一样,后来改成type="com.suntek.chargeterm.Actions.InsertFesDisAction大小写一样了,但是还是找不到.do
      

  6.   

    ========== Fesdisconf.jsp ====================
    .......
    <form name="fesdiscount" method="POST" action="/insertFesDisAction.do">
    ......
    </form>
    ==============================================
    action="insertFesDisAction.do"
    你看看
      

  7.   

    不写formbean万万不行,写个吧,至少要个动态的
    for example
    <form-bean name = "testvalform"
    type = "org.apache.struts.validator.DynaValidatorForm"> 
    <form-property name="username" type="java.lang.String"/>
    <form-property name="password" type="java.lang.String"/>
    </form-bean>  
    参考,参考
      

  8.   

    对应:
    <form-bean name = "fesdiscount"
    type = "org.apache.struts.validator.DynaValidatorForm"> 
    <form-property name="username" type="java.lang.String"/>
    <form-property name="password" type="java.lang.String"/>
    </form-bean>  
      

  9.   


    ========== Fesdisconf.jsp ====================
    .......
    <form name="fesdiscount" method="POST" action="/insertFesDisAction.do">
    ......
    </form>
    ==============================================
    action="insertFesDisAction.do"
    你看看如果.do配置路径和jsp路径是一致的,如上是完全可以的,
    否则要写全路径,包括web项目名称
      

  10.   

    问题是这样的:
        <form name="fesdiscount" method="POST" action="/insertFesDisAction.do">
            ......
        </form>
        如果你用的是struts标签<html:form/>,action="/insertFesDisAction.do"没问题,因为ActionServlet会为其加上web上下文,但你用的不是struts的<html:form/>标签,那你应在action="/insertFesDisAction.do"里加上上下文,如:
        <form name="fesdiscount" method="POST" action="/myWeb/insertFesDisAction.do">
            ......
        </form>
    其中myWeb是你的web上下文.
      

  11.   

    确认你的相关代码是正确的。
    同意nlhlx(胡) 的观点,你检查一下你的标签是不是<html:form/>
    另外sun113(学生)完全就是在胡说,Action完全可以没有Formbean
      

  12.   

    ========== Fesdisconf.jsp ====================
    .......
    <form name="fesdiscount" method="POST" action="/insertFesDisAction.do">
    ......
    </form>这里写错了 
    action="/insertFesDisAction.do"> 多了 “/”
    改为
    action="insertFesDisAction.do"
      

  13.   

    如上所述问题出在action的path上,在struts-config web.xml,或者action/jsp/servlet这些运行在服务器上的路径是context-relative的。在<html:form>生成html代码的时候,会自动添加context path而HTML却不是,你写的是静态的html却写的是“绝对”路径(无服务器地址:端口),这个时候需要context path,或者索性使用相对路径
      

  14.   

    wo bushi gu yi de ,
    我今天试过了可以不用actionForm
    对不起