You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Derek Hohls <DH...@csir.co.za> on 2002/02/25 08:33:32 UTC

Passing a '+' in a request parameter?

I have data that I am reading from a database field (problematic at the
best of times);
I need to pass the field data in a request parameter BUT I have noticed
problems when
one of the fields contains a '+'.  In other words, an attempt request
such as:

?value1=ab+cd&value2=xyz

is shown as

?value1=ab+cd

and do loses the the second value because the '+' seems to be acting as
a separator of sorts...

Does anyone know how to overcome this (bearing in mind that I do not
want to change
the + in the field itself...)

Thanks
Derek

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: Passing a '+' in a request parameter?

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 25.Feb.2002 -- 09:33 AM, Derek Hohls wrote:
> I have data that I am reading from a database field (problematic at the
> best of times);
> I need to pass the field data in a request parameter BUT I have noticed
> problems when
> one of the fields contains a '+'.  In other words, an attempt request
> such as:
> 
> ?value1=ab+cd&value2=xyz
> 
> is shown as
> 
> ?value1=ab+cd
> 
> and do loses the the second value because the '+' seems to be acting as
> a separator of sorts...

Hi,

could you please be a bit more specific on what you are trying to achieve?
The picture above does not sound complete. The database actions never set
request parameters. Actually, whithout creating a new request you are not
able to set request parameters. So there is definitely something missing
above.

Where and how are the parameters set and where and how do you observe the
wrong result?

Please post a sitemap snippet that contains all used pipelines.

	Chris.

-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: Passing a '+' in a request parameter?

Posted by Bertrand Delacretaz <bd...@codeconsult.ch>.
On Monday 25 February 2002 08:33, Derek Hohls wrote:
>. . .
> I need to pass the field data in a request parameter BUT I have
> noticed problems when
> one of the fields contains a '+'.  In other words, an attempt request
> such as:
>
> ?value1=ab+cd&value2=xyz
>
> is shown as
>
> ?value1=ab+cd
>
> and do loses the the second value because the '+' seems to be acting
> as a separator of sorts...

Funny, AFAIK '+' in an URL is the escape sequence for a space, so 

?value1=ab+cd&value2=xyz

should translate to 
value1="ab cd"
value2="xyz"

But anyway, if you're building an URL yourself to pass request values, 
you should URLencode these values, using for example the 
java.net.URLEncoder class.

-Bertrand

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re:

Posted by Torsten Curdt <tc...@dff.st>.
On Mon, 25 Feb 2002, Niket Anand wrote:

> Hi Torsten,
> It is not working even though I downloaded cocoon-2.0.1 and make build of
> it.

Just to make sure we are talking about the same thing: you got a
current CVS copy of the HEAD branch, compiled it and used that one?
(The change is in no release yet!!)

> I also made changes to
>  <input type="image" src="images/submit.gif" name="cocoon-action-Submit"
> value="Submit"/>
> What else do I need to change to make it run?

Nothing actually...

...if this still doesn't work please send me the snippet from the logfile
where all the request parameters are listed...

Thanks
--
Torsten


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re:

Posted by Bert Van Kets <be...@visitronics.be>.
Did you download the latest CVS build?  That version is 
2.0.2-dev!!  Classes are updated nearly every day.
The easiest way to get a pretty recent CVS version is through 
http://cvs.apache.org/snapshots/xml-cocoon2/
Bert

At 17:03 25/02/2002 +0530, you wrote:
>Hi Torsten,
>It is not working even though I downloaded cocoon-2.0.1 and make build of
>it.
>I also made changes to
>  <input type="image" src="images/submit.gif" name="cocoon-action-Submit"
>value="Submit"/>
>What else do I need to change to make it run?
>Pls reply back asap.
>Thanks for ur precious time.
>Niket
>----- Original Message -----
>From: "Torsten Curdt" <tc...@dff.st>
>To: <co...@xml.apache.org>
>Sent: Monday, February 25, 2002 2:48 PM
>Subject: Re: <input type="image" src="images/submit.gif"
>name="cocoon-action" value="Submit">
>
>
> > On Mon, 25 Feb 2002, Niket Anand wrote:
> >
> > > Hi All,
> > > I am using image button of type image with name="cocoon-action".
> > > As per cocoon2 to perform action event, type should be type="submit".But
>I
> > > am having
> > > <input type="image" src="images/submit.gif" name="cocoon-action"
> > > value="Submit"/> and onclick of this button it does not perform action.
> > > How can I execute some action or invoke class on submit of this type of
> > > button.
> > >  I am facing problem if I change type="submit", it displays simple
>button
> > > but not the image type button.
> > > Pls help me out of this problem.
> > > Thanks,
> > > Niket
> >
> > Hi, Niket,
> >
> > you are facing a bug that has been around forever :) But this has been
> > resolved in the latest CVS version. In the latest CVS version the
> > cocoon-action syntax has been deprecated (but is still supported) because
> > of some of i18n problems - anyway.
> >
> > Get yourself a CVS copy and you may use your action as follows:
> >
> >  <input type="image" src="images/submit.gif" name="cocoon-action-Submit"
>value="Whatever you want - hit here">
> >
> > Please note that the action as defined in the action-set is now included
> > within the name of the input!!
> >
> > Hope this helps
> > --
> > Torsten
> >
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <co...@xml.apache.org>
> > For additional commands, e-mail: <co...@xml.apache.org>
>
>
>---------------------------------------------------------------------
>Please check that your question has not already been answered in the
>FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
>To unsubscribe, e-mail: <co...@xml.apache.org>
>For additional commands, e-mail: <co...@xml.apache.org>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re:

