cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From juergen.sonna...@t-online.de (Jürgen Sonnauer)
Subject Trouble with request parameter encoding
Date Sat, 28 Jul 2001 15:24:07 GMT
Hi!

i was using Cocoon 1.8.2 and want to use the improvements
from 1.8.3-dev. After building the java archive from a recent
development snapshot, i have a problem with special characters
in request parameters. 
If you could try out the following XSP page and type "Jürgen"
in the text input field you get something like this:
http://localhost:8080/cocoon/DumpRequestParameter.xml?test=J%C3%BCrgen
What i'm doing wrong?

Regards,
Jürgen Sonnauer

<?xml version="1.0"?>
<?cocoon-process type="xsp"?>

<xsp:page language="java" create-session="false" 
     xmlns:xsp="http://www.apache.org/1999/XSP/Core">

<html>
  <body>
  <form name="test" method="get" action="DumpRequestParameter.xml">
    <input type="text" name="test" size="10"/>
    <input type="submit" value="Send"/>
  </form>
  <xsp:logic>
   java.util.Enumeration enum = request.getParameterNames();
   while (enum.hasMoreElements())
   {
     String key = (String) enum.nextElement();
     String value = (String) request.getParameter(key);
     <p><xsp:expr>key + ": " + value</xsp:expr></p>
  }
  </xsp:logic>
  </body>
</html>

</xsp:page>


Mime
View raw message