You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Brent L Johnson <br...@bjohnson.net> on 2004/02/07 23:40:21 UTC

Encoding Params in the Sitemap

Is there a way I can encode the {request-param:paramname} in
a sitemap?  I'm trying to use a request parameter in
the HTMLGenerator as part of a GET request, but using
{request-param:paramname} decodes the parameter.  So
if the parameter has a space - instead of putting a %20
back into the GET it gets decoded back into an
actual space character.

Thanks,

- Brent


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


I can't make the xmldb sample work

Posted by Ray Allis <ra...@comcast.net>.
I'm on a Solaris 9 SPARC.

Downloaded cocoon-2.1_20040207231301.tar.gz -- ./build.sh war

cp cocoon.war jakarta-tomcat-5.0.18/webapps -- start tomcat -- navigate to:

http://metaphor:8080/cocoon/samples/xmldb/populate

(This is the second time so db create fails - but everything else except
insert samples.xml fails every time.)

<p>Create collection should succeed on the first run, but will fail on subsequent runs</p>
  
<textarea cols="75" rows="3">
    <x:query oid="cocoon/" type="create" result="failure" xmlns:x="http://apache.org/cocoon/xmldb/1.0">Failed to create collection cocoon/: 201</x:query>
  </textarea>  

<h3>Import sitemap.xmap ...</h3>
  
<textarea cols="75" rows="3">
    <x:query oid="sitemap.xmap" type="create" result="failure" xmlns:x="http://apache.org/cocoon/xmldb/1.0">Failed to create resource sitemap.xmap: 1</x:query>
  </textarea>
      
<h3>Import xmldb2samples.xsl ...</h3>
  
<textarea cols="75" rows="3">
    <x:query oid="xmldb2samples.xsl" type="create" result="failure" xmlns:x="http://apache.org/cocoon/xmldb/1.0">Failed to create resource xmldb2samples.xsl: 1</x:query>
 </textarea>
  
<h3>Import samples.xml ...</h3>
  
<textarea cols="75" rows="3">
    <x:query oid="samples.xml" type="create" result="success" xmlns:x="http://apache.org/cocoon/xmldb/1.0"/>
  </textarea>

<h3>Perform XUpdate on samples.xml ...</h3>

<textarea cols="75" rows="3">
    <x:query oid="samples.xml" type="update" result="failure" xmlns:x="http://apache.org/cocoon/xmldb/1.0">Failed to update resource samples.xml: 1</x:query>
  </textarea>
  
<h3>Import samples.xml as xsamples.xml ...</h3>
  
<textarea cols="75" rows="3">
    <x:query oid="xsamples.xml" type="create" result="success" xmlns:x="http://apache.org/cocoon/xmldb/1.0"/>
  </textarea>
 
<h3>Perform XUpdate on xsamples.xml ...</h3>
  
<textarea cols="75" rows="3">
    <x:query oid="xsamples.xml" type="update" result="failure" xmlns:x="http://apache.org/cocoon/xmldb/1.0">Failed to update resource xsamples.xml: 1</x:query>
  </textarea>
--
I discovered that any file with xx:yyy namespace declarations will not load.

I found some mail implicating xerces 2.6, so I tried removing it.  No change.
I removed the lib/endorsed xerces from tomcat, but then tomcat won't run. ;)

I remembered that this works with jetty, so:

jetty:

http://metaphor:8888/samples/xmldb/populate
-- all successful  !  Looks like they all were inserted into the db:

http://metaphor:8888/samples/xmldb/db/cocoon/

-<xmldb:collections resources="4" collections="0" 
base="xmldb:xindice-embed:///db/cocoon/">
<xmldb:resource name="samples.xml"/>
<xmldb:resource name="sitemap.xmap"/>
<xmldb:resource name="xmldb2samples.xsl"/>
<xmldb:resource name="xsamples.xml"/>
</xmldb:collections>

But sitemap.xmap can not be retrieved.  The others can, but:

http://metaphor:8888/samples/xmldb/db/cocoon/sitemap.xml

Resource not found

Document xmldb:xindice-embed:///db/cocoon/sitemap.xml not found

org.apache.cocoon.ResourceNotFoundException: Document 
xmldb:xindice-embed:///db/cocoon/sitemap.xml not found
--
It looks like jetty uses xerces.2.6 -- I don't understand what's going 
on.  :-(

I removed map: from (a copy of) sitemap.xmap on the tomcat system and it 
loaded and displayed just fine.

Any clues will be greatly appreciated.

Ray Allis


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: Encoding Params in the Sitemap

Posted by Brent L Johnson <br...@bjohnson.net>.
Wow that took about 15 seconds.. yes when including
"input parameters" in my search I found another
thread that's exactly what I was looking for here...

http://marc.theaimsgroup.com/?t=106673841800003&r=1&w=2

Thanks,

- Brent

> -----Original Message-----
> From: Geoff Howard [mailto:cocoon@leverageweb.com] 
> Sent: Saturday, February 07, 2004 6:10 PM
> To: users@cocoon.apache.org
> Subject: Re: Encoding Params in the Sitemap
> 
> 
> Brent L Johnson wrote:
> 
> > Is there a way I can encode the {request-param:paramname} in a 
> > sitemap?  I'm trying to use a request parameter in the 
> HTMLGenerator 
> > as part of a GET request, but using 
> {request-param:paramname} decodes 
> > the parameter.  So if the parameter has a space - instead 
> of putting a 
> > %20 back into the GET it gets decoded back into an
> > actual space character.
> 
> Check the archives for this one - I know its been discussed several 
> times but don't remember the solution.  An input module is 
> the likely cure.
> 
> Geoff
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Encoding Params in the Sitemap

Posted by Jorg Heymans <jh...@domek.be>.
Brent L Johnson wrote:

> Dangit - please ignore that slappy email address.  This
> is an email address I setup specifically to test
> my webmail functionality.  For some reason Outlook
> keeps defaulting replies to this list to that
> email address.
> 
> My apologies...

no problemo Slappy !

;)
Jorg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: Encoding Params in the Sitemap