Posted by Niket Anand <ni...@npi.stpn.soft.net>.
Hi Torsten,
It is not working even though I downloaded cocoon-2.0.1 and make build of
it.
I also made changes to
 <input type="image" src="images/submit.gif" name="cocoon-action-Submit"
value="Submit"/>
What else do I need to change to make it run?
Pls reply back asap.
Thanks for ur precious time.
Niket
----- Original Message -----
From: "Torsten Curdt" <tc...@dff.st>
To: <co...@xml.apache.org>
Sent: Monday, February 25, 2002 2:48 PM
Subject: Re: <input type="image" src="images/submit.gif"
name="cocoon-action" value="Submit">


> On Mon, 25 Feb 2002, Niket Anand wrote:
>
> > Hi All,
> > I am using image button of type image with name="cocoon-action".
> > As per cocoon2 to perform action event, type should be type="submit".But
I
> > am having
> > <input type="image" src="images/submit.gif" name="cocoon-action"
> > value="Submit"/> and onclick of this button it does not perform action.
> > How can I execute some action or invoke class on submit of this type of
> > button.
> >  I am facing problem if I change type="submit", it displays simple
button
> > but not the image type button.
> > Pls help me out of this problem.
> > Thanks,
> > Niket
>
> Hi, Niket,
>
> you are facing a bug that has been around forever :) But this has been
> resolved in the latest CVS version. In the latest CVS version the
> cocoon-action syntax has been deprecated (but is still supported) because
> of some of i18n problems - anyway.
>
> Get yourself a CVS copy and you may use your action as follows:
>
>  <input type="image" src="images/submit.gif" name="cocoon-action-Submit"
value="Whatever you want - hit here">
>
> Please note that the action as defined in the action-set is now included
> within the name of the input!!
>
> Hope this helps
> --
> Torsten
>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re:

Posted by Torsten Curdt <tc...@dff.st>.
On Mon, 25 Feb 2002, Niket Anand wrote:

> Hi All,
> I am using image button of type image with name="cocoon-action".
> As per cocoon2 to perform action event, type should be type="submit".But I
> am having
> <input type="image" src="images/submit.gif" name="cocoon-action"
> value="Submit"/> and onclick of this button it does not perform action.
> How can I execute some action or invoke class on submit of this type of
> button.
>  I am facing problem if I change type="submit", it displays simple button
> but not the image type button.
> Pls help me out of this problem.
> Thanks,
> Niket

Hi, Niket,

you are facing a bug that has been around forever :) But this has been
resolved in the latest CVS version. In the latest CVS version the
cocoon-action syntax has been deprecated (but is still supported) because
of some of i18n problems - anyway.

Get yourself a CVS copy and you may use your action as follows:

 <input type="image" src="images/submit.gif" name="cocoon-action-Submit" value="Whatever you want - hit here">

Please note that the action as defined in the action-set is now included
within the name of the input!!

Hope this helps
--
Torsten



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Posted by Niket Anand <ni...@npi.stpn.soft.net>.
Hi All,
I am using image button of type image with name="cocoon-action".
As per cocoon2 to perform action event, type should be type="submit".But I
am having
<input type="image" src="images/submit.gif" name="cocoon-action"
value="Submit"/> and onclick of this button it does not perform action.
How can I execute some action or invoke class on submit of this type of
button.
 I am facing problem if I change type="submit", it displays simple button
but not the image type button.
Pls help me out of this problem.
Thanks,
Niket




---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


RE: Passing a '+' in a request parameter?

Posted by Varada <va...@e2econnect.net>.
hi

u problem of plus sign be solved. Before sending the data u parse the
database field to check for plus and replace it with some character
sequence.
Or just a guess ... can't u send ++ (i.e. two consecutive plus sign) for
single plus sign.

regards

I have data that I am reading from a database field (problematic at the
best of times);
I need to pass the field data in a request parameter BUT I have noticed
problems when
one of the fields contains a '+'.  In other words, an attempt request
such as:

?value1=ab+cd&value2=xyz

is shown as

?value1=ab+cd

and do loses the the second value because the '+' seems to be acting as
a separator of sorts...

Does anyone know how to overcome this (bearing in mind that I do not
want to change
the + in the field itself...)

Thanks
Derek

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>