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: https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ListenHTTP.java
There's a few articles around that describe how to write your own processor: https://medium.com/hashmapinc/creating-custom-processors-and-controllers-in-apache-nifi-e14148740ea https://nifi.apache.org/docs/nifi-docs/html/developer-guide.html Cheers, Nathan On 11/13/18, 10:27 AM, "Vijay Chhipa" <[email protected]> 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, Vijay > On Nov 6, 2018, at 4:35 PM, Vijay Chhipa <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 nifi.properties >>> >>> This would be a unsecured endpoint accessible from the host thats running NiFi. >>> 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 >>> >>> >>> >>> >>> >
