cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jens Lorenz" <>
Subject Re: RequestParmAction does not work with blanks in form input fie ld
Date Tue, 11 Jun 2002 13:48:58 GMT
RE: RequestParmAction does not work with blanks in form input field
----- Original Message -----
From: Sternath Elmar
To: ''
Sent: Tuesday, June 11, 2002 3:27 PM
Subject: AW: RequestParmAction does not work with blanks in form input fie

... Ooops. Pressed <enter> to quickly ...

> You're right, the exception does not have to do anything with the
blanks. What I
> want to do is the following: I try to get request params using
> Then I add these request parms to a http get request string in my
> <map:part
> &amp;SalesChannel={../1}"/

> Unfortunately, as soon as the request params contain characters which
must be
> escaped (like blanks) this http get request fails. I already tried to
> requestQuery instead of single params, but this does not work for
browser http post
> which I need
> because of doing file upload. Any ideas how to solve this problem?
> Thanks,
> Elmar

For these cases I have this Action (which is IMHO missing in Cocoon) ...

public class EncodeParameterAction extends AbstractAction implements
 public Map act( Redirector redirector, SourceResolver resolver, Map
objectModel, String src,
   Parameters parameters ) throws Exception
  Logger logger = getLogger();

  String value = parameters.getParameter( "value" );
  String destkey = parameters.getParameter( "destkey" );

  Map resultMap = new HashMap();

  String encodedValue = URLEncoder.encode( value );
  resultMap.put( destkey, encodedValue );

  return resultMap;




jens.lorenz at interface-projects dot de

interface:projects GmbH                             \\|//
Tolkewitzer Strasse 49                              (o o)
01277 Dresden                               ~~~~oOOo~(_)~oOOo~~~~

Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message