beehive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carlin Rogers (JIRA)" <>
Subject [jira] Commented: (BEEHIVE-1032) TestRecorder handle request encoding
Date Thu, 29 Dec 2005 16:41:01 GMT
    [ ] 

Carlin Rogers commented on BEEHIVE-1032:

Yes, I agree we need to make the TestRecorder suppport for multibyte more robust for use across
platforms as well as containers. The container issue is tough because configurations are different.
Also, I think that in the Servlet spec there is a difference between what happens in a GET
and a POST.
- With GET the browser URLs encode non-ASCII characters in UTF-8.
- For POST, the header should have a content-type field that specifies the actual character
encoding of the body.

Just a note... The NetUI automated test suite is generally run on Tomcat. Tomcat uses the
ISO-8859-1 encoding by default. So, as an out of the box soltuion, the TestRecorder as it's
implemented, handles non-ASCII multibyte characters correctly by taking the ISO-8859-1 bytes
and creating a Java Unicode String.

So to configure Tomcat 5.0.x for UTF-8 in both the GET and POST I think you need to do the

1) Add URIEncoding="UTF-8" to the appropriate connector in the server.xml file. This will
work for GET only on Tomcat. Edit $CATALINA_HOME/conf/server.xml and add the attribute URIEncoding="UTF-8"
to the <Connector port="8080"... />. For example,

  <Connector port="8080"
             URIEncoding="UTF-8" />

2) To set the encoding correctly for POST requests with multibyte data in the form, you can
create a servlet filter that sets the encoding to UTF-8 on the incoming request. There are
lots of examples of this type of configuration on the web. 

We'll need to coordinate changes to the TestRecorder code implementation with changes to configurations
of containers used for automated testing.

> TestRecorder handle request encoding
> ------------------------------------
>          Key: BEEHIVE-1032
>          URL:
>      Project: Beehive
>         Type: Test
>   Components: NetUI
>     Versions: V1
>     Reporter: Jin Kudo
>  Attachments: step1_patch.txt
> Currently the test recorder always handle the request encoding as ISO-8859-1. That is
cause to none ASCII characters can't be stored in the recording data file correctly. Request
encoding determination is not so easy, but I suggest as the reasonable solution testrecorder
use the platform encoding as request encoding rather than fixed ISO-8859-1 value.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message