Jsp get method to eliminate the garbage problem passing parameters Chinese

2011-07-21  来源:本站原创  分类:Industry  人气:103 

Environment Struts + TOMCAT 5.5
For example:
Page encoding has been set
<@ Page contentType = "text / html; charset = GB2312">
Click on a hyperlink. .. Background processing
For example:
<html:link page="/Action.do?type=grad_limit_select_course_type_modify" paramId="type_name" paramName="rs" paramProperty="type_name"> modify </ html: link>
If type_name is a number, then this property will not be any problems ...
If Chinese characters. Will be garbled. Is before the receiver is garbage.
So in the background processing. Is of no use ..

Solution is as follows:
First, enter the tomcat directory (tomcat / conf)
Server.xml configuration file found
Add the red part in the following
<! - Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 ->
<Connector port = "8080"
maxThreads = "150" minSpareThreads = "25" maxSpareThreads = "75"
enableLookups = "false" redirectPort = "8443" acceptCount = "100"
debug = "0" connectionTimeout = "20000"
disableUploadTimeout = "true" URIEncoding = "UTF-8 or GBK" />
<! - Note: To disable connection timeouts, set connectionTimeout value
to 0 ->
Save, you can restart tomcat

Or do not use <html:link>
Use <a href="action.do?type_name=${rs.type_name}" /> change in Action reception transcoding.
m_Form.setType_name (new String (m_Form.getType_name (). getBytes (
"Iso-8859-1"), "GBK"));
Is also possible ..

  • Jsp get method to eliminate the garbage problem passing parameters Chinese 2011-07-21

    Environment Struts + TOMCAT 5.5 For example: Page encoding has been set <@ Page contentType = "text / html; charset = GB2312"> Click on a hyperlink. .. Background processing For example: <html:link page="/Action.do?type=grad_limit_

  • struts2 action in the form submitted to the garbage problem in the Chinese solution parameters (including the path to take in Chinese) 2010-10-11

    My front page is like this: <body> <form action="test.action" method="post"> Test file: <input type="file" name="path" value=""/> <input type="submit" value=" Submit &qu

  • Fcitx input method to solve the garbage problem in linux 2010-10-23

    The main reason for this problem is not found fcitx Chinese fonts, so the display is garbled 1. Solution: Modify ~ / .fcitx / config file "Display fonts (in)" the value system of Chinese characters that already exist 2. How to find Chinese chara

  • Change: git windows directory garbage problem solving in Chinese 2010-07-22

    Git for Windows version Msysgit support for Chinese is not good enough when used, the following three conditions in Chinese garbled: 1.ls not display Chinese catalog solution: the git / git-completion.bash add a line: alias ls = 'ls - show-control-ch

  • Learning doubt a seam (a4j problem passing parameters) 2010-12-25

    <rich:panel> #{dir.dirName},#{dir.dirId} <br /> #{dir} <br /> <a4j:commandLink rendered="#{dirmanager.hasdir(dir)}" value="edit" actionListener="#{dirmanager.hasdir(dir)}" reRender="mainArea">

  • jsp + mysql Chinese garbage problem 2010-09-24

    jsp Page to input Chinese data, save to mysql The database is garbled, read data from the database after jsp Page display is garbled, to solve this problem from the following aspects need to be considered : 1. Access to mysql character set View mysql

  • Solve the linux environment jsp + mysql database the problem of garbled Chinese 2011-05-02

    After a week of hard work has finally solved the problem, especially the experience of an extract memo. This article will address the following types of garbage problem. Chinese data into mysql table appear garbled, mysql from JSP page to read Chines

  • Method of passing parameters between JSP pages Introduction 2011-01-06

    To pass parameters between JSP pages often need to use the function, and sometimes also need to pass parameters between multiple JSP pages. Here are some methods to achieve. (1) directly in the URL request to add Such as: <a href = "thexuan.jsp? A

  • jsp Chinese garbage problem solving 2010-05-30

    jsp Chinese garbage problem solving Method 1. JSP page displays garbled display the following page (display.jsp) The garbled :<html><head><title>JSP Chinese language processing </title><meta http-equiv="Content-Type" c

  • JSP development of Chinese language garbage problem 2010-03-29

    This paper mainly in the JSP for Tomcat development of Chinese garbled prone to problems. 1, JSP garbage problem in the output of Chinese JSP output of Chinese, that is, the output directly in the JSP in Chinese, or assign to a variable the value of

  • JSP Chinese garbage problem 2010-04-24

    JSP Chinese garbled to the first article: 1, we must ensure that the output to the client JSP is the output encoding in Chinese, that is all we have in our first generation of JSP source code by adding the following line: <% @ Page contentType = "

  • Jsp garbled on the solution to the problem. 2009-04-23

    Jsp garbled on the solution to the problem. 1, the basic question garbled. The garbage problem is the simplest garbled question. Most of the new will appear. That is inconsistent with a result of garbled page coding. <% @ Page language = "java&quo

  • FusionCharts Chinese garbage problem 2010-05-06

    Download free version from http://www.infosoftglobal.com/ site to the local, extract to a local, out JSClass directory and copy all the files under the Charts directory to your website chart directory, you can start to use FusionCharts trip. First, s

  • 1. Web programming in Chinese garbage problem 2010-07-14

    In Web programming, involving transfer of two Chinese jsp page parameter, the problem will be garbled, the background always print out a number of question marks. Search the web will come out a lot of answers, most say that is changing my jsp page en

  • Hibernate MySQL Chinese garbage problem 2010-07-28

    Hibernate MySQL Chinese garbage problem <script type="text/javascript"> document.body.oncopy = function () (if (window.clipboardData) (setTimeout (function () (var text = clipboardData.getData ("text"); if (text & ; & tex

  • get/post-- Chinese garbage problem 2010-09-02

    The following content is not original and copy to here mainly for the convenience of their own future reference, the original source: http://blog.csdn.net/jokefun968/archive/2007/11/14/1883954.aspx 1, article 1 Recently encountered a problem: The get

  • Difference between MySQL character set GBK.GB2312.UTF8 MYSQL Chinese garbage problem solving 2010-09-30

    MySQL character sets involved in several character-set-server/default-character-set: server character set, used by default. character-set-database: the database character set. character-set-table: database table character set. Increase in priority or

  • How to solve the garbage problem in J2EE 2010-11-22

    In J2EE, the garbage problem is a headache, garbled in this paper to make a J2EE summary, in order to attract valuable comments. First of all, we know that the reason is because the generated hash codes of different causes, and this is like talking t

  • Solve the garbage problem Mysql another successful 2010-08-22

    Reproduced: http://www.busfly.cn/post/mysql-utf8.html mysql-h ip-P port-u user-p password Solve the garbage problem Mysql another successful (MYSQL, questions, MYSQL database, garbled) In my previous blog article on the hair off my face data and summ

  • Java's garbage problem 2011-09-01

    Garbage problem is very common in Java, a variety of reasons, to make a summary here, do not purport to be comprehensive, accurate, please correct me if wrong. 1 result of garbled code file page. Each file (java, js, jsp, html, etc.) has its own codi