本文主要是介绍4.Strut国际化完成语言切换:struts-config.xml.web.xml,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE struts-config PUBLIC"-//Apache Software Foundation//DTD Struts Configuration 1.2//EN""http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd"><struts-config><action-mappings><action path="/changeLang" type="com.bjpowernode.i18n.ChangeLanguageAction"><forward name="index" path="/index.jsp" /></action></action-mappings><message-resources parameter="resources/MessageResources" />
</struts-config>
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"><display-name></display-name> <welcome-file-list><welcome-file>index.jsp</welcome-file></welcome-file-list><servlet><servlet-name>action</servlet-name><servlet-class>org.apache.struts.action.ActionServlet</servlet-class><init-param><param-name>config</param-name><param-value>/WEB-INF/struts-config.xml</param-value></init-param><init-param><param-name>debug</param-name><param-value>2</param-value></init-param><init-param><param-name>detail</param-name><param-value>2</param-value></init-param><load-on-startup>2</load-on-startup></servlet><!-- Standard Action Servlet Mapping --><servlet-mapping><servlet-name>action</servlet-name><url-pattern>*.do</url-pattern></servlet-mapping> </web-app>
这篇关于4.Strut国际化完成语言切换:struts-config.xml.web.xml的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!