Contact Free trial Login

Start an App from a Browser

In this procedure, you configure an HTTP Listener to specify a host name, port, and path. To listen on a specific port for every network interface on the server, set the host to Using localhost listens for incoming requests generated inside the server. Start a browser and submit a URL. The result appears in the Anypoint Studio Console.

  1. In Studio, create a new project by selecting File > New > Mule Project.

  2. From the Mule Palette, drag an HTTP Listener to a new flow.

  3. Configure the Listener:

    • Click plus (+) and ensure that Host is and Port is 8081, with no base path specified.

    • In the properties editor, set Path to the URL to start the app from the browser. For example, set Path to /trigger.

    • Accept the other default Listener settings, and save the configuration.

  4. From the Mule Palette, drag Core > Logger to the flow.

  5. In Logger, in Message, specify Hello.

  6. Click the project name in Package Explorer and click Run > Run As > Mule Application. Ensure that the console messages state that the application started correctly by looking for the message Mule is up and kicking.

  7. Open a browser and type

    HTTP Listener hears the request on port 8081, and the app starts.

  8. In the Studio Console, scroll through the logs to see Hello.

    For example:

    INFO  2020-01-02 13:00:00,438 [[MuleRuntime].cpuLight.15: [http].httpFlow.CPU_LITE @169a1097]
      [event: id] org.mule.runtime.core.internal.processor.LoggerMessageProcessor: Hello

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.