
struts.xml文件中提示The content of element type "struts" must match "((package|include|bean|constant 10
不知道是那里错了!<?xmlversion="1.0"encoding="UTF-8"?><!DOCTYPEstrutsPUBLIC"-//ApacheSoftwareF...
不知道是那里错了!
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd">
<struts>
<package name="default" extends="struts-default">
<interceptors>
<interceptor name="replace" class="interceptor.RegisterInterceptor"></interceptor>
</interceptors>
<action name="reg" class="action.RegisterAction">
<result name="success">/myRegister.jsp</result>
<result name="login">/register.jsp</result>
<interceptor-ref name="defaultStack"></interceptor-ref>
<interceptor-ref name="replace"></interceptor-ref>
</action>
</package>
</struts> 展开
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd">
<struts>
<package name="default" extends="struts-default">
<interceptors>
<interceptor name="replace" class="interceptor.RegisterInterceptor"></interceptor>
</interceptors>
<action name="reg" class="action.RegisterAction">
<result name="success">/myRegister.jsp</result>
<result name="login">/register.jsp</result>
<interceptor-ref name="defaultStack"></interceptor-ref>
<interceptor-ref name="replace"></interceptor-ref>
</action>
</package>
</struts> 展开
4个回答
展开全部
struts里面的节点是有顺序的,你要按照上面给你提示的顺序放节点。
应该是你的interceptor放置的地方有问题
应该是你的interceptor放置的地方有问题
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
把<interceptor-ref name="defaultStack"></interceptor-ref>
<interceptor-ref name="replace"></interceptor-ref>放到
</interceptors>
<action name="reg" class="action.RegisterAction">
这两行中间
<interceptor-ref name="replace"></interceptor-ref>放到
</interceptors>
<action name="reg" class="action.RegisterAction">
这两行中间
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
感觉没什么问题啊,是不是要加上这个:
<constant name="struts.devMode" value="true"></constant>
<constant name="struts.locale" value="zh_CN" />
<constant name="struts.i18n.encoding" value="UTF-8" />
可以试试看。。。。
<constant name="struts.devMode" value="true"></constant>
<constant name="struts.locale" value="zh_CN" />
<constant name="struts.i18n.encoding" value="UTF-8" />
可以试试看。。。。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
看不出错在哪里,类名是否未包括全路径?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询