1.在struts-config.xml 中添加国际化标签 <message-resources parameter="MessageResources"></message-resources> 2.在src 中添加 MessageResources.properties 文件 文件内容格式 welcome.title=Struts Blank Application welcome.heading=Welcome! welcome.message=To get started on your own application, copy the struts-blank.war to a new WAR file using the name for your application. Place it in your container's "webapp" folder (or equivalent), and let your container auto-deploy the application. Edit the skeleton configuration files as needed, restart your container, and you are on your way! (You can find the MessageResources.properties file with this message in the /WEB-INF/src folder.) 3.jsp 中添加内容 step 1 添加 bean 标签 step 2 jsp 中使用国际化标签
<message key="welcome.heading"></message>
<message key="welcome.message"></message>