title: stream a video in html page from apache tomcat server directory in spring mvc
body: <p>I want to play video with xyz.mp4 format from local (apache tomcat)server directory. I've created a folder under webapps in server directory. 
  Thanks in advance..</p>
  
  <pre><code>@RequestMapping(value = "admin/videoplay", method = RequestMethod.GET)
       public String videoplay(Model model, 
          HttpServletRequest req, HttpServletResponse res)  {
  
      File objFile=new File("D:\\server tomcat\\webapps\\UPLOADS\\Videos\\SetWet.mp4");
  
      model.addAttribute("video", objFile);
  
      return "videoplay";
  
  }
  </code></pre>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html&gt;
  &lt;body&gt;
  &lt;video controls="controls"&gt;
      &lt;source src="shuttle.mp4" type="video/mp4"&gt;
      &lt;source src="shuttle.ogv" type="video/ogg"&gt;
      Your browser does not support the HTML5 Video element.
  &lt;/video&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><a href="https://i.stack.imgur.com/7fHwh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7fHwh.png" alt="Screenshot"></a></p>