创建资料文件,配置struts-config 文件,
jsp使用标签
<bean:message key=jsp.hello />
jsp使用标签
<bean:message key=jsp.hello />
解决方案 »
- weblogic ejb3报错
- java反编译软件哪种比较高效
- dtree动态添加问题
- 关于单点登录(CAS)的问题
- hibernate查询几次后卡死问题(释放session后会出现懒加载问题)
- 数据源和连接池是什么关系?
- java初学者的困惑~~~~~!!!!!????
- tomcat下jsp改名称后不能访问???
- 再问部署war文件的问题
- 求大神解答一下char型数组
- socket连接问题:服务器上的客户端能连上,其他用户连不上啊
- 请问:linux_china,IDEA怎么开发hibernate呢?我已经从jetBeans上下了hibernate tools了。并且已经配置了数据库的连接了。请问下一不该怎
每天都会有大量的供求信息发布!要做兼职的可以上来看看
noco赌场!可以在这里赚取大量的cp点数
noco考场!可以在这里证明你的开发能力
noco道具市场!购买你需要的道具!让noco更有意思
noco精灵市场!购买精灵为你作战!
noco = note + code + er
在你的property里面写上中文。然后用ant的native2ascii将property文件转换一下,就行了。
一般的中文property文件,需要用native2ascii转换一下,native2ascii是在你jdk的bin中,你可以直接用dos命令进行转换
找到public static void write(PageContext pageContext, String text)
throws JspException
{
JspWriter writer = pageContext.getOut();
try
{
--------------------------------------------------------------------------------------
if(text != null)
{
text = new String(text.getBytes("8859_1"), "gb2312"); 加上这些代码
}
-----------------------------------------------------------------------------------------
writer.print(text);
}
catch(IOException e)
{
RequestUtils.saveException(pageContext, e);
throw new JspException(messages.getMessage("write.io", e.toString()));
}
} public static void writePrevious(PageContext pageContext, String text)
throws JspException
{
JspWriter writer = pageContext.getOut();
if(writer instanceof BodyContent)
{
writer = ((BodyContent)writer).getEnclosingWriter();
}
try
{
--------------------------------------------------------------------------------------
if(text != null)
{
text = new String(text.getBytes("8859_1"), "gb2312"); 加上这些代码
}
--------------------------------------------------------------------------------------
writer.print(text);
}
catch(IOException e)
{
RequestUtils.saveException(pageContext, e);
throw new JspException(messages.getMessage("write.io", e.toString()));
}
}
这样就OK了<%@ page contentType="text/html; charset=gb2312" language="java" %>
要用gb2312