I have a Java backend running on Tomcat 7. I'd like to add support for an HTTP request that would begin streaming an MP4 video from Java code in Tomcat, and not sure where to begin. I believe HTTP GET somehow supports A/V streaming, but not entirely sure.
Let's pretend that the MP4 file is located at /opt/videos/myvid.mp4
, and that the Tomcat instance has file permissions to read/write to that directory and file. Now let's pretend that an HTTP GET (or whatever supports streaming) request comes in, and we need to start streaming myvid.mp4
to the client - in pure Java, from inside a Controller
class. How would this work?