cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Per Kreipke" <>
Subject RE: Building a query string with '&'....
Date Wed, 22 Nov 2000 06:08:37 GMT

The following works:

	<!-- Build the URL ahead of time -->
		String myUrl = "http://localhost/folders/query-feeds.xml?QueryType="
				+ URLEncoder.encode(<request:get-parameter name="QueryType"/>)
				+ "<![CDATA[&QueryText=]]>"
				+ URLEncoder.encode(<request:get-parameter name="QueryText"/>)
				+ "<![CDATA[&QueryLog=]]>"
				+ URLEncoder.encode(<request:get-parameter name="QueryLog"/>);

Two things made a definite difference:
- moving the string concatenation out of the <util:href> tag. The reason is
that <util:include-uri> quotes the href element and this confuses the XSP
processor. Doing this and using CDATA around the expression &QueryText=
fixed the parsing problem

Then all of a sudden, QueryText parameters with spaces in them were accepted
to this XSP file but weren't passed on correctly to the remote host being

- correctly re-encoding the query args fixed that.


View raw message