Element type aciton must be declared

<?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="mypackage" namespace="/" extends="struts-default">
		<action name="index" class="com.lyf.action.UserAction">
			<result>/WEB-INF/views/index.jsp</result>
		</action>
		<action name="login" class="com.lyf.action.UserAction" method="login">
			<result type="redirectAction">
				<param name="actionName">main</param>
				<param name="namespace">/</param>			
			</result>
			<result type="redirectAction" name="login">
				<param name="actionName">index</param>
				<param name="namespace">/</param>
			</result>
		</action>
		<aciton name="main" class="com.lyf.action.ProdAction">
			<result>/WEB-INF/views/main.jsp</result>
		</aciton>
	</package>
</struts>

Elicpse报错:Element type aciton must be declared[类型没有声明 ]

 以上是我的xml配置代码、是关于struts2的、结果在myeclipse中启动时、老是出现Element type aciton must be declared.纠结死了、感觉是自己听课时没听好、然后使劲找错误,在网上查了半天,结果终于发现了一个错误相似的博客:

http://blog.csdn.net/zwp441288971/article/details/7483594

,晕死、仔细看了一下自己的、发现最后的action写成aciton 了、真是郁闷了、我还删掉重写了一遍呢、看来、敲代码键盘时一定要求准确、不要那么急、要稳定……

猜你喜欢

转载自muzi131313.iteye.com/blog/1575005