问答详情
源自:4-3 配置Action,Service,Dao的类-Struts2整合Spring

404!!

HTTP Status 404 - /ssh1/product_save.action

type Status report

message /ssh1/product_save.action

description The requested resource is not available.


提问者:慕田峪5126163 2017-11-24 16:12

个回答

  • 慕田峪5126163
    2017-11-27 11:32:11

    <head>

    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

    <title>Insert title here</title>

    </head>

    <body>

    <h1>保存商品的页面</h1>

    <s:form action="product_save"  method="post"  namespace="/"   theme="simple">

    <table>

    <tr>

    <td>商品名称</td>

    <td><s:textfield name="pname"/></td>

    </tr>

    <tr>

    <td>商品价格</td>

    <td><s:textfield name="price"/></td>

    </tr>

    <tr>

    <td colspan=2><input type="submit"  value="提交"/></td>

    </tr>

    </table>

    </s:form>

    </body>


  • 慕田峪5126163
    2017-11-27 11:30:32

    <?xml version="1.0" encoding="UTF-8"?>

     <!DOCTYPE struts PUBLIC

    "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"

    "http://struts.apache.org/dtds/struts-2.3.dtd">

    <struts>

    <package name="ssh1" extends="struts-default" namespace="/">

    <action name="product_*" method="{1}"  class="productAction">

    <result></result>

    </action>

    </package>

    </struts>


  • 慕数据9135882
    2017-11-26 22:20:46

    看你页面和struts.xml配置