为什么我的JSP程序想数据库存入汉字时会出现乱码?怎么解决啊?
我把存入数据库的源JSP代码贴上来给大家看看,请大家帮我想办法啊!!巨分奉上!<%@pagelanguage="java"import="java.util.*"page...
我把存入数据库的源JSP代码贴上来给大家看看,请大家帮我想办法啊!!巨分奉上! <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+re... ;>.getParameter("meta http-equiv= " String basePath = request;'base href=".getServerPort()+path+".setCharacterEncoding(" String shuoming=request; <chanpin_add.getScheme()+".getServerName()+"+request;jsp;endtime"connDbBean" <db; out;title> import="<gb2312"!巨分奉上;开放"!;);/body>:useBean id="; < < scope=").getParameter("UTF-8"); class="-/W3C/);; String status=""insert into zhaobiao(gid;; connDbBean;%@ page language="",请大家帮我想办法啊;); <!'.setAttribute(""+gid+"+starttime+".getParameter(";html;%=basePath%>shuoming"biaoti",gid);> <)"gid"java;' <text/ <gb2312"><//.href='script>>/ <' %>'html>.getContextPath():/.getParameter("/.util,'+status+"% String gid=request; response; String sql="我把存入数据库的源JSP代码贴上来给大家看看;DTD HTML 4;)!DOCTYPE HTML PUBLIC "html>EN"<stract"+request;location;,biaoti; charset=gb2312 "body>);/ <.setCharacterEncoding(""/% request;title>.getParameter(".*";head>,starttime;/ content= """"' String biaoti=request,stract; <;+endtime+",' session;+biaoti+"+shuoming+"添加成功,''page"招标公告更新<,'); String endtime=request;; <+stract+" pageEncoding="//); %>" %>%>"script> String stract=request; String starttime=request;"),shuoming。;/.getParameter("starttime" 汉字存入数据库后在数据库中显示为一连串的问号乱码.print("% String path = request,status.01 Transitional/.executeUpdate(sql); <。;Content-Type "java"'"alert(' <,'gid",'head>:",endtime) values('.db"! <.jsp' 展开
展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询