Posted by Brent L Johnson <br...@bjohnson.net>.
Dangit - please ignore that slappy email address.  This
is an email address I setup specifically to test
my webmail functionality.  For some reason Outlook
keeps defaulting replies to this list to that
email address.

My apologies...

- Brent

> -----Original Message-----
> From: Slappy Tang [mailto:slappy@bjohnson.net] 
> Sent: Monday, February 09, 2004 10:22 AM
> To: users@cocoon.apache.org
> Subject: RE: Encoding Params in the Sitemap
> 
> 
> It was - and the solution was to use the 
> RawRequestParameterModule.  I found some docs in the Wiki for 
> using this... but it doesn't seem to work as it should.  The 
> parameter returned is still not the encoded version.
> 
> I then talked with Joakim Verona and found
> that he emailed a patch to the mailing list.
> I used his patched version and it works just
> fine now.
> 
> Is his patch included in CVS now?
> 
> Thanks,
> 
> - Brent
> 
> > -----Original Message-----
> > From: Geoff Howard [mailto:cocoon@leverageweb.com]
> > Sent: Saturday, February 07, 2004 6:10 PM
> > To: users@cocoon.apache.org
> > Subject: Re: Encoding Params in the Sitemap
> > 
> > 
> > Brent L Johnson wrote:
> > 
> > > Is there a way I can encode the {request-param:paramname} in a
> > > sitemap?  I'm trying to use a request parameter in the 
> > HTMLGenerator
> > > as part of a GET request, but using
> > {request-param:paramname} decodes
> > > the parameter.  So if the parameter has a space - instead
> > of putting a
> > > %20 back into the GET it gets decoded back into an
> > > actual space character.
> > 
> > Check the archives for this one - I know its been discussed several
> > times but don't remember the solution.  An input module is 
> > the likely cure.
> > 
> > Geoff
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
> > 
> > 
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: Encoding Params in the Sitemap

Posted by Slappy Tang <sl...@bjohnson.net>.
It was - and the solution was to use the
RawRequestParameterModule.  I found some docs
in the Wiki for using this... but it doesn't
seem to work as it should.  The parameter
returned is still not the encoded version.

I then talked with Joakim Verona and found
that he emailed a patch to the mailing list.
I used his patched version and it works just
fine now.

Is his patch included in CVS now?

Thanks,

- Brent

> -----Original Message-----
> From: Geoff Howard [mailto:cocoon@leverageweb.com] 
> Sent: Saturday, February 07, 2004 6:10 PM
> To: users@cocoon.apache.org
> Subject: Re: Encoding Params in the Sitemap
> 
> 
> Brent L Johnson wrote:
> 
> > Is there a way I can encode the {request-param:paramname} in a 
> > sitemap?  I'm trying to use a request parameter in the 
> HTMLGenerator 
> > as part of a GET request, but using 
> {request-param:paramname} decodes 
> > the parameter.  So if the parameter has a space - instead 
> of putting a 
> > %20 back into the GET it gets decoded back into an
> > actual space character.
> 
> Check the archives for this one - I know its been discussed several 
> times but don't remember the solution.  An input module is 
> the likely cure.
> 
> Geoff
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: Encoding Params in the Sitemap

Posted by Brent L Johnson <br...@bjohnson.net>.
Yeah I've searched around the archives quite a bit... and
I've found some hits on the HTMLGenerator and on encoding
parameters but nothing that's quite the same as what
I'm looking for.

But I'll keep looking.. and I'll focus some on the input
module and see if that's the key.

Thanks!

- Brent

> -----Original Message-----
> From: Geoff Howard [mailto:cocoon@leverageweb.com] 
> Sent: Saturday, February 07, 2004 6:10 PM
> To: users@cocoon.apache.org
> Subject: Re: Encoding Params in the Sitemap
> 
> 
> Brent L Johnson wrote:
> 
> > Is there a way I can encode the {request-param:paramname} in a 
> > sitemap?  I'm trying to use a request parameter in the 
> HTMLGenerator 
> > as part of a GET request, but using 
> {request-param:paramname} decodes 
> > the parameter.  So if the parameter has a space - instead 
> of putting a 
> > %20 back into the GET it gets decoded back into an
> > actual space character.
> 
> Check the archives for this one - I know its been discussed several 
> times but don't remember the solution.  An input module is 
> the likely cure.
> 
> Geoff
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Encoding Params in the Sitemap

Posted by Geoff Howard <co...@leverageweb.com>.
Brent L Johnson wrote:

> Is there a way I can encode the {request-param:paramname} in
> a sitemap?  I'm trying to use a request parameter in
> the HTMLGenerator as part of a GET request, but using
> {request-param:paramname} decodes the parameter.  So
> if the parameter has a space - instead of putting a %20
> back into the GET it gets decoded back into an
> actual space character.

Check the archives for this one - I know its been discussed several 
times but don't remember the solution.  An input module is the likely cure.

Geoff


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org