jsp中servlet提交表单出现乱码
如标题所示:运行时出现乱码。用eclipse+lomboz+jboss开发,表单代码如下:
<!DOCTYPE HTML PUBLIC "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title>提交表单数据</title>
</head>
<body bgcolor="#FFFFFF">
<h1 align="center"><b>欢迎登录系统</b></h1>
<form action="getpostdata" method="post">
<p></p>
<table width="52%" border="2" align="center">
<tr bgcolor="#FFFFCC">
<td align="center" width="43%"><div align="center">用户名:</div></td>
<td width="57%"><div align="left">
<input type="text" name="username">
</div></td>
</tr>
<tr bgcolor="#CCFF99">
<td align="center" width="43%"><div align="center">密码:</div></td>
<td width="57%"><div align="left">
<input type="password" name="password">
</div></td>
</tr>
</table>
<p align="center">
<input type="reset" name="Reset" value="重置">
<input type="submit" name="Submit2" value="提交">
</p>
</form>
</body>
</html>
运行结果如下:
娆㈣繋鐧诲綍绯荤粺
鐢ㄦ埛鍚?
瀵嗙爜: