--- title: "Implement SDK in AppSail" url: https://docs.catalyst.zoho.com/en/sdk/java/v1/serverless/appsail/implement-sdk-in-appsail/ description: "This page describes the method to implement Java SDK in an AppSail service for Catalyst-managed runtimes and avail Catalyst features within the application." last_updated: 2026-03-05T15:20:59Z service: Serverless type: general related_links: - name: "AppSail Help" url: /en/serverless/help/appsail/introduction --- # Catalyst AppSail [Catalyst AppSail](https://docs.catalyst.zoho.com/en/serverless/help/appsail/introduction/) is a fully-managed, independent platform for deploying web services to the cloud with ease. You can either deploy your application directly as a Catalyst-managed runtime that supports specific runtimes of Java, Node.js, and Python, or an OCI-compliant container image of your application as a custom-runtime. Catalyst enables you to implement Java SDK in your AppSail applications for [Catalyst-managed runtimes](https://docs.catalyst.zoho.com/en/serverless/help/appsail/catalyst-managed-runtimes/key-concepts/). AppSail supports frameworks of Java such as Embedded Jetty, Spring MVC, and Spring Boot. You can [access help guides](https://docs.catalyst.zoho.com/en/serverless/help/appsail/help-guides/introduction/) for building sample apps in Java. ## Implement Java SDK in AppSail You can implement the Catalyst Java SDK in the codebase of your AppSail service with ease. The steps to implement and initialize the Catalyst SDK for different API versions of Java servlets are demonstrated with sample codes below. In all cases, Catalyst requires you to implement the `AuthHeaderProvider` interface from the Catalyst Java SDK package. The implementation defines the `getHeader()` method that returns the value of the request header. You can then pass an object of the implementation class to the `init()` method, to initialize the SDK. ### Java Servlet API versions <=4 Sample code for Java applications that use Java servlets of API versions lesser than or equal to 4.0 (`[javax.servlet](https://docs.oracle.com/javaee%2F7%2Fapi%2F%2F/javax/servlet/package-summary.html)`): **Implementation Class:** ```java package com.zoho.catalyst.appsail.demo.utils; import javax.servlet.http.HttpServletRequest; import com.zc.auth.AuthHeaderProvider; public class AuthProviderImpl implements AuthHeaderProvider { HttpServletRequest request; public AuthProviderImpl(HttpServletRequest request) { this.request = request; } @Override public String getHeaderValue(String key) { return request.getHeader(key); } } ``` **Initialization:** ```json AuthProviderImpl authProviderImpl = new AuthProviderImpl(req); CatalystSDK.init(authProviderImpl) ``` ### Java Servlet API versions >=5 Sample code for Java applications that use Java servlets of API versions greater than or equal to 5.0 (`[jakarta.servlet](https://mvnrepository.com/artifact/jakarta.servlet)`): **Implementation Class:** ```java import com.zc.auth.AuthHeaderProvider; import jakarta.servlet.http.HttpServletRequest; public class AuthProviderImpl implements AuthHeaderProvider { private HttpServletRequest request; AuthProviderImpl(HttpServletRequest request) { this.request = request; } @Override public String getHeaderValue(String s) { return request.getHeader(s); } } ``` **Initialization:** ```json CatalystSDK.init(new AuthProviderImpl((HttpServletRequest) servletRequest)); ``` ### Implement Java SDK in a Maven Project If you are developing a Java application with the [Maven](https://maven.apache.org/) build tool, you can include the Catalyst Java SDK as a dependency in the Maven configuration file ([`pom.xml`](https://maven.apache.org/guides/introduction/introduction-to-the-pom.html)), instead of downloading and adding the SDK in your source code manually. To add the Catalyst SDK in a Maven project, simply add the Zoho repository (published in [MvnRepository](https://mvnrepository.com/)) in the `pom.xml` file as shown below: ```json <repositories> <repository> <id>java-sdk</id> <url>https://maven.zohodl.com</url> </repository> </repositories> ``` You can then add the Java SDK as a dependency in pom.xml as shown below: ```json <dependencies> <dependency> <groupId>com.zoho.catalyst</groupId> <artifactId>java-sdk</artifactId> <version>1.15.0</version> </dependency> </dependencies> ```