form提交action取出来的是二级制
我用struts1做了一个插入的页面,大概有30个input ,插入汉字的时候在action和数据库里显示的都是像“试试” 这样的二进制乱码,我表单里也没有写明要上传二进制数据怎么会出现这样的问题 ,是因为数据量大么 ,这个页面之前 也有两个添加的页面,一点问题都没有。 经过我简单处理,把所有的js 文件都删掉了 ,但是还是不行,只要是汉字就会插入 二进制乱码 ,我的神啊 求求各位大侠帮帮我吧,我都快哭了!
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<%@ page language="java" contentType="text/html;charset=gbk"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ page import="com.zykjsoft.dao.*"
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'dex4.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="styles.css">
-->
<script type="text/javascript" src="zykj/scripts/rili/Date.js"></script>
</head>
<body>
<%
GetSelectDao dao=new GetSelectDao();
%>
<div id="msg" style="color:red"></div>
<form action="Personnel.do?method=ryxxAdd" method="POST" name="form" id="form" enctype="text/html">
<input type="hidden" name="zy_bz" value="0">
<table width="101%" border="0" cellpadding="0" cellspacing="0" class="right">
<tr>
<td><table border="0" cellspacing="0" cellpadding="0" class="right1">
<tr align="left" valign="top">
<td height="30">
<table border="0" cellspacing="0" cellpadding="0" class="mai-a">
<!-- --> <tr>
<td class="mai-b mai-font" bgcolor="#e3eef5" colspan="12">基本信息</td>
</tr>
<tr>
<td width="70" class="mai-c" >姓名</td>
<td width="60" class="mai-b">
<input name="xm" id="xm" type="text" size="9" value="" style="color:#999999;" />
</td>
<td width="60" class="mai-c">性别</td>
<td width="30" class="mai-b">
<select id="xb" name="xb">
<%
dao.getSelect("v_xb",out);
%>
</select> </td>