Skip to content

Overview

Concepts and Principles

Development

Overview

IDEs

API Explorer

Releases

Release Notes

TORO Integrate

Coder Studio

Coder Cloud

Bug Reports

Search

Configuring Package Contexts

A TORO Integrate package has the ability to serve your Web Applications and Spring Contexts. By using this functionality you can use all the great features of Tomcat and Spring in TORO Integrate, and have these technologies leverage many features in TORO Integrate such as Endpoints, Gloop, and Flux.

Spring Context

A configurable option that can be set in a TORO Integrate Package is the Spring Context. A Spring Context contains configuration metadata which is then used for defining Spring Beans. These beans are java objects that are managed by the Spring Framework.

Endpoints and Spring

Spring beans are exposed to the Endpoints functionality in TORO Integrate, which means you can have your endpoints invoke methods in your spring beans when they are triggered. Spring Bean Picker in Coder Studio

Adding a Spring Context in TORO Integrate Package

To add a Spring Context in your Integrate package just do the following:

  1. Create an XML file under the package /conf directory. This XML file will contain all the bean definition. For example: sample bean file on coder studio

  2. Update the esb-package.xml file in the /conf directory. Then under the xml element <spring-contexts> add a child element called <context-file%gt; with name of the xml file that contains the bean definitions. For example: sample bean file on coder studio

  1. Create an XML file under the package /conf directory. This XML file will contain all the bean definition. For example: sample bean file on coder cloud

  2. Update the esb-package.xml file in the /conf directory. Then under the xml element <spring-contexts> add a child element called <context-file%gt; with name of the xml file that contains the bean definitions. For example: sample bean file on coder cloud

Once the configuration for your Spring context has been completed, either restart the package or TORO Integrate for the context to be loaded.

Web Context

TORO Integrate packages can have a /web directory, which is used for web applications. These are used by TORO Integrate to install web applications into the embedded Tomcat server.

Adding a Web Context in TORO Integrate Package

To add a web context in your package:

  1. Create a jsp file under /web directory. For your home page you could create a page named index.jsp.

    web folder coder

You homepage can be accessed under <your-toro-integrate-server>/<name-of-the-package>

package web homepage

  1. Create a jsp file under /web directory. For your home page you should create a page named index.jsp.

    web folder coder

Your homepage can be accessed under <your-toro-integrate-server>/<name-of-the-package>

package web homepage