# Java -------------------------------------------------------------------------------- title: "Overview" description: "Catalyst AppSail is a fully-managed PaaS component of Catalyst Serverless that enables you to develop and deploy services in Java, Node.js, and Python in the cloud with ease, and manage your platform instances." last_updated: "2026-03-18T07:41:08.635Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/appsail/help-guides/java/overview/" service: "Serverless" -------------------------------------------------------------------------------- # Java ### Overview The Java programming environment includes a variety of frameworks that contain pre-written classes, templates, packages, and structure upon which you can build your own code. As mentioned earlier, Catalyst enables you to {{%link href="/en/cli/v1/initialize-resources/initialize-appsail/" %}}initialize{{%/link%}} or {{%link href="/en/cli/v1/add-appsail/" %}}add{{%/link%}} an AppSail service in one of these two formats: * {{%link href="https://docs.oracle.com/cd/E19199-01/816-6774-10/a_war.html" %}}Java- WAR{{%/link%}} * {{%link href="https://www.oracle.com/cis/java/technologies/java-se-glance.html" %}}Java- SE{{%/link%}} After you select the Java stack while initializing an app service, you can select one of these options. However, you can still build your Java application with any frameworks; incorporate any libraries, modules, or dependencies; generate it as any standard package; and follow any editions you require. {{%note%}}{{%bold%}}Note:{{%/bold%}} When you use the Java WAR template for deploying your Java application exported as a WAR file, you need not embed a Java web server in your application, as AppSail will bundle your application with a server by default. If you choose Java SE as your template for all other Java application formats, such as a JAR file, you will need to include an embedded server in your application.{{%/note%}} The Java help guide contains step-by-step instructions on building basic sample apps with some of the most popular frameworks, using popular Java web servers in them, and deploying these apps as AppSail services, and configuring {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#startup-commands" %}}startup commands{{%/link%}} as required. <br> ### Prerequisites Depending on the framework, server, and edition you use in these examples, you will need to ensure that you have all the prerequisites installed in your local machine. -------------------------------------------------------------------------------- title: "Embedded Jetty" description: "Catalyst AppSail is a fully-managed PaaS component of Catalyst Serverless that enables you to develop and deploy services in Java, Node.js, and Python in the cloud with ease, and manage your platform instances." last_updated: "2026-03-18T07:41:08.636Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/appsail/help-guides/java/embedded-jetty/" service: "Serverless" -------------------------------------------------------------------------------- # Simple Java App with Embedded Jetty This example illustrates the steps to build a simple Java app with a {{%link href="https://docs.oracle.com/cd/E19199-01/816-6774-10/a_war.html" %}}Jetty server{{%/link%}} embedded in it. Eclipse Jetty is a lightweight Java web server as well as a servlet container. This application will then be compiled, bundled, and associated with an AppSail service as a Java SE type, and deployed to the console. 1. Create a new Java project from an IDE of your choice. 2. Include the following libraries in your source directory. We have created a new folder in this example and named it deps. These JAR files include all the servlets, utility files, and other dependencies that will embed the Jetty server into your application. You can fetch these dependencies from the {{%link href="https://mvnrepository.com/" %}}official Maven repository{{%/link%}}. You can also add these as Maven dependencies. {{%code class="language-json"%}}javax.servlet-api-3.1.0.jar jetty-io-9.4.50.v20221201.jar jetty-server-9.4.50.v20221201.jar jetty-util-9.4.50.v20221201.jar jetty-http-9.4.50.v20221201.jar jetty-security-9.4.50.v20221201.jar jetty-servlet-9.4.50.v20221201.jar jetty-util-ajax-9.4.50.v20221201.jar{{%/code%}} <br> 3. To create an embedded Jetty application, you will need to create an instance of org.eclipse.jetty.server.Server class and refer to the {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#default-port-for-app-startups"%}}listening port{{%/link%}} with the environment variable {{%badge%}}X_ZOHO_CATALYST_LISTEN_PORT{{%/badge%}} in your main code. You must add a Servlet handler to handle these requests. Create the following Java files in your main directory and add the sample code snippets given below: **CustomJettyServer.java** {{%code class="language-java"%}}import org.eclipse.jetty.server.Server; import org.eclipse.jetty.servlet.ServletContextHandler; public class CustomJettyServer { public static void main( String[] args ) throws Exception { String port = System.getenv("X_ZOHO_CATALYST_LISTEN_PORT"); int listenPort; if(port != null && !port.isEmpty()) { listenPort = Integer.parseInt(System.getenv("X_ZOHO_CATALYST_LISTEN_PORT")); } else { listenPort = 9000; } Server server = new Server(listenPort); ServletContextHandler handler = new ServletContextHandler(); handler.addServlet(ServletHandler.class.getName(), "/"); server.setHandler(handler); server.start(); } }{{%/code%}} <br> **ServletHandler.java** {{%code class="language-java"%}}import java.io.IOException; import java.nio.charset.StandardCharsets; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class ServletHandler extends HttpServlet{ @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { String path = req.getServletPath(); System.out.println(path); try { resp.getWriter().write("Hello ABC"); resp.getWriter().close(); } catch (Exception e) { e.printStackTrace(); } } @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { this.doPost(req, resp); } @Override protected void doDelete(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { this.doPost(req, resp); } @Override protected void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { this.doPost(req, resp); } @Override protected void doHead(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { this.doPost(req, resp); } @Override protected void doOptions(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { this.doPost(req, resp); } }{{%/code%}} <br> 4. Compile the application by executing the command given below: {{%code class="language-json"%}}javac -cp ".:./*:./deps/*" *.java{{%/code%}} <br> 5. You can now {{%link href="/en/cli/v1/initialize-resources/initialize-appsail/" %}}initialize an AppSail service{{%/link%}} in the same directory from the CLI or {{%link href="/en/cli/v1/add-appsail/" %}}add it{{%/link%}} in an existing project directory. The app's source must be your application's directory. Provide the following values while initializing the app service: **Stack:** Java 8 <br> **Platform:** Java SE 6. Ensure the compiled file, along with the JAR files in the deps folder, are added in the build directory you specify during initialization. Catalyst will automatically ZIP your app files during deployment to the remote console. 7. {{%link href="/en/cli/v1/deploy-resources/deploy-appsail//" %}}Deploy the app service{{%/link%}} to the console. 8. You can then configure the {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#startup-commands" %}}startup command{{%/link%}} given below from the console: {{%code class="language-java"%}}java -cp ".:./*:./deps/*" *.java{{%/code%}} You can also configure this in the {{%badge%}}app-config.json{{%/badge%}} file before deploying. <br> Access the deployed app service from its {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#custom-domain-url" %}}endpoint URL{{%/link%}}. -------------------------------------------------------------------------------- title: "Spring MVC" description: "Catalyst AppSail is a fully-managed PaaS component of Catalyst Serverless that enables you to develop and deploy services in Java, Node.js, and Python in the cloud with ease, and manage your platform instances." last_updated: "2026-03-18T07:41:08.637Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/appsail/help-guides/java/spring-mvc/" service: "Serverless" -------------------------------------------------------------------------------- # Spring- MVC The {{%link href="https://docs.spring.io/spring-framework/docs/3.2.x/spring-framework-reference/html/mvc.html" %}}Spring Web MVC{{%/link%}} framework is a module of the popular {{%link href=https://spring.io" %}}Spring framework{{%/link%}} that follows a Model-View-Controller architecture. This framework allows for the creation of web applications, incorporating the advantages of the Spring framework along with loose coupling of components in the MVC design pattern. It is built around a {{%badge%}}DispatcherServlet{{%/badge%}} that handles HTTP requests and responses, and dispatches the requests to necessary handlers and controllers. This example explains the steps to build a sample app in the Spring MVC framework, export it as a WAR file, and deploy it to AppSail. 1. Create a new Maven project using an IDE of your choice. You must select the following {{%link href="https://maven.apache.org/guides/introduction/introduction-to-archetypes.html" %}}Archetype{{%/link%}} for the project: {{%badge%}}org.apache.maven.archetypes maven-archetype-webapp{{%/badge%}}. 2. In the {{%badge%}}pom.xml{{%/badge%}} file of your project, add the spring dependencies given below. {{%code class="language-java"%}}&lt;dependency&gt; &lt;groupId&gt;org.springframework&lt;/groupId&gt; &lt;artifactId&gt;spring-core&lt;/artifactId&gt; &lt;version&gt;5.2.19.RELEASE&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.springframework&lt;/groupId&gt; &lt;artifactId&gt;spring-context&lt;/artifactId&gt; &lt;version&gt;5.2.19.RELEASE&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.springframework&lt;/groupId&gt; &lt;artifactId&gt;spring-aop&lt;/artifactId&gt; &lt;version&gt;5.2.19.RELEASE&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.springframework&lt;/groupId&gt; &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt; &lt;version&gt;5.2.19.RELEASE&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.springframework&lt;/groupId&gt; &lt;artifactId&gt;spring-web&lt;/artifactId&gt; &lt;version&gt;5.2.19.RELEASE&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;javax.servlet&lt;/groupId&gt; &lt;artifactId&gt;jstl&lt;/artifactId&gt; &lt;version&gt;1.2&lt;/version&gt; &lt;/dependency&gt;{{%/code%}} <br> 3. Add the dependencies below in a build enclosure to compile and generate the WAR file. {{%code class="language-java"%}}&lt;plugins&gt; &lt;plugin&gt; &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt; &lt;version&gt;3.8.0&lt;/version&gt; &lt;configuration&gt; &lt;source&gt;1.8&lt;/source&gt; &lt;target&gt;1.8&lt;/target&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt; &lt;version&gt;3.2.1&lt;/version&gt; &lt;configuration&gt; &lt;warSourceDirectory&gt;WebContent&lt;/warSourceDirectory&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;/plugins&gt;{{%/code%}} <br> 4. Create a {{%link href="https://docs.spring.io/spring-framework/docs/4.2.x/spring-framework-reference/html/xsd-configuration.html" %}}Spring XML configuration file{{%/link%}} in your project, and add the bean configurations given below. {{%code class="language-java"%}}&lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd "&gt;{{%/code%}} Your Spring configuration file should look something like this: {{%code class="language-java"%}}&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd "&gt; &lt;mvc:annotation-driven/&gt; &lt;mvc:default-servlet-handler/&gt; &lt;context:component-scan base-package="com.amelia.example.controller" /&gt; &lt;bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt; &lt;property name="prefix" value="/"&gt;&lt;/property&gt; &lt;property name="suffix" value=".jsp"&gt;&lt;/property&gt; &lt;/bean&gt; &lt;/beans&gt; {{%/code%}} <br> 5. Add a server runtime to the project. For example, if you are working in the Eclipse IDE, you can add a targeted runtime for the Apache Tomcat server in the following way: Right click on the **project -&gt; Properties -&gt; Targeted Runtime**. Here, you can add the required runtime, then click **Apply**. 6. You can now add the required controller and error page handling, as well as a servlet mapping in the {{%badge%}}web.xml{{%/badge%}} file of your project. For example, you can use the configuration given below: {{%code class="language-java"%}}&lt;welcome-file-list&gt; &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt; &lt;/welcome-file-list&gt; &lt;servlet&gt; &lt;servlet-name&gt;helloworld&lt;/servlet-name&gt; &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt; &lt;load-on-startup&gt;1&lt;/load-on-startup&gt; &lt;/servlet&gt; &lt;servlet-mapping&gt; &lt;servlet-name&gt;helloworld&lt;/servlet-name&gt; &lt;url-pattern&gt;/&lt;/url-pattern&gt; &lt;/servlet-mapping&gt; &lt;error-page&gt; &lt;error-code&gt;404&lt;/error-code&gt; &lt;location&gt;/error.jsp&lt;/location&gt; &lt;/error-page&gt; &lt;error-page&gt; &lt;error-code&gt;401&lt;/error-code&gt; &lt;location&gt;/error.jsp&lt;/location&gt; &lt;/error-page&gt; &lt;error-page&gt; &lt;error-code&gt;500&lt;/error-code&gt; &lt;location&gt;/error.jsp&lt;/location&gt; &lt;/error-page&gt; &lt;error-page&gt; &lt;error-code&gt;400&lt;/error-code&gt; &lt;location&gt;/error.jsp&lt;/location&gt; &lt;/error-page&gt; &lt;error-page&gt; &lt;error-code&gt;403&lt;/error-code&gt; &lt;location&gt;/error.jsp&lt;/location&gt; &lt;/error-page&gt; &lt;error-page&gt; &lt;error-code&gt;408&lt;/error-code&gt; &lt;location&gt;/error.jsp&lt;/location&gt; &lt;/error-page&gt; &lt;error-page&gt; &lt;error-code&gt;413&lt;/error-code&gt; &lt;location&gt;/error.jsp&lt;/location&gt; &lt;/error-page&gt; &lt;error-page&gt; &lt;error-code&gt;414&lt;/error-code&gt; &lt;location&gt;/error.jsp&lt;/location&gt; &lt;/error-page&gt; &lt;error-page&gt; &lt;error-code&gt;505&lt;/error-code&gt; &lt;location&gt;/error.jsp&lt;/location&gt; &lt;/error-page&gt; &lt;error-page&gt; &lt;error-code&gt;405&lt;/error-code&gt; &lt;location&gt;/error.jsp&lt;/location&gt; &lt;/error-page&gt; &lt;error-page&gt; &lt;error-code&gt;409&lt;/error-code&gt; &lt;location&gt;/error.jsp&lt;/location&gt; &lt;/error-page&gt; &lt;error-page&gt; &lt;exception-type&gt; java.lang.Throwable &lt;/exception-type&gt; &lt;location&gt;/error.jsp&lt;/location&gt; &lt;/error-page&gt;{{%/code%}} <br> 7. You can upload the application to Catalyst by exporting it as a WAR file. In the Eclipse example, you can right click on the project and choose **Export As -&gt; WAR**. You must do the following: a. Choose a destination with file name as {{%badge%}}ROOT.war{{%/badge%}} <br> b. Uncheck the Optimize for specific server runtime option. <br> 8. You can now {{%link href="/en/cli/v1/initialize-resources/initialize-appsail/" %}}initialize an AppSail service{{%/link%}} in the same directory from the CLI or {{%link href="/en/cli/v1/add-appsail/" %}}add it{{%/link%}} in an existing project directory. The app's source must be your application's directory. Provide the following values while initializing the app service: **Stack:** Java 8 <br> **Platform:** Java WAR 9. Ensure the compiled files are added in the build directory you specify during initialization. Catalyst will automatically ZIP your app files during deployment to the remote console. 10. {{%link href="/en/cli/v1/deploy-resources/deploy-appsail//" %}}Deploy the app service{{%/link%}} to the console. <br> Access the deployed app service from its {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#custom-domain-url" %}}endpoint URL{{%/link%}}. -------------------------------------------------------------------------------- title: "Spring Boot" description: "Catalyst AppSail is a fully-managed PaaS component of Catalyst Serverless that enables you to develop and deploy services in Java, Node.js, and Python in the cloud with ease, and manage your platform instances." last_updated: "2026-03-18T07:41:08.651Z" source: "https://docs.catalyst.zoho.com/en/serverless/help/appsail/help-guides/java/spring-boot/" service: "Serverless" -------------------------------------------------------------------------------- # Spring Boot {{%link href="https://spring.io/projects/spring-boot" %}}Spring Boot{{%/link%}} is built on top of the popular {{%link href="https://spring.io" %}}Spring framework{{%/link%}}, and includes a wide range of enhancements that allow you to easily build production-grade microservices, web applications, and standalone Spring projects with reduced development efforts. Spring Boot typically includes embedded HTTP servers like Jetty or Apache Tomcat, without the complex XML configurations of Spring. {{%note%}}{{%bold%}}Note:{{%/bold%}} When you export a Spring Boot app as a JAR file in the example below, you can retain the embedded server included in it. However, when you export the Spring Boot app as a WAR file, you will need to exclude the embedded server included in it, if you initialize it as Java WAR in AppSail. This is because AppSail offers native support for WAR files and bundles them with the Jetty server by default.{{%/note%}} ### Spring Boot- JAR This example illustrates the steps to build a sample Spring Boot app, export it as a JAR file, and deploy it to AppSail. 1. Open {{%link href="https://start.spring.io/" %}}Spring Initializr{{%/link%}} to create a new project. 2. Choose the following configurations for your project:<br><br> a. Project - Maven Project<br> b. Language - Java<br> c. Spring Boot Version - 2.7.10<br> d. Package - JAR<br> e. Java Version - 8<br> f. Click **Add Dependencies** and select **Spring Web**. 3. Click **Generate**. 4. Unzip the project and open it in any IDE of your choice. 5. Add necessary controllers to the project. For example, create a file named {{%badge%}}DemoController.java{{%/badge%}} in the main Java file's directory of your project, and add the controller specified below in the file. {{%code class="language-java"%}}package com.example.demo; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; @RestController public class DemoController { @GetMapping("/") public String index() { return "Greetings from Spring Boot!"; } }{{%/code%}} <br> 6. Catalyst will check the {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#default-port-for-app-startups"%}}port configured for listening{{%/link%}} with the environment variable {{%badge%}}X_ZOHO_CATALYST_LISTEN_PORT{{%/badge%}} and the app must listen to that port on all interfaces (host 0.0.0.0). Therefore, you will need to customize the port. You can do this by creating a file named {{%badge%}}ServerPortCustomizer.java{{%/badge%}} in the main Java file's directory of your project, and adding the code specified below in it: {{%code class="language-java"%}}package com.example.demo; import org.springframework.boot.web.server.ConfigurableWebServerFactory; import org.springframework.boot.web.server.WebServerFactoryCustomizer; import org.springframework.stereotype.Component; @Component public class ServerPortCustomizer implements WebServerFactoryCustomizer<ConfigurableWebServerFactory> { @Override public void customize(ConfigurableWebServerFactory factory) { String port = System.getenv("X_ZOHO_CATALYST_LISTEN_PORT"); int listenPort; if(port != null && !port.isEmpty()) { listenPort = Integer.parseInt(System.getenv("X_ZOHO_CATALYST_LISTEN_PORT")); } else { listenPort = 9000; } factory.setPort(listenPort); } }{{%/code%}} You can now save the application and run it in Catalyst. 7. You can run this application on your local machine by executing the following command from your terminal: {{%code class="language-java"%}}./mvnw spring-boot:run{{%/code%}} 8. You can then compile the source code, run tests, and package the compiled code by executing the following command: {{%code class="language-java"%}}./mvnw clean package{{%/code%}} This will generate the JAR file of the application in the target folder. 9. You can now {{%link href="/en/cli/v1/initialize-resources/initialize-appsail/" %}}initialize an AppSail service{{%/link%}} in the same directory from the CLI or {{%link href="/en/cli/v1/add-appsail/" %}}add it{{%/link%}} in an existing project directory. The app's source must be your application's directory. Provide the following values while initializing the app service: **Stack:** Java 8 <br> **Platform:** Java SE 10. Ensure the JAR file is added in the build directory you specified during initialization. Catalyst will automatically ZIP your app file during deployment to the remote console. 11. {{%link href="/en/cli/v1/deploy-resources/deploy-appsail//" %}}Deploy the app service{{%/link%}} to the console. 12. You can then configure the {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#startup-commands" %}}startup command{{%/link%}} given below from the console: {{%code class="language-java"%}}java -jar demo-0.0.1-SNAPSHOT.jar{{%/code%}} You can also configure this in the {{%badge%}}app-config.json{{%/badge%}} file before deploying. <br> Access the deployed app service from its {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#custom-domain-url" %}}endpoint URL{{%/link%}}. <br> <br> ### Spring Boot - WAR This example explains the steps to build a sample Spring Boot app, export it as a WAR file, and deploy it to AppSail: 1. Open {{%link href="https://start.spring.io/" %}}Spring Initializr{{%/link%}} to create a new project. 2. Choose the following configurations for your project:<br><br> a. Project - Maven Project<br> b. Language - Java<br> c. Spring Boot Version - 2.7.10<br> d. Package - WAR<br> e. Java Version - 8<br> f. Click **Add Dependencies** and select **Spring Web**. 3. Click **Generate**. 4. Unzip the project and open in any IDE of your choice. 5. You must now add necessary controllers to the project. For example, create a file named {{%badge%}}DemoController.java{{%/badge%}} in the main Java file's directory of your project, and add the controller specified below in the file. {{%code class="language-java"%}}package com.example.demo; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; @RestController public class DemoController { @GetMapping("/") public String index() { return "Greetings from Spring Boot WAR!"; } }{{%/code%}} <br> 6. You must now modify the {{%badge%}}pom.xml{{%/badge%}} file in your project to exclude the embedded Tomcat server while generating the WAR file, as explained in the overview. You can do this by adding the snippet given below in the {{%badge%}}spring-boot-maven-plugin enclosure{{%/badge%}} in the XML file: {{%code class="language-json"%}}&lt;configuration&gt; &lt;mainClass&gt;${main_class_name}&lt;/mainClass&gt; &lt;classifier&gt;exec&lt;/classifier&gt; &lt;/configuration&gt;{{%/code%}} <br> 7. You can run this application on your local machine by executing the following command from your terminal: {{%code class="language-java"%}}./mvnw spring-boot:run{{%/code%}} <br> 8. You can upload the application to Catalyst with this command: {{%code class="language-java"%}}./mvnw clean package{{%/code%}} This will generate the WAR file of the application in the target folder. 9. You can now {{%link href="/en/cli/v1/initialize-resources/initialize-appsail/" %}}initialize an AppSail service{{%/link%}} in the same directory from the CLI or {{%link href="/en/cli/v1/add-appsail/" %}}add it{{%/link%}} in an existing project directory. The app's source must be your application's directory. Provide the following values while initializing the app service: **Stack:** Java 8 <br> **Platform:** Java WAR 10. Ensure the WAR file is added in the build directory you specify during initialization. Catalyst will automatically ZIP your app file during deployment to the remote console. 11. {{%link href="/en/cli/v1/deploy-resources/deploy-appsail//" %}}Deploy the app service{{%/link%}} to the console. <br> Access the deployed app service from its {{%link href="/en/serverless/help/appsail/key-concepts/appsail-execution/#custom-domain-url" %}}endpoint URL{{%/link%}}.