Servlet

JVM since0.2.0 Native since0.0.2

Serve HTTP requests by a Servlet.

What’s inside

Please refer to the above link for usage and configuration details.

Maven coordinates

Or add the coordinates to your existing project:

<dependency>
    <groupId>org.apache.camel.quarkus</groupId>
    <artifactId>camel-quarkus-servlet</artifactId>
</dependency>

Check the User guide for more information about writing Camel Quarkus applications.

transferException option in native mode

To use the transferException option in native mode, you must enable support for object serialization. Refer to the native mode user guide for more information.

You will also need to enable serialization for the exception classes that you intend to serialize. For example.

@RegisterForReflection(targets = { IllegalStateException.class, MyCustomException.class }, serialization = true)

Additional Camel Quarkus configuration

Configuration property Type Default

quarkus.camel.servlet.url-patterns

A comma separated list of path patterns under which the CamelServlet should be accessible. Example path patterns: /*, /services/*

string

quarkus.camel.servlet.servlet-class

A fully qualified name of a servlet class to serve paths that match url-patterns

string

org.apache.camel.component.servlet.CamelHttpTransportServlet

quarkus.camel.servlet.servlet-name

A servletName as it would be defined in a web.xml file or in the javax.servlet.annotation.WebServlet#name() annotation.

string

CamelServlet

quarkus.camel.servlet."named-servlets".url-patterns

A comma separated list of path patterns under which the CamelServlet should be accessible. Example path patterns: /*, /services/*

string

quarkus.camel.servlet."named-servlets".servlet-class

A fully qualified name of a servlet class to serve paths that match url-patterns

string

org.apache.camel.component.servlet.CamelHttpTransportServlet

quarkus.camel.servlet."named-servlets".servlet-name

A servletName as it would be defined in a web.xml file or in the javax.servlet.annotation.WebServlet#name() annotation.

string

CamelServlet

Configuration property fixed at build time. All other configuration properties are overridable at runtime.