Save image file in server machine from client

hai
I am working in swing based applications on linux environment.
I can able to save the image file from java appln to local directories.
My doubt is
how to save that image file in another machine in the same network or in the server machine through java application insead of saving in the local machine.
if anyone can help me to findout the solution?
advance thanks,
Samy.

The file can be read in the weblayer if it is sent as a mutlipart request. So once u have it i the Webserver u can always send it to the app server by posting it in a location which the app server can read using URL api

Similar Messages

  • Path does not exit - While trying to save file on SharPoint Server 2013 from client machine

    Hi,
    I have installed Microsoft SharePoint Server 2013 Enterprise Edition on my testing Lab environment (On VM Workstation 10) on Windows Server 2012 with SQL server 2012, I can access all files stored at SharePoint Server from any physical machine, I can share
    a single file among different people to work simultaneously, but here i stuck on saving any file from client machine to directly on SharePoint Server, Attached is the snap shot, whenever I try to save any file directly It says Path Does Not Exist, If I drag
    and drop any file directly to SharePoint I do not see any error message.
    I read from different posts that I need to Enable Desktop Experience Feature on Server 2012, which I installed but no positive result gained :(
    I will appreciate for any possible help?
    Ali

    Hi Ali,
    Please try disabling the protected view per the link below and test the issue again:
    http://social.technet.microsoft.com/Forums/en-US/b8381a19-3394-406f-8adb-1976f45460ef/path-does-not-exit-while-trying-to-save-file-on-sharpoint-server-2013-from-client-machine?forum=sharepointgeneral
    You could simply type the url as http://sp/sites/sitename in the Filename place.
    Regards,
    Rebecca Tu
    TechNet Community Support

  • How to save image files into SQL Server?

    Hello, All:
    Does anyone know how to save image files into SQL Server? Does the file type have to be changed first?? Please help me! Thank you!

    You need a BLOB field (usually)... Then you can check this tutorial out:
    http://java.sun.com/developer/onlineTraining/Database/JDBC20Intro/exercises/BLOBPut/
    There are other exercises on that site, including one on reading the images back.

  • Uploading a image file to server

    hi,
    In client side i am choosing a image file or text file(using input type file in jsp)
    with full path.I want to save this file on server side.how to do this.please help me.

    http://search.sun.com/search/onesearch/index.jsp?qt=file+upload+servlet&rfsubcat=&col=developer-forums

  • How can i look up a EJB residing in different machine from client side?

    hai ,
    How can i look up a EJB residing in different machine from client side?
    this is my code...........i don't know what should i use as Initial Context Factory...................i am using a sun appserver 8............
    package com.parx.lms.lmsdelegate;
    import com.parx.lms.exception.LMSException;
    import javax.naming.Context;
    import javax .ejb.CreateException;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import javax.rmi.PortableRemoteObject;
    import java.rmi.RemoteException;
    import com.parx.lms.controller.*;
    import com.parx.lms.vo.UserVo;
    import com.parx.lms.exception.BusinessException;
    import java.util.Hashtable;
    import java.lang.*;
    public class LmsDelegate{
    private final static String JNDI_NAME="LmsBean";
    private static String url="http://localhost:4848";
    public static Lms lms = null;
    public void getController() throws CreateException,
    NamingException,RemoteException{
    if(lms == null){
    Hashtable h=new Hashtable();
    h.put(Context.INITIAL_CONTEXT_FACTORY," ********what should i use here???????*************************");
    h.put(Context.PROVIDER_URL,url);
    System.out.println("Before Loading Context in Delegate");
    Context ctx=new InitialContext(h);
    System.out.println("Loaded Context in Delegate");
    Object obj=ctx.lookup(JNDI_NAME);
    System.out.println("Loaded Object in Delegate");
    System.out.println("Before Loading Home in Delegate");
    LmsHome home = (LmsHome )PortableRemoteObject.narrow(obj,com.parx.lms.controller.LmsHome.class);
    System.out.println("Loaded Home in Delegate");
    lms = home.create();
    System.out.println("Loaded remote in Delegate");
    public void addUserDelegate(UserVo vo) throws BusinessException{
    try{
    getController();
    System.out.println("Before calling the addUser of Session");
    lms.addUser(vo);
    }catch(CreateException e){
    System.out.println("Create Exception in Delegate due to--->"+e);
    e.printStackTrace();
    throw new BusinessException(e);
    }catch(NamingException e){
    System.out.println("Naming Exception in Delegate due to--->"+e);
    e.printStackTrace();
    throw new BusinessException(e);
    catch(RemoteException e){
    System.out.println("Remote Exception in Delegate due to--->"+e);
    e.printStackTrace();
    throw new BusinessException(e);
    }catch(LMSException e){
    System.out.println("duplicate user name--->"+e);
    e.printStackTrace();
    throw new BusinessException(e);
    pls help me..........

    h.put(Context.INITIAL_CONTEXT_FACTORY," ********what should i use here???????*************************")
    Each app server provides their own jndi factory class. For ex for weblogic it is weblogic.jndi.WLInitialContextFactory. SInce you are using sun app server, check if there are any examples to find out or the docs.
    private static String url="http://localhost:4848
    Since the client is in a different machine the localhost is not going to work here. provide the url or the machine name of the system in which ur sunapp server is running. In addition u will need to have the stubs of the remote interfaces in ur client machine.

  • How can i upload a image file to server by using jsp or servlet.

    Hi,
    I m gurumoorthy. how can i upload a image file to server by using jsp or servlet without using third party API. pls anyone send me atleast outline of the source code.
    Pls send me anyone.
    Regards,
    Gurumoorthy.

    I'm not an applet programmer so I can't give you much advice there.
    If you want to stream the file from the server before it's entirely uploaded, then I don't believe you can treat it like a normal file. If you're just wanting to throw it up there and then listen to it, then you can treat it like a normal file.
    But again, I'm not entirely certain. You might be able to stream the start of the file from the server while you're still uploading the end of it, but it probably depends on what method you're using to do the transfer.

  • How to make the active save-to-file with the data from GPIB ?

    Hello,,everybody !!
    I want to make the active save-to-file with the data from GPIB since starting the measurement. To save-to-file at the end of measurment is somehow risky for losing the data because my measurment have to take for long time (eg. 24-48 hours).
    Thank you in advance for anybody's help !!

    Thanks Dennis,
    I have already append, I got it but still have one small problem that between each line it has the blank line. Example as below ,
    16:40:33 54.24
    16:40:34 54.23
    16:40:35 54.24
    I want to get rid of the blank line in between.. Do you have the idea about it ?

  • Can I transfer files to a machine from a machine w/a dead screen?

    Question:Can I transfer files to a machine from a machine w/a dead screen?

    If the MBP with the dead screen is otherwise functional, start it up in Target Disk Mode (Powering it up holding the T key/Firewire connecting the two MBPs).  If the other MBP sees the other MBP, you can click on the HDD icon and transfer files.
    Ciao.

  • To save a word/xls document from server machine to client

    Hi Folks,
    I am facing a problem in storing a document from server to client machine.
    I have a document in Oracle database BLOB column and i am able to read and open that document in client browser. But it is stored in the server machine when accessing from the client browser it is opening as a read only copy.
    I want to open it as editable copy in client machine and once it is edited i want to save back to the databse. But it can be stored in server or client machine without promting to the user.
    Any one can help me?
    Senthil

    Hi, I am wondering whether this will take time for a document/image which is about 3, 4 MB??? Cos customer has to scan documents one by one and the saving of the file in the DB and then using that to transfer to MSMQ (which is the requirement) should take less time than scanning 2 documents.

  • How to download a file from server machine to client machine using jsp

    Hi,
    In my application, I have an excel file stored on my server machine. How can I download that excel file on to my client machine using jsp. Is there any other way I can open that file from my machine and save it in my machine using jsp/java?
    Its an emergency for me to do this.
    Can anyone provide me the full code to download a file from server machine as I don't have
    time to browse through various sites.
    thanks in advance,
    Tiijnar

    Please post your code using code tags (click on CODE above the text area, when posting)
    response.setContentType("application/octet-stream");Why octet-stream? Set the correct mime-type.
    String disHeader = "Attachment; Filename=\"filename\"";The filename should just be the file's name. Not the complete path to the file! This will tell anyone where the file is located on the server. It's also inconvenient because by default,the browser will suggest it as the name for the download.
    Your way of writing to the output stream is just plain wrong. See this snippet (picked from [http://balusc.blogspot.com/2007/07/fileservlet.html])
            BufferedInputStream input = null;
            BufferedOutputStream output = null;
            try {
                // Open streams.
                input = new BufferedInputStream(new FileInputStream(file), DEFAULT_BUFFER_SIZE);
                output = new BufferedOutputStream(response.getOutputStream(), DEFAULT_BUFFER_SIZE);
                // Write file contents to response.
                byte[] buffer = new byte[DEFAULT_BUFFER_SIZE];
                int length;
                while ((length = input.read(buffer)) > 0) {
                    output.write(buffer, 0, length);
                // Finalize task.
                output.flush();
            } finally {
                // Gently close streams.
                close(output);
                close(input);
            }

  • How to download/save report from server machine to client machine?

    Hello All
    This is San,
    My problem is that i need to save pdf/html report in client machine while report running on client machine for this i have set destype as file and desformat as pdf/html.
    It is running and save automatically while report run on server machine (Application Server OS is Windows 20003 professional) but when i run it on client machine (Client machine OS is XP sp2) click on run button to run report then it give message as
    FRM-41214: Unable to run report
    When I do showjobs then it give message as
    Executed successfully but there were some errors when distribute the output<br>
    Please suggest me solution of the above mentioned.
    I am waiting for your reply.
    Thanks in Advance
    Edited by: user8752210 on Feb 11, 2011 11:46 PM

    Hello Mr.
    Thanks for quick reply.
    The e:\tempReport directory is on both app-server and client and it is shared folder, i am sending procedure that i have used as:
    PROCEDURE DOWNLOAD_AS IS
    l_success boolean;
    l_bare_filename varchar2(50);
    BEGIN
    --l_bare_filename := substr(:upload.file_name,instr(:download.file_name,'\',-1)+1);
    l_success := webutil_file_transfer.AS_to_Client_with_progress
    (clientFile => :GLOBAL.PATH3||:global.tmp--(\\client_ip_address\e:\tmpreports\file_name.html it is shared folder)
    ,serverFile => :GLOBAL.PATH2||:global.tmp--\\server_iip_address\e:\tmpreports\file_name.html it is shared folder)
    ,progressTitle => 'Download from Application Server in progress'
    ,progressSubTitle => 'Please wait'
    if l_success
    then
    message('File downloaded successfully from the Application Server');
    else
    message('File download from Application Server failed');
    end if;
    exception
         when others
         then
         message('File download failed: '||sqlerrm);
    END;
    Please suggest me what to do.
    Thanks

  • Reg :File upload and download from client machine

    hi..
    anyone help me the way that how to upload and download word
    document file from client machine.. i am using j2eeserver1.4 in linux..
    i want upload file from client machine(windows) to server(linux.) please
    help me . tell me idea regarding..
    i have tried this coding.. but i can transfer txt file. only. when i upload mirosoft word file.. it will open with some ascii values with actual content.
    <!-- upload.jsp -->
    <%@ page import="java.io.*" %>
    <%String contentType = request.getContentType();
    String file = "";
    String saveFile = "";
    FileOutputStream fileOut = null;
    if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0))
    DataInputStream in = new DataInputStream(request.getInputStream());
    int formDataLength = request.getContentLength();
    byte dataBytes[] = new byte[formDataLength];
    int byteRead = 0;
    int totalBytesRead = 0;
    while (totalBytesRead < formDataLength)
    byteRead = in.read(dataBytes, totalBytesRead, formDataLength);
    totalBytesRead += byteRead;
    try { 
    file = new String(dataBytes);
    saveFile = file.substring(file.indexOf("filename=\"") + 10);
    saveFile = saveFile.substring(0, saveFile.indexOf("\n"));
    saveFile = saveFile.substring(saveFile.lastIndexOf("/") + 1,saveFile.indexOf("\""));
    int lastIndex = contentType.lastIndexOf("=");
    String boundary = contentType.substring(lastIndex + 1,contentType.length());
    int pos;
    pos = file.indexOf("filename=/" + 1);
    pos = file.indexOf("\n", pos) + 1;
    pos = file.indexOf("\n", pos) + 1;
    pos = file.indexOf("\n", pos) + 1;
    int boundaryLocation = file.indexOf(boundary, pos) - 4;
    int startPos = ((file.substring(0, pos)).getBytes()).length;
    int endPos = ((file.substring(0, boundaryLocation)).getBytes()).length;
    String folder = "/tmp/uploads/";
    fileOut = new FileOutputStream(folder + saveFile);
    fileOut.write(dataBytes);
    fileOut.write(dataBytes, startPos, (endPos - startPos));
    fileOut.flush(); } catch(Exception e) {  out.print(e);
    } finally
    {  try
    {fileOut.close();
    }catch(Exception err)
    %>
    please which package will help me to upload word document file with no errror. send me how can use in ftp.. send me some sample program..
    Regards..
    New User M.Senthil..

    Hi,
    Well,i don't know whether if this helps people here are not.
    It is always a good practise to do it via Servlet and then download content.
    The adavantage of doing this is
    1). You may not need to pack the downloadable with the .war which you ultimately genrate which ceratinly help us in terms of faster deployment.
    3). You may update the new content just by moving a file to the backup folder.
    2).One may definately download the content irrespective to the content/file.
    Hope example below helps..
    Configurations:
    In the above example we are assuming that we placing all downlodable file in D:/webapp/downlodables/ and you have configured the same path as a init param with the name "filePath" in your web.xml.
    something like the one below.
    <servlet>
        <servlet-name>DownloadServlet</servlet-name>
        <servlet-class>com.DownloadServlet</servlet-class>
        <init-param>
           <param-name>filePath</param-name>
           <param-value>D:/webapp/downlodables/</param-name>
           <!--Could use any backup folder Available on your Server-->
        </init-param>
    </servlet>
    <servlet-mapping>
        <servlet-name>DownloadServlet</servlet-name>
        <url-pattern>/downloadFile</url-pattern>
    </servlet-mapping>DownloadServlet.java:
    ==================
    package com;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import java.io.BufferedOutputStream;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.IOException;
    import javax.activation.MimetypesFileTypeMap;
    *@Author RaHuL
    /**Download Servlet
    *  which could be accessed downloadFile?fid=fileName
    *  or
    *  http://HOST_NAME:APPLN_PORT/ApplnContext/downloadFile?fid=fileName
    public class DownloadServlet extends HttpServlet{
      private static String filePath = new String();
      private static boolean dirExists = false;
      public void init(ServletConfig config){
          // Acquiring Backup Folder Part
          filePath = config.getInitParameter("filePath");
          dirExists = new File(filePath).exists();      
      private void processAction(HttpServletRequest request,HttpServletResponse response) throws Exception{
           // Some Authentication Checks depending upon requirements.
           // getting fileName which user is requesting for
           String fileName = request.getParameter("fid");
           //Building the filePath
           StringBuffer  tFile = new StringBuffer();
           tFile.append(filePath);    
           tFile.append("fileName"); 
           boolean exists = new File(tFile.toString()).exists();
           // Checking whether the file Exists or not      
           if(exists){
            FileInputStream input = null;
            BufferedOutputStream output = null; 
            int contentLength = 0;
            try{
                // Getting the Mime-Type
                String contentType = new MimetypesFileTypeMap().getContentType(tFile.toString());          
                input = new FileInputStream(tFile.toString());
                contentLength = input.available();
                response.setContentType(contentType);
                response.setContentLength(contentLength);
                response.setHeader("Content-Disposition","attachment;filename="+fileName);
                output = new BufferedOutputStream(response.getOutputStream());
                while ( contentLength-- > 0 ) {
                   output.write(input.read());
                 output.flush();
              }catch(IOException e) {
                     System.err.println("Exception Occured:"+e.getMessage());
                 System.err.println("Exception Localized Message:"+e.getLocalizedMessage());
              } finally {
                   if (output != null) {
                       try {
                          output.close();
                      } catch (IOException ie) {
                          System.err.println("Exception Occured:"+e.getMessage());
                             System.err.println("Exception Localized Message:"+e.getLocalizedMessage());                      
           }else{
             response.sendRedirect("/errorPage.html");
      public void doPost(HttpServletRequest request,HttpServletResponse response) throws Exception{       
            processAction(request,response); 
      public void doGet(HttpServletRequest request,HttpServletResponse response) throws Exception{
            processAction(request,response); 
    NOTE: Make sure You include activations.jar in your CLASSPATH b4 trying the code.
    therefore,if you have something like above set as your application enviroment in the above disccussed
    can be done by just giving a simple hyper link like
    <a href="downloadFile?fid=fileName.qxd" target="_blank">Download File</a>REGARDS,
    RaHuL

  • BOE 4.0 Report Application Server Connectivity from client machine

    Hi,
    We have installed BO 4.0 for RAS. We configured the RAS to pick up the rpt files from local repository, that is from the machine which the Bo is installed.
    But when we try to access the RAS from client machine to process report it is not accepting the request,
    1. Do I need to grant access to any specific user group?
    2. What is the user id which the Report Application Service runs in the machine?
    3. Do I need to add / manage any guest acoount to request from client machine?
    4. How to accept other user request to process reports?
    Here is the error details,
    Message Number: -2147217397
    Message Description: The user account has been disabled. (FWB 00012)
    Please advise,
    Thanks,
    FebiginR
    Edited by: FebiginR on Jan 17, 2012 8:17 PM

    Thanks for your support.
    I searched in otn and i got the information
    http://www.oracle.com/technology/sample_code/products/forms/extracted/getclientinfo/readme.html?_template=/ocom/print
    1)But in Deployment section of this document the first point is copy entire sab and its subdirectories ........ot <oracle_home>\orant\forms60\java directory.
    I can't understand what is "sab" where should i look for it.
    2) Place the signed JavaBean JAR file (getclientinfo.jar.sig) in the codebase directory being used to deploy Oracle Forms Server 6i applications.
    Can you kindly explain this.
    3) where should we write <ARCHIVE = "f60all.jar, getclientinfo.jar.sig">
    Can you kindly explain this.
    Thanking you in anticipation.
    Regards,
    Devendra

  • Windows Disk-Image File:  What to Exclude from Time Machine?

    I don't use Parallels very often, but when I do, the famous, predictable annoyance comes up:  The Windows disk-image file under MacOS gets tweaked, and then suddenly Time Machine has this mondo-huge 25GB file to backup.  That of course, clogs up my Time Machine backup drive.
    A common solution appears to be to exclude that file from Time Machine, and then back it up by some other means.  OK, I'm cool with that, if only I knew what that file is called, and where I could find it, so that I can tell Time Machine to exclude it.
    I'm guessing it's somewhere down in System or System Folder?

    Ask on the Parallels forums, as its their software you have questions about
    Http://forums.parallels.com

  • How to access/open rpd files in offline mode from client desktop

    Hi All,
    Please tell me what configuration settings I need to have on my desktop to access RPD files stored on BI server?
    In our OBIEE environment, we have BI server installed on linux server, and I have installed BI admin tool on my desktop (Windows OS).
    I need to know what settings I should configure in my NQSConfig.ini file on my desktop so that I can access rpd files stored on BI server...
    I can access online RPD using BI server ODBC connectibity, but want to access other offline RPD files stored in repository directory on linux server where OBIEE 11g server installation is done.
    Thanks and Regards
    Santosh
    Edited by: 910192 on 22-Feb-2012 08:09

    Saichand,
    Highly appreciate your response.
    But wht I am looking for is how to access other RPD files stored in repository folder on server machine where BI server is running, from BI administration tool which is installed on my desktop
    I am able to access default online repository on BI server using ODBC configuration from BI admin tool on my desktop, but want to access other rpd files (lets say sample rpd files which are installed on BI server machine) using (file->open-offline) option.
    As per Jay, it seems it is not possible to access repositories other than online repository on BI server, and I will have to copy those rpd files on my desktop and then access using file->open->offline option in BI admin tool.
    If you have any other way of doing this or have done this somehow , please let me know.
    Thanks and Regards
    Santosh

Maybe you are looking for