用的工具是Myeclipse,其它的页面中文都能显示,就这个不行,也不是表单乱码,这是一个自页面,主页面以及这个页面进入的自页面的中文都能显示,也不知道是不是页面存储格式错了,大家给我看看吧!!
再问个小问题,http://topic.csdn.net/t/20050531/13/4048450.html 这个网址里的这种形式的帖子是在哪里发出来的??<%@ page pageEncoding="gb2312"%>
<%@ page contentType="text/html;charset=gb2312" import="java.sql.*" errorPage="" %>
<%@page import="com.ecjtu.model.ManagerVo" %>
<jsp:directive.page import="java.util.List"/><html>
<head><title>人力资源管理系统--系统管理</title>
<link type="text/css" rel="stylesheet" href="css/style.css">
</head>
<script language="JavaScript">
function deleteForm(date){
if(confirm("确定要删除此管理员吗?")){
window.location.href="manager.do?method=deleteManager&id="+date;
}
}
</script><%
//String str=request.getParameter("Page");
//int Page=1;
//List list=null;
//if(str==null){
// list=(List)request.getAttribute("list");
// int pagesize=15; //指定每页显示的记录数
// System.out.println("list="+list);
// list=pagination.getInitPage(list,Page,pagesize); //初始化分页信息
//}else{
// Page=pagination.getPage(str);
// list=pagination.getAppointPage(Page); //获取指定页的数据
//}
%><body><%
ManagerVo manager = new ManagerVo();
List all = (List)request.getAttribute("all");
%>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<jsp:include page="top.jsp" flush="true" />
<table width="801" height="48" border="0" cellpadding="0" cellspacing="0" background="images/center1.jpg">
<tr>
<td valign="top"><table width="494">
<tr>
<td width="45" height="25"> </td>
<td width="437" valign="bottom"><font color="#66583D"><b>系统管理 </b></font>> <font color="#FF0000"> 用户查询</font></td>
</tr>
</table></td>
</tr>
</table>
<table width="801" height="436" border="0" cellpadding="0" cellspacing="0" background="images/center2.jpg">
<tr>
<td height="436" valign="top" align="center">
<%
if(all.size()>0){
%>
<table width="400" border="1" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF" bgcolor="66583D">
<tr align="center">
<th height="20"><span class="word_white">序号</span></th>
<th><span class="word_white">账号</span></th>
<th><span class="word_white">操作</span></th>
</tr>
<tr>
<td>test1</td>
<td>test2</td>
<td>test3</td>
</tr>
</table>
<%}%>
<table width="381">
<tr align="right">
<td><a href="manager_insert.jsp">添加管理员</a></td>
</tr>
</table></td>
</tr>
</table>
<jsp:include page="down.jsp" flush="true" />
</td>
</tr>
</table>
</body>
</html>
再问个小问题,http://topic.csdn.net/t/20050531/13/4048450.html 这个网址里的这种形式的帖子是在哪里发出来的??<%@ page pageEncoding="gb2312"%>
<%@ page contentType="text/html;charset=gb2312" import="java.sql.*" errorPage="" %>
<%@page import="com.ecjtu.model.ManagerVo" %>
<jsp:directive.page import="java.util.List"/><html>
<head><title>人力资源管理系统--系统管理</title>
<link type="text/css" rel="stylesheet" href="css/style.css">
</head>
<script language="JavaScript">
function deleteForm(date){
if(confirm("确定要删除此管理员吗?")){
window.location.href="manager.do?method=deleteManager&id="+date;
}
}
</script><%
//String str=request.getParameter("Page");
//int Page=1;
//List list=null;
//if(str==null){
// list=(List)request.getAttribute("list");
// int pagesize=15; //指定每页显示的记录数
// System.out.println("list="+list);
// list=pagination.getInitPage(list,Page,pagesize); //初始化分页信息
//}else{
// Page=pagination.getPage(str);
// list=pagination.getAppointPage(Page); //获取指定页的数据
//}
%><body><%
ManagerVo manager = new ManagerVo();
List all = (List)request.getAttribute("all");
%>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<jsp:include page="top.jsp" flush="true" />
<table width="801" height="48" border="0" cellpadding="0" cellspacing="0" background="images/center1.jpg">
<tr>
<td valign="top"><table width="494">
<tr>
<td width="45" height="25"> </td>
<td width="437" valign="bottom"><font color="#66583D"><b>系统管理 </b></font>> <font color="#FF0000"> 用户查询</font></td>
</tr>
</table></td>
</tr>
</table>
<table width="801" height="436" border="0" cellpadding="0" cellspacing="0" background="images/center2.jpg">
<tr>
<td height="436" valign="top" align="center">
<%
if(all.size()>0){
%>
<table width="400" border="1" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF" bgcolor="66583D">
<tr align="center">
<th height="20"><span class="word_white">序号</span></th>
<th><span class="word_white">账号</span></th>
<th><span class="word_white">操作</span></th>
</tr>
<tr>
<td>test1</td>
<td>test2</td>
<td>test3</td>
</tr>
</table>
<%}%>
<table width="381">
<tr align="right">
<td><a href="manager_insert.jsp">添加管理员</a></td>
</tr>
</table></td>
</tr>
</table>
<jsp:include page="down.jsp" flush="true" />
</td>
</tr>
</table>
</body>
</html>
解决方案 »
- JBPM 如何在前台动态生成流程图?
- 关于J2EE开发工具的选择~
- ejb+struts高手请进来看看
- 如何发布自己的web服务
- 在betwixt中如何类中子集合的XML TO BEAN 的转换
- 请教高手jbuilder支持工作流技术吗?如xlang ,wsfl ,bpws等。
- Struts:往Sqlserver数据库添加数据,执行过程没有任何错误提示,在数据库中缺没有写进去,但是自动编号的Id号缺增加了。
- validator验证框架
- 强烈要求新开Mobile Agent论坛
- 用接口创建对象?
- 急。。。读取ORACLE10G的CLOB类型的内容时出错,当我输入超过10000的汉字时,读取的时候出错误
- 菜鸟求教socket如何学习
web乱码
http://blog.csdn.net/crazylaa/archive/2009/12/24/5066784.aspx
对于request提交来的中文表单,在处理request之前request.setCharacterEncoding("gb2312");
否则还是ISO8859_1,
还有就是,我在servlet中判断如果session如果为空,就重定向到index.jsp,于是我直接在地址栏上敲这个servlet的地址,重定向到index.jsp后,index.jsp页面上的中文也都是乱码了,一查编码变成 西欧 的了,真是奇怪!!
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
这个配置了吗? pageEncoding
<%@page contentType="text/html;charset=gb2312" %>
<html>
<body>
系统管理 用户查询
</body>
</html>还是乱码,我最后又把<%@page contentType="text/html;charset=gb2312" %>去掉,成了<html>
<body>
系统管理 用户查询
</body>
</html>这回在浏览器查看里面看了下,默认是 西欧编码,应该是ISO8859-1,最后改成GB2312居然有用了,
这种情况是代表eclipse里面的页面编码是ISO8859-1吧??可是该改的地方我都改成GBK了!真是郁闷 啊!
<meta http-equiv="content-type" content="text/html;charset=gbk">