Thank for the tip, but I did find this trick and it did not work either 

Failed to load sitemap from
file:/C:/jakarta-tomcat-4.1.29/webapps/cocoon/ngwd/search/sitemap.xmap

org.apache.cocoon.ProcessingException: Failed to load sitemap from
file:/C:/jakarta-tomcat-4.1.29/webapps/cocoon/ngwd/search/sitemap.xmap:
org.apache.avalon.framework.configuration.ConfigurationException: Error
while creating node 'generate' at
file:/C:/jakarta-tomcat-4.1.29/webapps/cocoon/ngwd/search/sitemap.xmap:23:22
4

cause: org.apache.avalon.framework.component.ComponentException:
input-modules: ComponentSelector could not find the component for hint
[url-encode] (key [url-encode])



>>
http://localhost:8080/cocoon/api/java/org/apache/cocoon/components/modules/i
nput/URLEncodeModule.html
interesting, I don't have this one, this explains the previous error.

I have 2.1.5 (running on JDK 1.4.x on Win2000 Server)

I assume I must recompile with some option turned on ?


-----Message d'origine-----
De : g[R]eK [mailto:[EMAIL PROTECTED]
Envoy� : 21 septembre, 2004 09:37
� : Boisvert, �ric
Objet : Re: spaces in request-param


<. Hi �ric! .>

Tuesday, September 21, 2004, 2:11:37 PM, you wrote:

B�> Greetings

B�> I'm trying to solve a problem that I think is a very basic
functionality.  I
B�> simply cannot believe there are no way to do this, but after 2 days
googling
B�> aroung,. I still don't find a solution to this.

B�> I'm trying to pass request-parameter that contains spaces to a generator
,
B�> using this pipeline:

B�> <map:pipeline>
B�>  <map:match pattern="gazetteer">
B�>     <map:generate type="file"
B�>
src="http://cgdi-dev.geoconnections.org/cgi-bin/prototypes/cgdigaz/cgdigaz.c
B�>
gi?version=1.0&amp;request=GetPlacenameGeometry&amp;geomtype=bbox&amp;PLACEN
B�> AME={raw-request-param:PLACE}"/>

I'm not sure why raw-request-param is used. To avoid decoding and casting? I
think it's not good practice. Try to use url-encode[1] and request-param
modules:
{url-encode:{request-param:PLACE}}

It works for me very well.

<snip/>

B�> and somewhere down this impressive list I see

B�> Caused by: java.io.IOException: Server returned HTTP response code: 400
for
B�> URL:
B�>
http://cgdi-dev.geoconnections.org/cgi-bin/prototypes/cgdigaz/cgdigaz.cgi?ve
B�> rsion=1.0&request=GetPlacenameGeometry&geomtype=bbox&PLACENAME=Black
River
B�>     at

RFC[2] says:
400 Bad Request

The request could not be understood by the server due to malformed syntax.

I think it's error due to not escapted spaces or other characters.

B�> Of course, if I copy this URL
B�>
(http://cgdi-dev.geoconnections.org/cgi-bin/prototypes/cgdigaz/cgdigaz.cgi?v
B�> ersion=1.0&request=GetPlacenameGeometry&geomtype=bbox&PLACENAME=Black
B�> River)and copy it in a browser, it works fine

AFAIK Browsers escape charactacters automatically.

B�> Any clue ?  Sorry if I missed something obvious but I search and did not
B�> find anything.  I can't believe I'm the only one passing parameters with
B�> spaces in the whole cocoon community ! 

Hope this help.

[1]
http://localhost:8080/cocoon/api/java/org/apache/cocoon/components/modules/i
nput/URLEncodeModule.html
    (I give you local link because javadocs on cocoon's site seem to be
outdate)
[2] http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

-- 
Best regards
<. g[R]eK mailto:[EMAIL PROTECTED]                                    .>


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

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

Reply via email to