Results 1 to 3 of 3
  1. #1
    abhiN is offline Member
    Join Date
    Jan 2008
    Posts
    23
    Rep Power
    0

    Default passing image file to database

    Hi

    i m having a jsp form which takes the image file as input and i want to pass that file to java class which inserts the image into database..

    then how will be the jsp..

    i m using --
    <input type="file" name="image" id="image" size="35">

    is this correct??

    how pass this file to java class??

    reply plz..

    byee

  2. #2
    roots's Avatar
    roots is offline Moderator
    Join Date
    Jan 2008
    Location
    Dallas
    Posts
    293
    Rep Power
    7

    Default

    make sure you put encoding=multipart/form-data
    dont worry newbie, we got you covered.

  3. #3
    Join Date
    Dec 2007
    Posts
    24
    Rep Power
    0

    Default

    If u use hibernate then its easy man..

    see this


    <html:form action="/upload" enctype="multipart/form-data" onsubmit="return validateUploadForm(this)">
    file : <html:file property="file"/><html:errors property="file"/><br/>
    <html:submit/>
    </html:form>
    <html:javascript formName="uploadForm"/>
    k@mi icore

Similar Threads

  1. image insertion into database
    By abhiN in forum JDBC
    Replies: 4
    Last Post: 01-05-2009, 05:09 AM
  2. Replies: 0
    Last Post: 02-10-2008, 11:25 AM
  3. Retriving image from database
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 02-09-2008, 08:41 PM
  4. Replies: 0
    Last Post: 08-15-2007, 01:48 PM
  5. How to display a database-image in a page?
    By simon in forum New To Java
    Replies: 1
    Last Post: 07-23-2007, 11:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •