详细解决方案
struts1 myeclipse tomcat 从页面失去乱码
热度:7647 发布时间:2013-02-25 21:14:46
我在页面的下拉列表中显示数据库(sqlserver)的中文数据,能正常显示。但选中下拉列表的值,通过action的处理,再跳转到下一个页面显示这个中文时,是乱码。怎么办啊。。。
第一个页面,能显示从数据库得到的值
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="java.sql.ResultSet"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%request.setCharacterEncoding("utf-8");
response.setCharacterEncoding("utf-8");
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'ddWmz.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">
-->
<style type="text/css">
<!--
.button1 {border:1px solid #999999;
font-size:12px;
font-family:Tahoma;
background-color:#ffffcc
}
.style1 {color: #006699;
font-weight: bold;
font-family: "黑体";
font-size: 12px;
}
.style10 {font-size: 12px; color: #006699; font-family: "黑体"; }
.style14 {font-size: 12px; color: #FFFFFF; font-family: "黑体"; font-weight: bold; }
.style15 {color: #006699; font-weight: bold;
font-size:16px;
font-family: "楷体";
}
.style20 {color: #000000; font-size: 12px; font-family: "黑体"; }
.style26 {color: #FF3300}
a:link {
color: #009977;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #003366;
}
a:hover {
text-decoration: underline;
color: #006699;
}
a:active {
text-decoration: none;
color: #006699;
}
-->
</style>
<script type="text/javascript">
function next()
{
document.form1.action="Ccxs.do";
document.form1.submit();
}
function onchange2()
{
document.form1.action="xxxx.jsp";
document.form1.submit();
}
</script>
</head>
<body>
<form name="form1" method="post" >
<table width="760" border="0" align="center" cellspacing="0">
<tr>
<td colspan="3"><span class="style1">订票</span></td>
</tr>
<tr>
<td colspan="3"><hr size="1" /></td>
</tr>
<tr>
<td width="50"> </td>
<td align="center" valign="middle" class="style15"> </td>
<td width="50"> </td>
</tr>
<tr>
<td width="50"> </td>
<td width="660" align="center" valign="middle" class="style15">
相关解决方案
- MyEclipse 连接tomcat 出现如上异常
- apache-tomcat-7.0.32下的html页面不能访问有关问题
- Server Tomcat v7.0 Server不能起步
- Myeclipse 注册码生成器 源码 亲测
- tomcat 部署出现以上提示信息 求解 急
- struts1 中Action需要向页面传递对象的有关问题
- Eclipse + Tomcat Debug時很慢,该怎么解决
- JDOM ,windows7 ,tomcat 哪位高手的bug
- tomcat 配置https的有关问题
- MyEclipse 上配置tomcat遇到的有关问题
- myeclipse 左侧的目录结构变了 如何改回来
- 请问上Linux平台上怎么搭建JDK \TOMCAT\MYSQL
- Tomcat 6.0 servlet 中文字符乱码解决思路
- 求教:tomcat 的 perm gen设立
- MyEclipse 中 jsp页面编译报错有关问题
- 启动apache-tomcat-5.5.33出现有关问题
- MyEclipse 8.5怎么使用JeasyOPC
- tomcat 配置有关问题
- myeclipse 8一个使用有关问题
- tomcat 用Bootstrap直接启动一个服务,其他web工程如何调用
- Tomcat 出现以上异常 请高手帮忙看一上
- TOMCAT 5.5 浏览器输入http://localhost:8080/工程名/页面名 报错404解决方法
- TOMCAT 5。0运行 异常信息Apache Xerces (or Java 1.5) for full XSD support
- tomcat 起动报错
- Myeclipse 运行tomcat时出现 以上提示
- SSH+Myeclipse,Tomcat运行时出错,是什么原因啊多谢
- []TOMCAT 上载文件时提示空指针错误 上来来的XLS是空白的
- Server Apache Tomcat v6.0.35 at localhost failed to start
- MyEclipse lib 目录上的jar包不能自动识别
- struts1 怎么把action嵌入到jsp中