Struts2中怎样配置struts。xml?
展开全部
<?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>
<constant name="struts.i18n.encoding" value="utf-8"/>
<constant name="struts.ui.theme" value="simple"/>
<constant name="struts.custom.i18n.resources" value="application"></constant>
<package name="default" extends="struts-default" namespace="/">
<action name="action名称" class="action地址">
<result name="xxx">/xxx.jsp</result>
</action>
</package>
</struts>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd">
<struts>
<constant name="struts.i18n.encoding" value="utf-8"/>
<constant name="struts.ui.theme" value="simple"/>
<constant name="struts.custom.i18n.resources" value="application"></constant>
<package name="default" extends="struts-default" namespace="/">
<action name="action名称" class="action地址">
<result name="xxx">/xxx.jsp</result>
</action>
</package>
</struts>
展开全部
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.enable.DynamicMethodInvocation" value="true" />
<constant name="struts.devMode" value="true" /><!-- 开发模式 -->
<!--解决中文乱码问题-->
<constant name="struts.i18n.encoding" value="UTF-8"></constant>
<package name="default" extends="struts-default">
<action name="test" class="com.casehistory.action.Test">
<result>/index.jsp</result>
</action>
</package>
</struts>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.enable.DynamicMethodInvocation" value="true" />
<constant name="struts.devMode" value="true" /><!-- 开发模式 -->
<!--解决中文乱码问题-->
<constant name="struts.i18n.encoding" value="UTF-8"></constant>
<package name="default" extends="struts-default">
<action name="test" class="com.casehistory.action.Test">
<result>/index.jsp</result>
</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的核心Jar包来写
<struts>
<constant name="struts.i18n.encoding" value="utf-8"/>
<constant name="struts.ui.theme" value="simple"/>
<constant name="struts.custom.i18n.resources" value="application"></constant>
<package name="default" extends="struts-default" namespace="/">
<action name="action名称" class="action地址">
<result name="xxx">/xxx.jsp</result>
</action>
</package>
</struts>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd">//这里要根据你调用的struts的核心Jar包来写
<struts>
<constant name="struts.i18n.encoding" value="utf-8"/>
<constant name="struts.ui.theme" value="simple"/>
<constant name="struts.custom.i18n.resources" value="application"></constant>
<package name="default" extends="struts-default" namespace="/">
<action name="action名称" class="action地址">
<result name="xxx">/xxx.jsp</result>
</action>
</package>
</struts>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询