camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kazi, Iftekhar" <Kaz...@UPMC.EDU>
Subject RE: Routing to a Servlet
Date Fri, 07 Jan 2011 00:39:47 GMT
The Servlet Exists and when accessed comes up with an html form with a submit button. However,
using the route below lends an error. 

<route>
<from uri="direct:start" />
<to uri="xslt:sometransform.xsl"/>
<setHeader headerName="CamelHttpMethod">
	<constant>POST</constant>
</setHeader>
<to uri="http://tlsomnnstst01:8080/servletsample" />

> <to uri="http://localhost:8080/myApp/ServletSample" />

-----Original Message-----
From: Willem Jiang [mailto:willem.jiang@gmail.com] 
Sent: Thursday, January 06, 2011 7:32 PM
To: users@camel.apache.org
Subject: Re: Routing to a Servlet

On 1/7/11 8:23 AM, Kazi, Iftekhar wrote:
> Is it possible to post a payload to a existing Servlet on another server using Camel
?
>
> Eg.
>
> <route>
> <from uri="direct:start" />
> <to uri="xslt:sometransform.xsl"/>
<setHeader headerName="CamelHttpMethod">
				<constant>POST</constant>
			</setHeader>
	<to uri="http://tlsomnnstst01:8080/servletsample" />

> <to uri="http://localhost:8080/myApp/ServletSample" />
>
> Where http://localhost:8080/myApp/ServletSample is an existing Servlet ? Thanks
>
>
>

Absolutely yes.
camel-http component can send the request to the existing servlet. 
Please make sure the servlet can be accessed locally.

-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang


Mime
View raw message