Cannot retrieve mapping for action /hello看看你的配置文件

解决方案 »

  1.   

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"><struts-config>
      <data-sources />
      <form-beans >  
    <form-bean name="HelloActionForm" type="com.hello.struts.form.HelloActionForm" />
      </form-beans>
      <global-exceptions />
      <global-forwards />
      <action-mappings >
    <action name="HelloActionForm"
    path="/hello.do" 
    scope="request"
    validate="true"
    input="hello.jsp"
    type="com.hello.struts.action.HelloAction">
          <forward name="hello" path="hello.jsp" />
        </action>
      </action-mappings>
      <message-resources parameter="com.hello.struts.Application" />
    </struts-config>
      

  2.   

    <action name="HelloActionForm"
    path="/hello.do" 
    ...........
    ------------------
    改成
    <action name="HelloActionForm"
    path="/hello" 
    ..........看看
      

  3.   

    你的web.xml里对ActionServlet的配制应该是*.do,所以在form里的action应该对应action里配制的path="/hello" 后面加个.do