Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners Upload Photo to Server
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Vaishnavi Vishwanath
Upload Photo to Server
0 Answer(s)      3 years and 9 months ago
Posted in : Java Beginners


Hi

I am using NetBeans IDE for developing application for java(Swings). And i am using MySQL as backend database.

My Problem is I have created JFrame form in NetBeans and i have inculded label in which i am loading photo.

    BufferedImage image=null;
    JFileChooser chooser = new JFileChooser();
    chooser.setAcceptAllFileFilterUsed(false);
    int retVal = chooser.showOpenDialog(this);
    if (retVal == JFileChooser.APPROVE_OPTION) {
        File myFile = chooser.getSelectedFile();
        try {
            image = ImageIO.read(myFile);
            try
            {
                lblPhoto.setIcon(new ImageIcon(image));

            }
            catch(Exception e)
            {
                    JOptionPane.showMessageDialog(this, "Select picture format only(JPEG,PNG,BMP,GIF): ");
            }
            path=myFile.getAbsolutePath();
        }
        catch(Exception e) {
            JOptionPane.showMessageDialog(this, "MemberMasterGUI.browsePhoto: " + e.getMessage());
        }
    }

Here I'll get path of the photo in local machine in variable "path" . My question is how can i load this to the server machine so that this photo photo can be accessed in all of the machines from server side.

Should i have to wrirte socket program for thjis. If yes how to write it. Otherwise what is the solution to this. Please someone help me to do this.

Thanks a lot.


Advertisement
View Answers

Related Tutorials/Questions & Answers:
Upload Photo to Server
Upload Photo to Server  Hi I am using NetBeans IDE for developing..." . My question is how can i load this to the server machine so that this photo photo can be accessed in all of the machines from server side. Should i have
upload photo in xcode
upload photo in xcode  how can i upload a photo in a view in xcode? i am a beginner in xcode please help me
Advertisements
Photo upload, Download
Photo upload, Download  Hi I am using NetBeans IDE for developing... this to the server machine so that this photo photo can be accessed in all of the machines from server side. I want to save the photo with a given name. How can i do
PHOTO UPLOAD AND DISPLAY - Struts
PHOTO UPLOAD AND DISPLAY  Hi, This is chandra Mohan. I want some help urgently from your side. My problem is I want to upload the photos and display photos usin Struts technology. Please give me some suggestion to me
Upload photo - Java Beginners
Upload photo  Morning, Can you tell me coding how to upload photo. First, i want to browse the photo from my direktory(*.jpg, *.bmp *.gif), then i click this photo and view in my JFrameForm then i have a button to save
Photo Upload - JSP-Servlet
Photo Upload  Dear Sir, I want some help you i.e code for image upload and download using Servle/jsp. Thanks&Regards, VijayaBabu.M ...(); %> You have successfully upload the file by the name
how to upload photo - Java Beginners
how to upload photo  dear sir, I has a case like that, first i have jlabel. i want to view data like photo/picture to jlabel. then i have a button...{ public static void main(String[] args){ JFrame frame = new JFrame("Upload Image
To scan a image and upload to server
To scan a image and upload to server  I am beginner of JavaME I want a code to scan a image and upload to server
jsp upload file to server
jsp upload file to server  How to create and upload file to server in JSP?   Find the given example that explains how to upload single and multiple file on server using JSP
scan a image and upload to server
scan a image and upload to server  Hai i am beginner of Java ME..I want the code To scan a image and upload to server
Capture a image and upload to server
Capture a image and upload to server  Hai team i have trouble to capture a image and upload to server in java me........... So i want a code immediately,.......To capture a image and upload to server in j2me...... If you give
scan a image and upload to server
and upload to server..after capture that image decoded it going to be convert digit value....My client want to scan a image and upload to server in j2me please refer me,to send a code for to scan a image and upload to server in j2me Thanks
Upload image to the server in J2ME?
Upload image to the server in J2ME?  HI Team, I am new to the j2me and now I am working on the program that, upload captured image to the server by using j2me. I did this by using simulator but when I made hit from the mobile
photo uploading
photo uploading  i want the code upload the image in oracle database
scan a QRCode imageimage and upload to server
scan a QRCode imageimage and upload to server   Hai team i create a code for to scan a image and upload to server in j2me. but i have a trouble so please clarify that. i want some sample code for scan a image and upload to server
How to upload file on FTP Server
How to upload file on FTP Server  In my application there is a requirement of uploading the file on FTP server. How to upload file on FTP Server... is good and can be used in Java applications. Read FTP File Upload in Java for more
How to upload files to server using JSP/Servlet?
How to upload files to server using JSP/Servlet?  How to upload files to server using JSP/Servlet
image file upload to a web server
Tomcat 5 server. How can I upload a file to the web server?   Here... and upload it on the server. 1)page.jsp: <%@ page language="java" %> <...image file upload to a web server  Refer roseindia post http
upload file to server and store recode in database
upload file to server and store recode in database  i want to upload a file into the server and store a recode in mysql database.any one know the code
files upload to apache ftp server - Ajax
files upload to apache ftp server  Please, how to upload multiple files to apache ftp server using ajax . I want to upload files using drag drop... line. but I am trying to upload files using ajax. I want you to answer to me
photo album
photo album  while syncing photos to my photo album in my iphone, the photo albumj ust got crashed i guess. Under photos option i just have the camera roll option now!! What should i do to get the photo album back
files upload to apache ftp server - Ajax
files upload to apache ftp server  Please, how to upload multiple files to apache ftp server using ajax . I want to upload files using drag drop... line. but I am trying to upload files using ajax. I want you to answer to me
How to upload image to server in j2me by multipart/form-data?
How to upload image to server in j2me by multipart/form-data?  Hi, I need upload data to java server from j2me 1.Two text messages and 3 capture...) at java.lang.Thread.run(Unknown Source) From J2me I am using code to upload image to server
photo viwer
photo viwer  i need coding for photo viewer using jsp mysql   Please visit the following link: http://www.roseindia.net/jsp/downloadimage.shtml
upload value to php server in getmethod in j2me
upload value to php server in getmethod in j2me  Dear Team, I successfully capture image and decode that image, here i have one doubt after... method to php server in j2me can you give some tips for me... Thanks and Regards
Gallery Photo
Gallery Photo  I need to display a photo gallery with the path stored in oracle with the possibility of their supprission (photo management) (with jsf or with jsp)   hi friend, Do not do such task using JSP, Better
upload files to apache ftp server - Ajax
upload files to apache ftp server  hi,sir I want to upload multiple files to apache ftp server. I am using ajax framework for j2ee.Now I am okay for my customize code for my ftp testing.But I want to upload and download to ftp
photo gallery - Java Beginners
photo gallery  Iam uploading images in the serverusing uploading... it dynamically with out giving the path. please help  Hi friend, For upload image visit to : http://www.roseindia.net/jsp/file_upload/employee_upload
How to upload zip file from android to server programmatically?????
How to upload zip file from android to server programmatically?????  hi , I want to upload zip file from android phone sdcard to server programmatically. So any one do this task in past so please share your experience with me
Upload and insert the file contents - Java Server Faces Questions
Upload and insert the file contents  I want to browse and upload 2 files on server and insert the values into table from JSP page. So i have to browse and upload CSV files using the browse and upload button. as soon as i
Adding photo to iPhone simulator
Adding photo to iPhone simulator  Hi, there is no photo in my iPhone simulator.. how can i add one? Please suggest. Thanks
Advertisements
 

 

 

DMCA.com