LoginView.jsp文件的头部一定要加上编码
<%@ page language="java" contentType="text/html" pageEncoding="UTF-8" session="false"%>
<%@ include file="./StatusMessageInclude.jspf"%>
<script type="text/javascript">
function toUnicode(str)
{
var unicodeStr = escape(str);
unicodeStr = unicodeStr.replace(/%/g, "\\");
//cannot do like this, must reassign new value
//unicodeStr.replace(/%/g, "\\");
return unicodeStr;
}
function unUnicode(unicodeStr)
{
var str = unicodeStr.replace(/\\/g, "%");
str = unescape(str);
return str;
}
var isSuccess = <%=isLoginSuccessful %>;
var msg = "<%=message %>";
if ((!isSuccess) && ("null" != msg))
{
//does work
msg = encodeURI("很抱歉,你的用户名或者密码错误!");
msg = decodeURI(msg);
//does work too!
msg = escape("很抱歉,你的用户名或者密码错误!");
msg = unescape(msg);
//does work!
/*msg = unescape("\u5F88\u62B1\u6B49\uFF0C\u4F60\u7684\u7528\u6237\u540D\u6216\u8005\u5BC6\u7801\u8F93\u5165\u9519\u8BEF\uFF01");*/
//does work!
/*msg = toUnicode("很抱歉,你的用户名或者密码错误!");
msg = unUnicode(msg);*/
//alert(msg);
}
//-->
</script>
分享到:
相关推荐
portlet-api.jar portlet-api.jar portlet-api.jar
spring-webmvc-portlet-3.0.2.RELEASE
IBM.Press.Rapid.Portlet.Developme.with.WebSphere.Portlet.Factory.Sep.2008.pdf E文
spring-webmvc-portlet-3.1.1.RELEASE.jar.zip
spring-webmvc-portlet-3.2.7.RELEASE.jarspring-webmvc-portlet-3.2.7.RELEASE.jarspring-webmvc-portlet-3.2.7.RELEASE.jarspring-webmvc-portlet-3.2.7.RELEASE.jar
金蝶BOS企业版V632_开发指南_管理门户_Portlet开发.doc
portlet-2.0.jar,
Portlet规范介绍.rarPortlet规范介绍.rarPortlet规范介绍.rar
org.springframework.web.portlet-3.0.0.M4.jar
Apress.Building.Portals.with.the.Java.Portlet.API.Aug.2004.pdf Portlet 1.x 的不错的电子书 英文清晰版
spring-webmvc-portlet-4.0.0.RELEASE.jar
金蝶eas__二次开发Portlet
spring-webmvc-portlet-4.1.0.RELEASE.jar
Portlet是企业系统中比较重要的一块内容,可以展示企业的各种信息(公告、提醒等),在业务系统例如有工作流的系统中更为重要。 发起这个开源项目的原因是因为现有的Portlet插件都太难用,而且和我们现有的系统...
org.springframework.web.portlet-3.0.1.jar
spring-webmvc-portlet-4.3.6.RELEASE.jar
这是分页用的displaytag-portlet-1.1.jar。很高兴与大家分享!
liferay_使用struts2开发portlet
spring-webmvc-portlet-4.0.0.RELEASE-javadoc.jar
文档中主要包括以下两个包 javax.portlet javax.portlet.filter