敬的世界

          導航

          <2012年2月>
          2930311234
          567891011
          12131415161718
          19202122232425
          26272829123
          45678910

          留言簿(7)

          隨筆分類(21)

          文章分類

          收藏夾

          隨筆檔案(49)

          文章檔案(4)

          閱讀排行榜

          評論排行榜

          常用鏈接

          統計

          最新評論

          解決ServletUrlRenderer WARN警告

          posted on 2012-02-09 12:42 picture talk 閱讀(2751) 評論(1)  編輯  收藏 所屬分類: Javastruts

          評論

          # re: 解決ServletUrlRenderer WARN警告 2012-02-09 12:43 picture talk

          解決ServletUrlRenderer WARN警告:
          [org.apache.struts2.components.ServletUrlRenderer:http-8000-1:45] - No configuration found for the specified action: 'sums' in namespace: '/example'. Form action defaulting to 'action' attribute's literal value.

          struts.xml配置:



          Java代碼
          1.<package name="Library" namespace="/example" extends="struts-default">
          2. <action name="sum" class="example.HelloWorld">
          3. <result name="positive">positive.jsp</result>
          4. <result name="nagative">nagative.jsp</result>
          5. </action>
          6.</package>


          2.jsp頁面



          Java代碼
          1.<s:form action="sum" namespace="/example" >
          2. <s:textfield name="counta" label=" 操作數1"/>
          3. <s:textfield name="countb" label=" 操作數2" />
          4. <s:submit value="代數和" />
          5.</s:form>

          namespace,action確定
            回復  更多評論   

          主站蜘蛛池模板: 柘城县| 澄江县| 新竹市| 清新县| 密云县| 石阡县| 营山县| 和平区| 余江县| 四会市| 昆明市| 牙克石市| 上饶市| 尼木县| 墨玉县| 岗巴县| 富源县| 德阳市| 汶川县| 武功县| 新源县| 固安县| 罗平县| 宜章县| 浠水县| 柳河县| 白银市| 屏山县| 仙游县| 清河县| 蓝山县| 巴彦淖尔市| 航空| 顺昌县| 平安县| 铁岭市| 镇平县| 格尔木市| 五原县| 缙云县| 潜山县|