在Internet选项中不勾选“总是以UTF-8发送URL”情况下通过<%@ page contentType="text/html; charset=UTF8" pageEncoding="gb2312" %>
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<p>
<%
String fileName = java.net.URLEncoder.encode("技术文章.zip", "UTF8");
%>
<p>
<a href="http://localhost:8080/test/<%= fileName %>">download</a>
</BODY>
</HTML>
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<p>
<%
String fileName = java.net.URLEncoder.encode("技术文章.zip", "UTF8");
%>
<p>
<a href="http://localhost:8080/test/<%= fileName %>">download</a>
</BODY>
</HTML>
解决方案 »
- hibernate多对一查询问题
- 关于input file
- 页面颜色系图片切换的问题
- Struts Problem Report
- Struts1.2 转1.3出现异常:Path mainLayout-definition does not start with a "/" character
- 我用徽软的jdbc驱动来连接ms sql出作..大家来看看..
- 请问各位:怎样将页面数据导出成DBF文件格式? 谢谢!
- 开发时,oracle 的sql中常用union all 有没有什么不好的地方?请教下各位
- 请教:JSP页面包含问题
- Tomcat总是不能更新刚修改过的类?
- 怎么我配置好了的weblogic在 http://localhost:7001/console/ 下只有一半?
- 本人在湛江,现有一中小项目需外包,详情请电13536383607
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<p>
<%!
String utf8encode(String source) throws java.io.UnsupportedEncodingException
{
return java.net.URLEncoder.encode(source, "UTF8");
}
%>
<%
String fileName = utf8encode("技术文章.zip");
%>
<p>
<a href="http://localhost:8080/test/<%= fileName %>">下载链接</a>
</BODY>
</HTML>