Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

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

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

    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

    • Confidential virtual machine storage attack scenarios

    • Introducing virtualization platform autopilot

    • Integrate zero trust workload identity manager with Red Hat OpenShift GitOps

    • Best Practice Configuration and Tuning for Linux and Windows VMs

    • Red Hat UBI 8 builders have been promoted to the Paketo Buildpacks organization

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    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
    © 2026 Red Hat

    Red Hat legal and privacy links

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

    Chat Support

    Please log in with your Red Hat account to access chat support.