Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9223313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:03:03+00:00 2026-06-18T04:03:03+00:00

I am working on a SpringMVC application. This application is a form, the user

  • 0

I am working on a SpringMVC application. This application is a form, the user takes their picture with the Jquery WebCam Plufin. I have the webcam working and i am able to take the picture, however i now need to write the image to the database or upload it to the server.

I would like to insert into the database.I am wondering do i upload to the server first before i insert into the database? I am unsure how to approach this. Can someone guide me on this and the best approach to be taken

Code:

    $(document).ready(function(){

        document.createElement("canvas");

        $("#canvas").hide();

        $("#camera").webcam({
                width: 320,
                height: 240,
                useMicrophone: false,
                mode: "callback",
                swffile: "resources/swf/jscam_canvas_only.swf",
                quality:85,

                onSave: saveCB,
                onCapture: function () {
                    $("#camera").hide();
                    webcam.save();
                    $("#canvas").show();
                },

                debug: function (type, string) {
                    $("#status").html(type + ": " + string);
                }

        }); 



        $('#upload').click(function () {
            webcam.capture();
            return false;
        });

        $('#retake').click(function () {
            $("#canvas").hide();
            $("#camera").show();
            return false;
        });


        window.addEventListener("load", function() {

            var canvas = document.getElementById("canvas");

            if (canvas.getContext) {
                ctx = document.getElementById("canvas").getContext("2d");
                ctx.clearRect(0, 0, 320, 240);
                image = ctx.getImageData(0, 0, 320, 240);
            }

            }, false);
});

    <div id="tab1" class="divGroup">
            <form:form id="citizenRegistration" name ="citizenRegistration" method="POST" commandName="citizens" action="citizen_registration.htm">
                <div id="divRight" class="mainDiv">             
                    <div class="divGroup" id="divCharInfo"> 

                        <label id="status"></label>                             
                        <div id="camera"></div>

                        <div><p><canvas id="canvas" name="photo" height="240" width="320"></canvas></p><form:errors path="photo" class="errors"/></div>
                        <input  id="upload" type="button" value="Take Photo">
                        <input  id="retake" type="button" value="Re-Take Photo">
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T04:03:04+00:00Added an answer on June 18, 2026 at 4:03 am

    not sure if you still need an answer on this one. By the way, you are using jscam_canvas_only.swf, that does not support the “save” mode. Try again after moving to jscam.swf…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a springMVC project in which the user authentication is based
I am working on a CRUD application using .NET and I have about 10
I have a spring mvc 3.1 application based on this tutorial . I've modified
I have a working Spring MVC application(doing everything I wanted when deployed to jboss)
I have an html/jsp form that I am serializing(using jquery) and passing to a
I'm working on a Spring MVC 3 web application, I have some JSPs that
I am working on a Spring MVC application in which I have recently been
I am working on making a sample web application using SpringMVC and JavascriptMVC, deployed
I'm working on a test application using Spring MVC. I have a Person class
i'm working on a simple spring mvc web application i have : a simple

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.