HELP! How to save resultset (NOT file) from server databse on local machine

Our JSP web system allows our clients to be able to search data from the server-side database and then after get the resultset, they also should be able to save these data as a text file on their local machine by just a click. Of course, before they click the OK button, they should navigate the files system on their local machines and choose under which directory they want to put the file, and then provide a file name. I could NOT find a way to be able to navigate the local machine's drives.
I know there is a standard Save As dialogue automatically launched by the browser. But my problem is: I don't need such a pumped-up Save As... dialogue which most brower will provide, because our system will have an interface which will provide the same function as the Save As guy. And this is the part that I am currently working on. Our interface will permit the client to browse their file system and then provide a filename, and then click OK to save the file. PLEASE, anybody who can help me. I know there are guys there have answers for my questions:
1. In my JSP program, I save the resultset I get from the database as a string, and then this string should be sent through inputstream and outputstream and be saved as a text file onto the client's local machine. I know there's a lot file download topics but I am dealing with a string instead of a file, is there an inputstream accepting a string(which contains dataresultset) and output it to a file?
2. As I already said, how to make my own Save As... dialogue?
I really need help! I have been bothered by them for a long time. Thanks in advance!

Well, it's hard to interpret exactly what you want to do but I'll take a stab.
I would put the data into comma separated value (CSV) format and then stream it back to the browser using the "application/csv" content format.
By doing this, they can either save it to their hard drive into the directory of their choice, or open it using whatever mapping they have for the CSV mime type. For most Windows machines, this is Excel (if it's loaded).

Similar Messages

  • Please can someone tell me how to save a MP3 file from my email on my iPad so I can put in on Facebook? Thankyou

    Please can someone tell me how to save a MP3 file from my email on my iPad so I can put it on Faceboo? I use hotmail and please tell me step by step as I am not a tech guru lol. Thankyou

    Hi jscher200,
    Thank you for your reply, sorry for the VERY late late response, but I have just figured out how to control this separate 'panel'. I find it really useful for monitoring Google Analytics in as it can just sit there running. It does have its limitations, as it's a limited size (you can't expand it to full screen view), so you can only ever see a vertical section of a website and need to scroll to look to the right or left, but I have the live view of people accessing my website running on there and if the numbers start racking up at any time, I can scroll to look and see what pages they are accessing, where they've been referred from, etc.
    To get it to work, you save a website address in the Bookmarks Toolbar and when you can see it sitting on the toolbar at the top of the screen with its little icon, right click on it then click 'properties', then tick the box 'Load this bookmark in the sidebar'. The next time you click on this bookmark to open the website, it will load in this sidebar, which looks like a separate 'window' but is immovable. You can only have one sidebar application running at a time, but can change it by right clicking on the bookmark you want to load in there and it will then change to that one next time you click on that bookmark.
    I hope this might be useful to others, as I asked for help with this on loads of forums and not one person knew that this existed - even really skilled techies!

  • How to read a PDF file from server

    Hi All,
    I am strucked while creating new file instance .
    Here i know the URL.
    How to create the File instance by using this URL.
    I tried the following way:
    URI uri = url.toURI();
    File f = new File(uri);
    Here i got the following exception :
    <code>
    Exception in thread "main" java.lang.IllegalArgumentException: URI scheme is not "file"
    </code>
    Can any one help me?
    Thanks in advance......

    Can any one help me how can i down load a file
    from server by using URL?RTFAPI. Url.openStream().

  • How to read LARGE .TXT FILES from server

    i m unable to read large .txt (>100kb) files from server.
    also is there any way to store the content in mobile phone.
    PLEASE HELP as iam in dire need and only few days are left.
    thanks

    Hi
    > i m unable to read large .txt (>100kb) files from server.
    What do you mean by that? Are you trying to display that amount of text and you get an error. Are you trying to read from the server and you get there an error?
    > also is there any way to store the content in mobile phone.
    Using RMS. But be aware of the size limit specific to every phone.
    Mihai

  • Drag and Drop file from a jsp to local machine

    Hello All,
    We have got a user requirement where, currently we have an attachment section in our JSP, where users are provided with the file download links,
    as the user clicks those links the file download pop appears.
    But now they ask for a drag and drop functionality, so that the link icon which they see on the JSP, if they drag it to there local machine, the file is downloaded
    to the machine. Am not sure if it can be done from a web page. Any ideas if at all this is feasible. Or any direction where i can look through.
    Thanks,

    duskandawn wrote:
    But the other way around of dragging file which is on server, to the local machine...even if i have applet.. not sure how will that work.Neither am I. Just check the documentation / forums associated with the UI framework in question. This forum is for JSP/JSTL only. I can only tell how to embed an applet or webstart app in JSP, but nothing more than that.
    Any ideas around Activex stuff if any ?Terribly bad idea. It's a MS proprietary technology and it would work in only one certain webbrowser developed by the same company, so you would exclude about 40% of the world wide web population from using the functionality. Just use the standard technologies.

  • Need to ftp files(BACS) from Server to Users Local Machine-Urgent

    Hello,
    I am working on a Oracle HRMS Implementation(11i) and have a requirement wher I need to ftp files (BACS File) from a server to Users Local Machine.
    Please let me know any scripts or the way forward to achieve the same using a concurrent program.
    Thanks a lot!

    That requires the users machine for a ftp server installed and to be "visible" to the conc program server, the first one requiring setup and configure for every client and the second one may be a problem if in different segments or security policies. Another approach may be to generate the files on the server in a known location and from the client create a batch script to connect to that server and retrieve the file(s). You may schedule the program to run at certain hours or use a shortcut so the user can run it on demand

  • How To save a music file from an email

    PLEASE HELP ME I CANT FIGURE OUT HOW TO SAVE SONG FROM MY ITUNES LIBRARY THAT U SENT TO MY EMAIL
    Post relates to: Pixi Plus p8wu0 (AT&T)

    Open email attachments
    You can receive any kind of file sent to you in email, but you can open an
    attachment only if your phone has an application that can open the file type.
    To open a single attachment: Tap the attachment name to download the
    attachment. If the attachment is a supported file type (MP3, PDF, DOC,
    XLS, PPT, GIF, or JPG), it opens automatically.
    To open multiple attachments: Tap the list of attachment names to view
    the attachments, and tap an attachment name to open the file.
    Save attachments;
    When you open attachments of certain file types, you can save them to your
    phone so you can view them later in one of your phone’s applications.
    1. Open the attachment (see Open email attachments).
    2. Do one of the following:
    • For pictures in JPG, GIF, BMP or PNG format, tap Copy To Photos.
    • For other file types, open the application menu and tap Save As. If
    the Save As menu item is not available, you cannot save the
    attachment.
    To open a saved attachment on your phone, open the application that can
    display the attachment. The attachment appears in the list of available files.
    Tap the file to open it.
    You can find this info. on page 74 of the user guide.
    For reference purposes, click on the following link for the support page for your device on the kb.palm.com webpage.
    http://kb.palm.com/wps/portal/kb/na/pixi/pixi/att/home/page_en.html
    There are links on the page to the user guide, troubleshooting, how to's, downloads, etc.

  • How to save my PDF file from Acrobat to my document in my Adobe Reader in my iPad ???

    I can't save my file from the Acrobat to my iPad Adobe Reader ....... This make me difficult to save things in my iPad ..... I really need someone help !!!!

    You can move any pdf file from your computer to your Reader iOS app with the iTunes application using its sync capability. You can also place the pdf on the web and use Safari or email it to yourself (and use Mail) to get the pdf into Reader for iOS. When you get a link to a pdf you can tap the link to view the pdf file file. When viewing the pdf file you can tap the pdf file again and you will be given a choice of applications you can use to opening the pdf file in the app will transfer the pdf to the application's sandbox.

  • How can i download many file from server one times.

    Hi,
    I want to create the service to download multi-files from web server one time
    from browser. It seems no way to do it. My soulition is compressing the files
    to zip before download it. The problem is that when the user uncompresses the
    files,full path of downloaded files are setted. Look like this:
    /usr/tmp/test/file1
    /usr/tmp/test/file2
    /usr/tmp/test/file3
    My question is :
    1. Is there any way not to specify the full path of a file when
    add the file to zip.
    Here is the source
    BufferedInputStream bis
    = new BufferedInputStream(
    new FileInputStream( file ) );
    //if not full path . can is works?????
    ZipEntry target = new ZipEntry( file.getPath() );
    // zos is ZipOutputStream
    zos.putNextEntry( target );
    int c;
    while( ( c = bis.read() ) != EOF ) {
    zos.write( (byte)c );
    2. Is there any way to get and change the current work directory of my server ?
    Please help!!

    If i use file.getName(). I will lost the struct of path.
    I means that,if i compress the list of files:
    /usr/tmp/test1/file1
    /usr/tmp/test1/file2
    /usr/tmp/test2/file3
    can i keep the part of path's strcut. (usr/tmp/../.. etc.)
    I tried to do as this:
    target = new ZipEntry( file.getPath.substring(1));
    an error be reported when uncompressed the zip file.
    error message:
    warning [zt000002.zip]: extra 28 bytes at beginning or within Zip file (attempting to process anyway)
    Error in file #1: bad Zip file offset (Error local header signature not found): 0
    (attempting to re-compensate)
    Extracting 20030109.xls
    Error: unexpected end of file encountered
    Error: invalid compressed data to inflate
    Why? can i set "any" entry name??

  • How to fix message not downloaded from server

    Hello everyone,
    My name is Joshua Kahley, and I am an IT technician in charge of handeling email related issues in my company.  We host our own web and email server and since the I-OS 7 update we have had a problem where many messages cannot be retrieved from our email server.  I confirmed with my own phone that this issue did not exist prior to I-OS 7, messages that displayed fine before were no longer be readable on I-OS 7 when i upgraded.
    The error message I recieve is "This message has not been downloaded from the server"
    I'm not sure if this is a problem that can be solved on the phone itself as I have tried changing numerous settings.  Has anything changed with the way I-OS 7 handles IMAP messages that my require us to change settings on our server?  No other email provider has this issue as far as I can tell; in addition, all of our customers have the same issue (they all have their email through our servers)
    If anyone has any insight into this I would greatly appriciate it.
    ~Joshua Kahley

    No fix, but I found a work-around for a single message that iOS email refuses to download at http://www.bitcraft.com.au/iphone-mail-app-says-this-message-has-not-been-downlo aded-from-server/
    that reads:
    ...here’s a quick fix… Forward the message. Just click Forward and it will ask you “Download rest of message first?”. Say yes and then you will see the old message quoted in the forward. Now if only Apple would make than an option without having to ‘fake’ forward it…
    The above worked for me when I encountered "This message has not been downloaded from server” on my iPad 3 running iOS 7.1.1.

  • How to save mp3 audio file from website?

    Is it possible to save an mp3 audio file found on a webpage -- http://..... .mp3 -- to my computer?  It's the typical scenario of a black page with just a playback bar, plus a 'go back 30 seconds' button, pause/play button, time counter and volume button.  Is it possible for this described situation?
    I believe I've also seen pages with similar playback back but also has a dropdown arrow on the right, but I don't remember what was in it.
    Thanks!

    No, not from AL11.
    Execute a function module in SE37
    From client(work station or desktop) to Application server execute this function module:
    ARCHIVFILE_CLIENT_TO_SERVER
    provide source file path (ie client workstation or desktop file path)
    provide target file path (in application server)
    Hope it helps.
    Regards

  • How to save/download pdf files from safari?

    I have some PDF files that I need to download from the internet/Safari. How do I do that? There is a button that I can click on my PC using Firefox but I can't find anything in Safari of my iMac. I would appreciate very much if someone can help me. Thanks.

    Thank you, Niel. Do I move the cursor outside the window or still within the window? I tried many times and couldn't find the right spot.
    Barry, you are right. I was going to do that but I want to learn how to use it with Safari.

  • How to remove Contribute hidden files from server?

    How can I use Dreamweaver to remove all files that are created by Contribute? To terminate Contribute and it's checkin/out system and everything Contribute might place on the remote server?
    In the site settings and on the local side I have removed all Contribute settings, .LCK files and notes folders that I could find.
    Still remains is Contribute's interfering when I use Dreamweaver's FTP function.
    How do I eradicate Contribute for ever from this domains server?
    Thanks!
    Coen

    The Firefox/FireFTP is just a workaround and not a solution to the Dreamweaver issue. I've had the same problems in the past with trying to delete directories.
    Shane

  • How to make an XML file from SQL query on local disc (c:\temp)?

    This query shows me XML results, but can I somehow make an XML file to local disc?
    Thanks.
    DECLARE @IMO NUMERIC(8,0)
    DECLARE @Counter INT
    SELECT @Counter = 1
    WHILE ( @Counter <15 )
    BEGIN
    SET @IMO = (SELECT ImoNo from Vessel where ID=@Counter)
    SELECT top 1
    @IMO as ImoNumber,
    VesselName,
    Time,
    lat as CurrentLatitude,
    lon as CurrentLongitude,
    sog as SpeedOverGround,
    cog as CourseOverGround,
    hdg as HeadingInDegrees,
    GoingToCountry = (SELECT TOP 1 CountryName
    FROM ShipSchedule
    WHERE ImoNo = @IMO and DestPosArrived = 'false'
    ORDER BY DestPosETA ),
    GoingToHarbour = (SELECT TOP 1 Harbour
    FROM ShipSchedule
    WHERE ImoNo = @IMO and DestPosArrived = 'false'
    ORDER BY DestPosETA ),
    DestinationLatitude = (SELECT TOP 1 DestPosLAT
    FROM ShipSchedule
    WHERE ImoNo = @IMO and DestPosArrived = 'false'
    ORDER BY DestPosETA ) ,
    DestinationLongitude = (SELECT TOP 1 DestPosLON
    FROM ShipSchedule
    WHERE ImoNo = @IMO and DestPosArrived = 'false'
    ORDER BY DestPosETA ),
    ArrivalTime = (SELECT TOP 1 DestPosETA
    FROM ShipSchedule
    WHERE ImoNo = @IMO and DestPosArrived = 'false'
    ORDER BY DestPosETA ),
    GoingFromCountry = (SELECT TOP 1 CountryName
    FROM ShipSchedule
    WHERE ImoNo = @IMO and DestPosArrived = 'true'
    ORDER BY DestPosETA desc),
    GoingFromHarbour = (SELECT TOP 1 Harbour
    FROM ShipSchedule
    WHERE ImoNo = @IMO and DestPosArrived = 'true'
    ORDER BY DestPosETA desc),
    DepartureTime = (SELECT TOP 1 DestPosETD
    FROM ShipSchedule
    WHERE ImoNo = @IMO and DestPosArrived = 'true'
    ORDER BY DestPosETA desc)
    FROM Position
    WHERE ImoNo = @IMO
    order by time desc
    for Xml AUTO,elements,root('SplosnaPlovba')
    SELECT @Counter = @Counter + 1
    END

    You can use bcp with query out option
    use your above query as the source query and use queryout option after specifying destination as your required local file path (specify extension as .xml)
    see
    http://visakhm.blogspot.com/2013/10/bcp-out-custom-format-data-to-flat-file.html
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Access/download file from server.

    have a problem. When I am trying to save/open a file from server(secure) which uses HTTPS, its displaying error message:
    Internet Explorer cannot download ...File_name.doc from Server_name.
    Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.
    My code is below. Please help me out.
    Its working with my localhost(http) and with Firefix browser. Its something to do with http and IE 6.
    <java>
    if (!request.getScheme().equals("https"))
    response.setHeader("Pragma", "no-cache");
         String fileName=request.getParameter("instruction");
         //filename = filename.replaceAll( "\\W*", "" ) ;
         String DirName = request.getParameter("directory");
         String value = (DirName+"/"+fileName);
                   File f = new File (value);
                   response.setContentType("application/msword");
                   //set the header and also the Name by which user will be prompted to save
                   response.setHeader("Content-disposition", "attachment; filename=" + fileName);
                   InputStream in = new FileInputStream(f);
                   out.clearBuffer();          
                   int bit = 256;
                   int i = 0;
                   try {
                        while ((bit) >= 0) {
                             bit = in.read();
                             out.write(bit);
                   } catch (IOException ioe) {
                        ioe.printStackTrace(System.out);
                   out.flush();
                   out.close();
                   in.close();     
    </java>

    HI,
    To avoid redirection, Safari users are having good luck with Open DNS Free / Basic
    Carolyn

Maybe you are looking for

  • Problem While exporting HTML table to Excel(.CSV) in SharePoint 2010

    Hi , I was exporting HTML table to .CSV file.  Problem is if any field contains '>' or '<' symbol then after exporting to .CSV, it was showing like '&gt' and '&lt' and the code is  as below. //Export HTML table to CSV  function toCSV() {       var da

  • Flash Update Service Crashing

    I get the following frequently... Adobe® Flash® Player Update Service 11.3 r300 has encountered a problem and needs to close.  We are sorry for the inconvenience Error Signature szAppName : FlashPlayerUpdateService.exe     szAppVer : 11.3.300.265    

  • Mac Mini sleep issue

    New mac mini here. When my mini goes to sleep by itself and when I awake it the the internet safari hangs. I either have to reboot or put it to sleep and awake it again. Im using wireless and have an external hard drive connected.

  • [iPhone] Fullscreen in my application.

    Hi! Can I set really fullscreen on application for iPhone (ObjectiveC, OpenGL ES)? I would like to hide bar on the top of screen. Is is possible? MDW Message was edited by: MDW_PPC

  • PDF in iPad Mail to Numbers

    Is it possible to open a PDF that I receive in Mail in Numbers? I only get a choice to open in iBooks or Air Sharing. I can open Excel email attachments and Numbers allows exporting Excel files as an PDF file, so why can't it work the other way?