DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36341>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36341





------- Additional Comments From [EMAIL PROTECTED]  2005-08-25 17:00 -------
Created an attachment (id=16201)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=16201&action=view)
Sample Servlet Filter to set the request encoding

Nope, i meant a servlet filter implementing javax.servlet.Filter. I am
attaching a sample i use often with some things stripped for convinience (so i
may have an error here) and including the  fragments for the web.xml filter
mapping below (i just typed them though, check for spelling!).

The theory is that the user agent makes a UTF-8 request if the current page is
also in UTF-8, but the servlet container cannot be sure the client is indeed
using UTF-8. The solution is to set explicitly the (Http)ServletRequest
encoding for before further processing (i.e. the cocoon servlet). 

hth,

Manos

PS: You'll need to map the servlet in web.xml:


<filter>
<filter-name>FixCharacterEncodingFilter</filter-name>
<description>Sets the character encoding to use for interpreting request 
params</description>
<filter-class>com.geekologue.common.FixCharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
<description>the character encoding to use for interpreting request 
param</description>
</init-param>
</filter>


<filter-mapping>
<filter-name>FixCharacterEncodingFilter</filter-name>
<url-pattern>*</url-pattern>
</filter-mapping>

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

Reply via email to