On Fri, Jan 11, 2013 at 11:48 AM, Manoj Kolhe <harddrive.ma...@gmail.com> wrote:
> Hi,
>
> I am a newbie using Apache Camel.
>
> I am trying to configure 2 different routes based on the servlet example in
> the package.
>
> My route configuration looks as below:
>
> <camel:route id="route1">
>         <camel:from uri="servlet:///hello"/>
>                 <camel:choice>
>                         <camel:when>
>                                 <camel:header>name</camel:header>
>                                 <camel:transform>
>                                         <camel:simple>Hello ${header.name} 
> world</camel:simple>
>                                 </camel:transform>
>                         </camel:when>
>                         <camel:otherwise>
>                                 <camel:to
> uri="http://localhost:8080?&amp;bridgeEndpoint=true&amp;throwExceptionOnFailure=false"/>
>                         </camel:otherwise>
>                 </camel:choice>
>
>   </camel:route>
>
>
>
>  <camel:route id="route2">
>         <camel:from uri="servlet:///helloWorld"/>
>                 <camel:choice>
>                         <camel:when>
>                                 <camel:header>name</camel:header>
>                                 <camel:transform>
>                                         <camel:simple>Hello ${header.name} 
> world</camel:simple>
>                                 </camel:transform>
>                         </camel:when>
>                         <camel:otherwise>
>                                 <camel:to
> uri="http://10.74.81.81:8080?bridgeEndpoint=true&amp;throwExceptionOnFailure=false"/>
>                         </camel:otherwise>
>                 </camel:choice>
>
>   </camel:route>
>
>
>
> I wish to pass parameters and somewhere for to:uri servlet path which I read
> from somewhere can be done as
> servletName[?requestParameter1=parameterValue1&requestParameter2=....]
>
> When tried using above, I get xml parsing exception while loading the
> application.
>

In XML the & should be defined as &amp;
If not you can get xml parsing errors.


> Can please suggest how to pass parameters at runtime?
>
> Thanks in advance,
> Manoj Kolhe
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-Spring-XML-tp5725366.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to