// Do not edit directly!
// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
= Servlet
:page-aliases: extensions/servlet.adoc
:linkattrs:
:cq-artifact-id: camel-quarkus-servlet
:cq-native-supported: true
:cq-status: Stable
:cq-status-deprecation: Stable
:cq-description: Serve HTTP requests by a Servlet.
:cq-deprecated: false
:cq-jvm-since: 0.2.0
:cq-native-since: 0.0.2

[.badges]
[.badge-key]##JVM since##[.badge-supported]##0.2.0## [.badge-key]##Native since##[.badge-supported]##0.0.2##

Serve HTTP requests by a Servlet.

== What's inside

* xref:{cq-camel-components}::servlet-component.adoc[Servlet component], URI syntax: `servlet:contextPath`

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

== Maven coordinates

https://code.quarkus.io/?extension-search=camel-quarkus-servlet[Create a new project with this extension on code.quarkus.io, window="_blank"]

Or add the coordinates to your existing project:

[source,xml]
----
<dependency>
    <groupId>org.apache.camel.quarkus</groupId>
    <artifactId>camel-quarkus-servlet</artifactId>
</dependency>
----

Check the xref:user-guide/index.adoc[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 xref:user-guide/native-mode.adoc#serialization[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.
[source,java]
----
@RegisterForReflection(targets = { IllegalStateException.class, MyCustomException.class }, serialization = true)
----

== Additional Camel Quarkus configuration

[width="100%",cols="80,5,15",options="header"]
|===
| Configuration property | Type | Default


|icon:lock[title=Fixed at build time] [[quarkus.camel.servlet.url-patterns]]`link:#quarkus.camel.servlet.url-patterns[quarkus.camel.servlet.url-patterns]`

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

|icon:lock[title=Fixed at build time] [[quarkus.camel.servlet.servlet-class]]`link:#quarkus.camel.servlet.servlet-class[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`

|icon:lock[title=Fixed at build time] [[quarkus.camel.servlet.servlet-name]]`link:#quarkus.camel.servlet.servlet-name[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`

|icon:lock[title=Fixed at build time] [[quarkus.camel.servlet.-named-servlets-.url-patterns]]`link:#quarkus.camel.servlet.-named-servlets-.url-patterns[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`
| 

|icon:lock[title=Fixed at build time] [[quarkus.camel.servlet.-named-servlets-.servlet-class]]`link:#quarkus.camel.servlet.-named-servlets-.servlet-class[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`

|icon:lock[title=Fixed at build time] [[quarkus.camel.servlet.-named-servlets-.servlet-name]]`link:#quarkus.camel.servlet.-named-servlets-.servlet-name[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-legend]
icon:lock[title=Fixed at build time] Configuration property fixed at build time. All other configuration properties are overridable at runtime.

