nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Gough <>
Subject Re: Can a nar bundle host a servlet outside of the NiFi web framework?
Date Tue, 13 Nov 2018 17:23:49 GMT
Hi Vijay,

You can take a look at the code for ListenHTTP to get an idea of how you could write a processor
to do what you want with your own servlet. ListenHTTP uses embedded Jetty:

There's a few articles around that describe how to write your own processor:


´╗┐On 11/13/18, 10:27 AM, "Vijay Chhipa" <> wrote:

    Hi Bryan
    So we implemented it based on your suggestion, and it works, however, for concerns unrelated
to NiFi  from the team, I  will need to go back to the original idea which is standup  a servlet
from within my .nar file.
    Is it possible and if so can you point me to an example?
    Thank you, 
    > On Nov 6, 2018, at 4:35 PM, Vijay Chhipa <> wrote:
    > Bryan
    > Thats perfect, I was planning to launch my own Jetty instance from within the nar,
but ListenHttp or HandleHttpRequest is even better 
    > Thank you, 
    >> On Nov 6, 2018, at 4:24 PM, Bryan Bende <> wrote:
    >> Not sure if this is what you are asking for, but ListenHttp and
    >> HandleHttpRequest both do this.
    >> They start an embedded Jetty server on a different port, unrelated to
    >> NiFi's web server, and they are not part of NiFi's security model,
    >> although they can be secured with 2-way TLS, or basic auth (I tthink).
    >> The incoming request gets turned into a flow file and be processed by
    >> the rest of the flow, and a response can be sent with
    >> HandleHttpResponse.
    >> On Tue, Nov 6, 2018 at 4:52 PM Vijay Chhipa <> wrote:
    >>> Hello
    >>> I would like to create a nar bundle that can serve up some content, I would
like this to be outside of the secure NiFI web context. Essentially it has nothing to do with
the "https://<server>:<port>/nifi"  and the
    >>> This would be a unsecured endpoint  accessible from the host thats running
    >>> http:/localhost:8089/blabla
    >>> Essentially, my nar  would  be running a Jetty server other than the NiFi
Jetty server
    >>> Any technical issues with this approach ( obviously there is a security concerns
but apart from that)
    >>> Thanks
    >>> Vijay

View raw message