JSP is easy to appear garbled, sometimes it feels very annoying, today has time to summarize your own method of solving garbled under Tomcat.
1. JSP page Chinese who does not call database data is also garbled, generally adds to the beginning of the JSP page.
<% @ Page ContentType = "text / html; charset = GBK" Language = "Java" ErrorPage = ""%>
2. The data submitted to the database is garbled through the form. Generally, it can be solved with the transcodation. I am solved by adding Filter and JDBC: URL plus parameters in Tomcat 5.
1. Filter uses the Tomcat comes with the one :). Specify on Web.xml:
2, JDBC: URL is:? Useunicode = true & characterencoding = GBK
Through the above method, basically solve Chinese garbled.