本文介绍了警告:找不到指定操作的配置:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我得到以下异常,请帮助解决此问题。
I am getting following exception, please help to solve this issue.
Jul 16, 2013 11:18:40 AM org.apache.struts2ponents.Form evaluateExtraParamsServletRequest WARNING: No configuration found for the specified action: `'HelloWorld1'` in namespace: `''`. Form action defaulting to 'action' attribute's literal value.index.jsp :
index.jsp:
<s:form action="HelloWorld1" namespace="/" method="post" > <s:textfield name="userName" label="User Name" /> <s:submit /> </s:form>struts.xml :
struts.xml:
<package name="default" namespace="/" extends="struts-default" > <action name="HelloWorld1" class="java.vaannila.HelloWorld"> <result name="SUCCESS">/success.jsp</result> </action> </package>HelloWorld .java :
HelloWorld .java:
public class HelloWorld extends ActionSupport{ //execute method }推荐答案
错误表明 Struts 2 无法加载您的XML配置。确保 struts.xml 位于 WEB-INF / classes 目录中。 (配置的其余部分看起来很好。)
The error suggests that Struts 2 couldn't load your XML configuration. Make sure your struts.xml is inside WEB-INF/classes directory. (The rest of the configuration looks fine.)
更多推荐
警告:找不到指定操作的配置:
发布评论