You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Allan Kamau <hu...@yahoo.com> on 2001/05/07 14:38:32 UTC

passing parameters in xsp

The I able to pass a single parameter to a resource in
my xsp using the example below found in the FAQs
however I get errors if I try to join more than one
parameter using '+' and then starting my second
parameter using '&' as we usually do for a resource
processing a GET.

<util:include-uri>
     
<util:href><xsp:expr>"http://myserver.com/servlets/foo?x="
+ request.
       getParameter ("foo")</xsp:expr></util:href>
     </util:include-uri>

Allan Kamau

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

---------------------------------------------------------------------
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 multiple parameters in xsp

Posted by Allan Kamau <hu...@yahoo.com>.
Am still searching a solution to the problem below.
Kindly help.
--- Allan Kamau <hu...@yahoo.com> wrote:
> The I able to pass a single parameter to a resource
> in
> my xsp using the example below found in the FAQs
> however I get errors if I try to join more than one
> parameter using '+' and then starting my second
> parameter using '&' as we usually do for a resource
> processing a GET.
> 
> <util:include-uri>
>      
>
<util:href><xsp:expr>"http://myserver.com/servlets/foo?x="
> + request.
>        getParameter ("foo")</xsp:expr></util:href>
>      </util:include-uri>
> 
> Allan Kamau
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great
> prices
> http://auctions.yahoo.com/
> 
>
---------------------------------------------------------------------
> 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>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

---------------------------------------------------------------------
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 multiple parameters in xsp

Posted by Allan Kamau <hu...@yahoo.com>.
Thanks Allan Erskine,

I had over looked that.

Allan Kamau.

--- Allan Erskine <a....@cs.ucl.ac.uk> wrote:
> & is a reserved characted in XML.  You need to
> escape it as &amp; or
> enclosed the contents of your <xsp:expr> element in
> a <![CDATA[ ...expr code
> here...  ]]> tag.
> 
> Allan
> 
> > -----Original Message-----
> > From: Allan Kamau [mailto:hugebirdwings@yahoo.com]
> > Sent: 08 May 2001 09:05
> > To: cocoon-users@xml.apache.org
> > Subject: Re: passing multiple parameters in xsp
> >
> >
> > Am still searching a solution to the problem
> below.
> > Kindly help.
> > --- Allan Kamau <hu...@yahoo.com> wrote:
> > > The I able to pass a single parameter to a
> resource
> > > in
> > > my xsp using the example below found in the FAQs
> > > however I get errors if I try to join more than
> one
> > > parameter using '+' and then starting my second
> > > parameter using '&' as we usually do for a
> resource
> > > processing a GET.
> > >
> > > <util:include-uri>
> > >
> > >
> >
>
<util:href><xsp:expr>"http://myserver.com/servlets/foo?x=">
> > + request.
> > >        getParameter
> ("foo")</xsp:expr></util:href>
> > >      </util:include-uri>
> > >
> > > <util:include-uri>
> > >
> > The code above will run successfully.
> > >
> >
>
<util:href><xsp:expr>"http://myserver.com/servlets/foo?x="
> > > + request.
> > >        getParameter
> >
>
("foo")+"&secondParameter="+request.getParameter("secondParame
> > terValue")
> > </xsp:expr></util:href>
> > </util:include-uri>
> >
> > The second code will throw an error indicating a
> > violation in the validity of the XML document.
> >
> >
> > > Allan Kamau
> > >
> > >
> __________________________________________________
> > > Do You Yahoo!?
> > > Yahoo! Auctions - buy the things you want at
> great
> > > prices
> > > http://auctions.yahoo.com/
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > 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>
> > >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Auctions - buy the things you want at great
> prices
> > http://auctions.yahoo.com/
> >
> >
>
---------------------------------------------------------------------
> > 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>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

---------------------------------------------------------------------
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 multiple parameters in xsp

Posted by Allan Erskine <a....@cs.ucl.ac.uk>.
& is a reserved characted in XML.  You need to escape it as &amp; or
enclosed the contents of your <xsp:expr> element in a <![CDATA[ ...expr code
here...  ]]> tag.

Allan

> -----Original Message-----
> From: Allan Kamau [mailto:hugebirdwings@yahoo.com]
> Sent: 08 May 2001 09:05
> To: cocoon-users@xml.apache.org
> Subject: Re: passing multiple parameters in xsp
>
>
> Am still searching a solution to the problem below.
> Kindly help.
> --- Allan Kamau <hu...@yahoo.com> wrote:
> > The I able to pass a single parameter to a resource
> > in
> > my xsp using the example below found in the FAQs
> > however I get errors if I try to join more than one
> > parameter using '+' and then starting my second
> > parameter using '&' as we usually do for a resource
> > processing a GET.
> >
> > <util:include-uri>
> >
> >
> <util:href><xsp:expr>"http://myserver.com/servlets/foo?x=">
> + request.
> >        getParameter ("foo")</xsp:expr></util:href>
> >      </util:include-uri>
> >
> > <util:include-uri>
> >
> The code above will run successfully.
> >
> <util:href><xsp:expr>"http://myserver.com/servlets/foo?x="
> > + request.
> >        getParameter
> ("foo")+"&secondParameter="+request.getParameter("secondParame
> terValue")
> </xsp:expr></util:href>
> </util:include-uri>
>
> The second code will throw an error indicating a
> violation in the validity of the XML document.
>
>
> > Allan Kamau
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Auctions - buy the things you want at great
> > prices
> > http://auctions.yahoo.com/
> >
> >
> ---------------------------------------------------------------------
> > 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>
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
>
> ---------------------------------------------------------------------
> 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: passing multiple parameters in xsp

Posted by Allan Kamau <hu...@yahoo.com>.
Am still searching a solution to the problem below.
Kindly help.
--- Allan Kamau <hu...@yahoo.com> wrote:
> The I able to pass a single parameter to a resource
> in
> my xsp using the example below found in the FAQs
> however I get errors if I try to join more than one
> parameter using '+' and then starting my second
> parameter using '&' as we usually do for a resource
> processing a GET.
> 
> <util:include-uri>
>      
>
<util:href><xsp:expr>"http://myserver.com/servlets/foo?x=">
+ request.
>        getParameter ("foo")</xsp:expr></util:href>
>      </util:include-uri>
> 
> <util:include-uri>
>      
The code above will run successfully.
>
<util:href><xsp:expr>"http://myserver.com/servlets/foo?x="
> + request.
>        getParameter
("foo")+"&secondParameter="+request.getParameter("secondParameterValue")
</xsp:expr></util:href>
</util:include-uri>

The second code will throw an error indicating a
violation in the validity of the XML document.


> Allan Kamau
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great
> prices
> http://auctions.yahoo.com/
> 
>
---------------------------------------------------------------------
> 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>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

---------------------------------------------------------------------
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>