Great! Just what I was looking for!
Thanks to both of you.
On a side note for those who are interested in an example of serving up
static resources in 1.x:
from(
"jetty:http://0.0.0.0:9080/images/plotdot9-ls.png")
.to("direct:getPNG");
from(
"jetty:http://0.0.0.0:9080/images/plotdot9.png")
.to("direct:getPNG");
from("direct:getPNG").process(new Processor() {
public void process(Exchange exchange) throws Exception {
HttpExchange httpExchange = (HttpExchange) exchange;
String uri = httpExchange.getRequest().getRequestURI();
int fileLocn = uri.lastIndexOf('/');
String filename = uri.substring(fileLocn);
exchange.getOut().setHeader("Content-Type", "image/png");
exchange.getOut().setBody(
this.getClass().getResourceAsStream(
"/images" + filename));
}
});
Claus Ibsen-2 wrote:
>
> Just a side note. There should be a new option in Camel 2.0 -
> matchOnUriPrefix that can allow you to match wildcard URIs.
>
>
--
View this message in context:
http://www.nabble.com/Camel-as-a-web-server-or-Camel-as-part-of-a-web-server--tp22922660p22924385.html
Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.