posted on 2012-02-09 12:42 picture talk 阅读(2741) 评论(1) 编辑 收藏 所属分类: Java 、struts
解决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确定 回复 更多评论
Powered by: BlogJava Copyright © picture talk