Appendix B SAmple Code Camel Servlet Component The Camel Servlet component is used to process incoming HTTP requests, where the HTTP endpoint is bound to a published servlet. The servlet component is implemented by the following servlet class: org.apache.camel.component.servlet.CamelHttpTransportServlet To create a Camel servlet endpoint in a Camel route, define a servlet endpoint URI as the following syntax, as shown in Figure B-14. servlet://RelativePath[?Options] Web.xml File To deploy the Apache Camel integration application, you must provide a properly configured web.xml file. In the integration project, the web.xml file (Listing B-1) is stored at the following location: Integration/src/main/webapp/WEB-INF. Listing B-1. Web.xml File for the Integration application Example contextConfigLocation classpath:applicationContext.xml org.springframework.web.context.ContextLoaderListener 349
Building Digital Experience Platforms Page 358 Page 360