Skip to main content
Redhat Developers  Logo
  • Products

    Platforms

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat AI
      Red Hat AI
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • View All Red Hat Products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat Developer Hub
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat OpenShift Local
    • Red Hat Developer Sandbox

      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Secure Development & Architectures

      • Security
      • Secure coding
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • Product Documentation
    • API Catalog
    • Legacy Documentation
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

Deploying projects to Apache Felix, Tomcat, and Karaf in VS Code

April 9, 2020
Rob Stryker
Related topics:
IDEsJavaKubernetes
Related products:
Red Hat OpenShift

Share:

    We're expanding tooling support for containers and servers in different development environments. Our existing VS Code extension, Red Hat Server Connector, only provides functionality for Red Hat servers and runtimes like WildFly, Red Hat JBoss Enterprise Application Platform (JBoss EAP), and Red Hat Container Development Kit. In this article, we introduce Red Hat Community Server Connector, the newest addition to our Visual Studio Code (VS Code) extensions.

    Community Server Connector makes it easier than ever to deploy, run, debug, and test Open Service Gateway initiative (OSGi), Java EE and Jakarta EE, and other projects targeting diverse servers and runtimes. This new VS Code extension allows you to control Apache Felix, Apache Karaf, and Apache Tomcat with the same user interface (UI) and flexibility that you have in Server Connector. And don't worry, we'll continue to enhance Red Hat Server Connector as well.

    This article offers a general introduction to Red Hat Server Connector. For a more detailed introduction, see my video demonstration, which includes use cases for Apache Felix, Apache Karaf, and Apache Tomcat.

    General features

    Server Connector and Community Server Connector share a common UI, which is provided by the Remote Server Protocol (RSP) UI extension. Installing either server connector automatically pulls in this dependency. The server connector extensions can start and stop an RSP server. Much like a Language Server Protocol (LSP) instance, RSPs let you perform everyday tasks when working with servers or runtimes.

    The Remote Server Protocol provides support for the following main tasks:

    • Locate a server runtime on disk and configure it for use.
    • Download a server runtime to disk and configure it for use.
    • Start a server in normal or debug mode. (Only servers written in Java can be debugged at this time.)
    • Stop a server.
    • Add a deployment to a server, deploy it, un-deploy it, and so on.
    • Run arbitrary actions exposed by the server type.

    Support for Apache runtimes

    Next, we'll look at Red Hat Community Server Connector's support for three Apache runtimes: Apache Felix, Apache Karaf, and Apache Tomcat.

    Apache Felix

    Community Server Connector supports Apache Felix versions 3.2, 4.6, 5.6, and 6.0. Apache Felix isn't as full-featured as some other containers or web servers, so our tooling is necessarily limited. When Apache Felix starts via the command line, it typically dumps you right into a shell. Unfortunately, our extension does not launch the start command for the server; an rsp-server in the background executes the start and forwards output to our VS Code extension. As a result, there's no good way to allow users to interact with the OSGi shell.

    We still allow you to publish deployments to the OSGi bundle/ folder via the UI, but the container won't reload the changes until you restart. To make up for this, the Apache Felix server adapters contain an action to stop the server, wipe the felix-cache folder, and start the container again. See the Red Hat Community Server Connector video demo for more about this functionality.

    Apache Karaf

    Red Hat Community Server Connector supports Apache Karaf version 4.8. When started, Apache Karaf (like Apache Felix) automatically launches you into a shell. In this shell, you can install features, control OSGi bundles, and more. As with Apache Felix, we cannot provide user interaction within the shell upon startup. Apache Karaf is significantly more full-featured than Apache Felix, however. Once startup is complete, a user action connects to Apache Karaf's shell via SSH in the terminal inside VS Code, which gives you more flexibility for adding or removing features, controlling deployments, and modifying configurations.

    The video demo shows a pair of interesting use cases for Apache Karaf. The first involves deploying and controlling a simple OSGi bundle. The second shows you how to configure the tooling required to implement routes in Apache Camel.

    Apache Tomcat

    The final supported runtime is Apache Tomcat, with support for Tomcat versions 5.5, 6.0, 7.0, 8.0, and 8.5. The functionality here is fairly typical. You can start and stop the server in run or debug mode, and you also have options for exploded deployments and making incremental changes to static files like HTML or JavaServer Pages (JSP). The video demo shows both packaged (WAR) and exploded deployments for Apache Tomcat.

    Conclusion

    If you are using Apache servers and runtimes on a daily basis, you might find Red Hat Community Server Connector a useful extension to have in your VS Code environment. Watch the video demonstration for a complete introduction to our new VS Code extension and then go see what you can do with it.

    Last updated: October 9, 2023

    Recent Posts

    • Migrating Ansible Automation Platform 2.4 to 2.5

    • Multicluster resiliency with global load balancing and mesh federation

    • Simplify local prototyping with Camel JBang infrastructure

    • Smart deployments at scale: Leveraging ApplicationSets and Helm with cluster labels in Red Hat Advanced Cluster Management for Kubernetes

    • How to verify container signatures in disconnected OpenShift

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2025 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue