cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Enke Michael <Michael.E...@wincor-nixdorf.com>
Subject Patch: encoding for requests
Date Tue, 09 Oct 2001 09:59:13 GMT
Hi,
there is no support for different encodings for the
<xsp-request:get-parameter> tag as I found after
reading "C2 Foriegn Language Support".
But this is essential for e.g. form input fields
if the form has another encoding than the jsp container.
This patch introduces two attributes:
<xsp-request:get-parameter name="..." encoding="aaa" jspEncoding="bbb"/>
- aaa is the encoding of the form data (in URL e.g. <URL>?input=%a1%b2)
- bbb is the encoding the jsp container uses.
  The default per JSP spec is ISO-8859-1 and this is also the default
  in this patch. But if someone likes to have another encoding
  for the JSP container he has to specify here too.

If the formular uses UTF-8 encoding and we didn't change the
tomcat encoding, we have to write:
<xsp-request:get-parameter name="..." encoding="UTF-8"/>

Following the patches for:
xdocs/request.xml
src/org/apache/cocoon/components/language/markup/xsp/XSPRequestHelper.java
src/org/apache/cocoon/components/language/markup/xsp/java/request.xsl

Michael

PS: IMHO i's a miss in the JSP spec that there is no getParameter(String
encoding)


Mime
View raw message