我的静态页面是: static.html代码如下:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>static.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
</head>
<body>
This is my HTML page. <br>
<FORM name="myform" action="lesson915/index.jsp" method="GET">
<P> name:<INPUT type="text" name="name" /></P>
<P> password:<INPUT type="password" name="password" /></P>
<P> <INPUT type="Submit" name="bu" value="进入"/></P><P> </P>
<P> </P>
<P> </P>
<P> </P>
</FORM>
</body>
</html>
==========================
jsp的代码如下:<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<%request.setCharacterEncoding("GB2312");%>
<%
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>
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<hr>
<%@include file="static.html"%>
</body>
</html>
==============================
在jsp中显示的按钮上,就是不显是中文,请问怎么解决
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>static.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
</head>
<body>
This is my HTML page. <br>
<FORM name="myform" action="lesson915/index.jsp" method="GET">
<P> name:<INPUT type="text" name="name" /></P>
<P> password:<INPUT type="password" name="password" /></P>
<P> <INPUT type="Submit" name="bu" value="进入"/></P><P> </P>
<P> </P>
<P> </P>
<P> </P>
</FORM>
</body>
</html>
==========================
jsp的代码如下:<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<%request.setCharacterEncoding("GB2312");%>
<%
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>
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<hr>
<%@include file="static.html"%>
</body>
</html>
==============================
在jsp中显示的按钮上,就是不显是中文,请问怎么解决
或者页面编码统一采用UTF-8
在生成静态页面的时候, <meta http-equiv="content-type" content="text/html; charset=gb2312">meta标签里已经有了,但是,在jsp的页面中还是显示乱码,我先试试吧!!
谢谢