Struts中配置application.properties文件,如果有中文,显示出来的是乱码,你们是怎么解决的呢??!! 显示乱码?你的application.properties文件是怎么得到的?是用UNICODE字符表示吗?建议你通过%JAVA—HOME%\BIN\Native2ascii.exe命令来完成。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Native2ascii application.properties applicationZH.properties好像是这样写的吧,今天休息,到公司后给你查 application.properties很简单啊,就一句index.jsp.title=操 引用后,显示?????<%@ page contentType="text/html;charset=GB2312" language="java" %><%@ taglib uri="/struts-bean" prefix="bean" %><%@ taglib uri="/struts-html" prefix="html" %><%@ taglib uri="/struts-logic" prefix="logic" %><html:html locale="true"><head><title><bean:message key="index.jsp.title"/></title><html:base/></head><body>操</body></html:html> 2、3楼的是正解,用jdk中bin下面的Native2ascii.exe将属性文件转码 把application.properties里的内容靠到一个文本文件(test.txt)中,执行Native2ascii test.txt testcn.txt。再把testcn.txt中的内容靠到application.properties里 我有点明白了,我的那个文件是在UltraEdit里直接写的,然后保存为application.properties,是不是就如你们所说,那样保存就行了? 把属性文件放到j2sdk1.4/bin 打开运行cmd转道j2sdk1.4/bin目录下键入native2ascii.exe old.properties new.properties 帮看代码,这样写工具类会有问题吗? 请教一个jar包的问题 谈谈final, finally, finalize的区别。 简单的问题,但是找了半天找不到啊..... 时间转换 csv 读取 请问(面试题):什么是框架?什么时候使用框架?为什么要使用框架?使用框架的优缺点是什么?举例说出你所熟悉的框架。 BLOB问题 急,解决问题马上给分,在线等 Unable to build EntityManagerFactory求大神帮帮我!!! 大家来探讨一下Struts的页面输出问题吧:) 在hibernate查询语句参数中如果有中文,hibernate返回数组越界
好像是这样写的吧,今天休息,到公司后给你查
index.jsp.title=操
<%@ taglib uri="/struts-bean" prefix="bean" %>
<%@ taglib uri="/struts-html" prefix="html" %>
<%@ taglib uri="/struts-logic" prefix="logic" %>
<html:html locale="true">
<head>
<title><bean:message key="index.jsp.title"/></title>
<html:base/>
</head>
<body>
操
</body>
</html:html>
UltraEdit里直接写的,然后保存为application.properties,是不是就如你们所说,那样保存就行了?
native2ascii.exe old.properties new.properties