Hi,

I am using Tomcat 5.0.26. I configured the HTTP connector to decode URI with setting URIEncoding="UTF-8"

     <Connector port="8080" address="${jboss.bind.address}"
        maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
        enableLookups="false" redirectPort="8443" acceptCount="100"
        URIEncoding="UTF-8"
        connectionTimeout="20000" disableUploadTimeout="true"/>

This works for my pages that accept HTTP GET request. Unicode input parameter values that are UTF-8 encoded are properly decoded when calling request.getParameter(). However, if the request is HTTP POST, the input parameter values are mangled. Am I missing some configuration settings?

I have the following simple JSP page to illustrate the problem.

<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
<title>Testing UTF-8</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>

Type in UNICODE characters in input field and click the Submit button.

<h1>Testing UTF-8 using GET</h1>
<form action="<%=request.getRequestURI()%>" method="GET">
<input type="text" name="data" value='<%=request.getParameter("data")%>'/>
<input type="submit" name="submit" value="submit"/>
</form>

<h1>Testing UTF-8 using POST</h1>
<form action="<%=request.getRequestURI()%>" method="POST">
<input type="text" name="data" value='<%=request.getParameter("data")%>'/>
<input type="submit" name="submit" value="submit"/>
</form>

</body>
</html>


-- Rick

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to