How to Capture Image using Web Camera in JSP only (Without using Servlet) and save it into MS SQL Server
<p>I want  to capture the image using web camera and store it into MS SQL Server database.</p>

<p>I am able to capture the image using web camera but right now i am trying to pass the image to next page but could not get the image on next jsp to process the image.</p>

<p>Code to capture image</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
    &lt;title&gt;Web  camera - Testing&lt;/title&gt;

    &lt;script&gt;

        // Put event listeners into place
        window.addEventListener("DOMContentLoaded", function () {
            // Grab elements, create settings, etc.
            var canvas = document.getElementById("canvas"),
                    context = canvas.getContext("2d"),
                    video = document.getElementById("video"),
                    videoObj = {"video": true},
            errBack = function (error) {
                console.log("Video capture error: ", error.code);
            };

            // Put video listeners into place
            if (navigator.getUserMedia) { // Standard
                navigator.getUserMedia(videoObj, function (stream) {
                    video.src = stream;
                    video.play();
                }, errBack);
            } else if (navigator.webkitGetUserMedia) { // WebKit-prefixed
                navigator.webkitGetUserMedia(videoObj, function (stream) {
                    video.src = window.webkitURL.createObjectURL(stream);
                    video.play();
                }, errBack);
            } else if (navigator.mozGetUserMedia) { // WebKit-prefixed
                navigator.mozGetUserMedia(videoObj, function (stream) {
                    video.src = window.URL.createObjectURL(stream);
                    video.play();
                }, errBack);
            }

            // Trigger photo take
            document.getElementById("snap").addEventListener("click", function () {
                context.drawImage(video, 0, 0, 213, 160);
                document.getElementById('canvasImg').src = canvas.toDataURL("image/png");

//                    document.getElementById('video').style.display = "none";  // hide the live image video portin after click on take picture
            });



        }, false);

    &lt;/script&gt;



&lt;/head&gt;
&lt;body&gt;
    &lt;h1&gt;Capture Image using Camera!&lt;/h1&gt;

    &lt;!--
     Ideally these elements aren't created until it's confirmed that the 
     client supports video/camera, but for the sake of illustrating the 
     elements involved, they are created with markup (not JavaScript)
    --&gt;
    &lt;video id="video" width="213" height="160" autoplay&gt;&lt;/video&gt;
    &lt;button id="snap"&gt;Capture Photo&lt;/button&gt;

    &lt;form action="savetesting.jsp" method="post"&gt;
        &lt;canvas id="canvas" width="213" height="160"  name="ImageFile1" style="display: none;"&gt;&lt;/canvas&gt;

        &lt;img id="canvasImg" name="ImageFile"&gt;&lt;img&gt;
        &lt;input type="reset" value="Reset"/&gt;
        &lt;input type="submit" value="Submit"/&gt;

    &lt;/form&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>but now i am trying to get the captured image using </p>

<pre><code>request.getParameter("ImageFile");
</code></pre>

<p>but could not succeed.</p>

<p>Please help me out with this issue, How to get the image on next page then i will try to save the image in MS SQL Server Database but only using JSP (without using Servlet).</p>