Home Answers Viewqa Java-Beginners Upload Photo to Server

 
 


Vaishnavi Vishwanath
Upload Photo to Server
0 Answer(s)      2 years and 2 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.

View Answers









Related Pages:
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
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
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
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
photo uploading
photo uploading  i want the code upload the image in oracle database
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
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
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
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
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
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
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
How to upload file using JSP?
How to upload file using JSP?   Hi all, I m the beginner in JSP, I want to upload file on server in specific folder.   1)page.jsp... file upload form to the user</TITLE></HEAD> <
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
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
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
image upload
be upload in the server and their path should be stored in database either in oracle or my sql. kindly help me.   JSP Upload file and save file path...image upload  Hello sir I want to upload image or any other type
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
Imge upload
Imge upload  how to upload image in jsp.I am using Glassfish server..   Here is a code that upload an image on tomcat server and save...;HEAD><TITLE>Display file upload form to the user</TITLE></HEAD>
Upload image
Upload image  Hai team, I beginner of Java me now i crated code for to capture image and upload to server. Here i taken a snap but when am going to upload to server it shows decoding failed...How can i clear that bug.please
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
Upload image
Upload image  Hai i beginner of Java ME i want code to capture QR Code image and send to the server and display value in Mobile Screen i want code in Java ME .java extension.. Regards senthil   To capture an image
upload video using php
upload video using php  How to upload a video on MYSQL Server using PHP Code..? Can any one provide me an example
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 video app
should be able to take video from mobile phone b) User should be able upload the video on my server c) User should be able to save the video and then upload later...Upload video app  Hi, How to create upload video application
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
file upload using spring - Spring
file upload using spring  How to upload a file in server using spring framework
File upload in JSP
File upload in JSP  hi! In my previous interview i got two questions which i could not answer regarding file upload and annotations. I want to know which is the best method can be used for file upload. Whether moving them
Java FTP Upload
in Java. View the FTP Server : Upload file example for complete code example...Java FTP Upload  Is there any example code for Java FTP Upload? Which is the easy to use Java FTP Upload example program at roseindia.net? Thanks
Upload the picture - JSP-Servlet
Upload the picture  Dear Sir, How to upload... stores images in a repository over the server. Once we have uploaded the images we...://www.roseindia.net/jsp/file_upload/employee_upload_profile_image.shtml Thanks RoseIndia
Java upload file to ftp
Java upload file to ftp  Hi, How to uploaded file to a ftp server... that uploads files on FTP server. You have to use the Apache FTP client library.... View complete example at FTP File Upload in Java Thanks
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
upload to database - JSP-Servlet
upload to database  hai friends i have a query that is i have to upload a pdf file into database(sqlserver2000) using jsp. In roseindia some examples i seen that is only for uploading into the server but i need the uploaded file
Upload file on server automatically on specific time - JSP-Servlet
Upload file on server automatically on specific time  Hi all, Is there any way to upload file on server on specific time automatically using java... only to upload a file? If java application running, which will be the best
FTP Server : Upload file
This tutorial contains description of file uploading to the FTP server using java
upload and download files from ftp server using servlet - Ajax
upload and download files from ftp server using servlet  Hi,Sir... for upload and download files from ftp server using servlet and how to use...("Hello FTP Server"); pw.println(""); pw.println("Hello FTP Server
UPLOAD
UPLOAD  how to upload image using html
Multiple upload - JSP-Servlet
Multiple upload  Hello everyone and Deepak i am using jsp and mysql I am using the program published on roseindia.net of Multiple upload and i... request Thank a lot in advance error: D:\jboss-4.2.3.GA\server\default\.\tmp
How display a image on servlet from file upload - JSP-Servlet
is: How display a image on servlet from file upload I receive your answer today... upload page Employee Image...(); ServletFileUpload upload = new ServletFileUpload(factory); List items = null; try
Upload Code error on deploying
Upload Code error on deploying  on deploying the above code as it is said it is giving error that " No getter method for property thefile of bean org.apache.struts.taglib.html.BEAN " Error 500--Internal Server Error

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.