I have tried hard to get this working in Tapestry 5.1, but can't get it to work 100%.

My intention is to have search parameters in the activation context to support RESTful URL:s for my search results page. This works out of the box in Tapestry, but since the Tapestry specific encoding of non-ascii characters ($nnnn) is not very user friendly, or search engine friendly, I have replaced the URLEncoder with my own implementation. Currently it accepts the swedish characters to be sent as is, just as the normal ascii characters. This also requires that Tomcat is set up correctly:

<Connector ... URIEncoding="UTF-8"/>

This way the user can enter swedish characters in the URL, which are handled correctly on the server. So far so good.



The problem is when returning utf-8 strings from onPassivate(). When the value arrives in onActivate() the swedish characters are all replaced by the replacement character U+FFFD, or 65533 (diamond with question mark), making it impossible to know what character it was from the beginning. It seems like it is HttpServletRequest.getServletPath() called from RequestImpl.java that causes this.

From the service method of a contributed HttpServletRequestHandler you can see the results from calling the HttpServletRequest methods:

        request.getServletPath: /searchresults/?vrigt
        request.getRequestURI: /searchresults/%F6vrigt
service: request.getRequestURL: http://192.168.0.100:8080/searchresults/%F6vrigt

Have anyone solved this, or am I doing something that is not supposed to work in Tapestry 5.


Regards,
Mats



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to