从Dreamweaver粘贴过来的HTML代码不能保存到MyEclipse ,请高手指教
从Dreamweaver粘贴过来的HTML代码不能保存到MyEclipse ……弹出对话框“Some Characters cannot be mapped using gb2312……”
代码如下:谢谢各位大侠啦
<%@ page contentType="text/html;charset=gb2312" import="java.sql.*,java.util.*,com.wl.model.*"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" type="text/css" href="css/my1.css">
</head>
<<body>
<table width="80%" height="80%" border="0" align="center" bordercolor="#00CC33" class="abc">
<tr>
<td width="100%" height="50%" align="center" valign="middle" nowrap="nowrap" class="abc"><div align="center"><img src="images/1.PNG" width="100%" height="100%" border="0" /></div></td>
</tr>
<tr>
<td height="98" class="abc"><table width="100%" border="0" align="center" class="my">
<tr>
<td width="29%" align="center" valign="middle" bordercolor="#FFFFFF"><h1>友情链接</h1></td>
<td width="71%" align="center" valign="middle" bordercolor="#FFFFFF"><p><a href="1.jsp" class="abc">管理员入口</a></p>
<p><a href="2.jsp" class="abc">普通用户入口</a></p></td>
</tr>
<tr>
<td align="left" valign="middle" bordercolor="#FFFFFF"><p><ul type="disc">
<li><a href="www.baidu.com">百度</a>
<li><a href="www.heuet.edu.cn">河北经贸大学</a>
<li><a href="#">新浪微博</a>
<li><a href="">csdn论坛</a>
</ul> </p></td>
<td width="71%" align="center" valign="middle" bordercolor="#FFFFFF"><img src="images/3.PNG" width="626" height="92" /></td>
</tr>
</tr>
</table>
</body>
</html>
------解决方案--------------------
可能你页面的存的编码方式跟页面设定的编码方式不一样,pageEncoding="GB2312"可能会帮到你