Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

If you use maven then you can easily package the example from the command line:

Code Block

mvn package

About

This example demonstrates how you can create light-weight web applications without the need for Spring Framework.
The example contains a Camel routes that used the Servlet component to expose a http service.

...

In the web.xml file in the src/main/webapp/WEB-INF folder we have both a CamelServlet and CamelContextListener defined.
The CamelServlet is mandatory to do when using the Servlet component. And the CamelServletContextListener JndiCamelServletContextListener is used to bootstrap the Camel application.

...

This example runs in any web container such as Apache Tomcat. For example to deploy in Apache Tomcat you will have to package the .war file and copy it to the webapp folder of Tomcat, which is the hot deploy folder.Note: You have to use the version number of Camel you use. In this documentation we are using 2.11.0.

There is a main page at: http://localhost:8080/camel-example-servlet-tomcat-no-spring-2.11.0Image Removed which has more instructions.
You can then use a web browser and send a request to the http://localhost:8080/camel-example-servlet-tomcat-no-spring-2.11.0/camel/helloImage Removed url.

See Also