Saving a File in local DISK from JSP

Hi Techies,
I had createe an xml file from jsp, I want to store it in localdisk like when we download some files from internet it will ask at what location u want to store.
i.e the end user can give the location at which this xml file has to be stored.
Looking forward for u r solutions??
regards,
Krish

No ideas??

Similar Messages

  • How to save internal table data to file on local disk from smartforms?

    Hi there,
    I'm trying to save internal table data into .csv file on presentation server from within smartforms using GUI_DOWNLOAD function.
    This function works fine from abap program, but when I call it from smartforms it does nothing. Form prints ok and there is no file created on local dick.
    Is there a way to save smartforms internal table data to local disk?
    Thanks in advance,
    Baske

    Hi Jey,
    Thanks for your prompt replay.
    Unfortunately, Iu2019ve tried both your suggestions without success. Smartforms behaves just like in case of GUI_DOWNLOAD. There is no file saved on disk.
    Do you have any other idea?
    BR,
    Baske

  • During restore of my backup on iphone 5s i saw my photos and videos get doubled on ios 8.0 and moreover if i use to go at my computer and then open my iphone and in folder i see some files name local disk and my photos please help my memory doubles.

    during restore of my backup on iphone 5s i saw my photos and videos get doubled on ios 8.0 and moreover
    if i use to go at my computer and then open my iphone and in folder i see some files name local disk and my photos
    please help my memory doubles.

    I'm not sure, but I know it's not recommended to upgrade to iOS 8 on anything older than an iPhone 5. I only lost my music playlists and music that was on my phone, but that music is also on my iTunes, not the playlists though, and I don't want to go through ALL my iTunes library to fix it either... But it seems I don't have a choice right now.
    Whatever you do, do NOT upgrade to iCloud Drive, keep iCloud till OS X Yosemite comes out, if your computer is a Mac. I also just noticed that all my documents on my phone are gone from Pages, BUT if I go on the iCloud website they are still there. Hopefully it will all work itself out when I can update my macbook pro to OS X Yosemite.
    If you backed up your phone and all your purchases off your iPhone prior to trying to upgrade you should be fine... But I'm not even remotely sure.

  • When I open my photos a file called Local Disk appears, what is this?

    Lots of small files, barely a few kb in size appear in my file, called 'Local Disks'. I asked friends and they have never seen these files before, anybody have any idea what they are?

    it's when I access the photos through my pc, i go into the iphone file, then the file where the photos are and there are 100 of these small files named 'local disk' just before all the files for my photos

  • Install EBS on local disk from remote win 2003? Can't pass file space check

    I have a portable 250G hard disk on my poor performance win xp,I want to install EBS 12 on my portable hard disk,but I xp system's performance is poor,so I connect to a fine performance win 2003 through mstsc and I can access my 250G hard disk from remote computer win 2003;
    But when I indecate to use remote hard disk "\\tsclient\M\ebs" as my base directory,I meet some err log like below:
    RW-20012: Error: - Free disk space on system returns zero:
         probable cause - mount point does not exist.
    RW-20013: Error: - Not enough free disk space on system:
    Database ORACLE_HOME = \\tsclient\M\ebs\db\tech_st\10.2.0
    required = 3280.0
    actual = 0.0
    If I choose local disk as my base directory ,It pass the file space check;
    Can anyone meet such problem? Please help me ,thanks in advance!

    Instead of using "\\tsclient\M\ebs\db\tech_st\10.2.0" as a directory path, map this network drive as any other free drive (i.e. F:\, G:\ .. etc). You should be able to proceed with the installation then.
    If you need more details about mapping network drive, please refer to:
    Windows XP: Mapping a network drive
    http://www.microsoft.com/windowsxp/using/networking/maintain/mapdrive.mspx

  • Want to open a new browser window and display the html file in locale disk.

    Hi,
    I want to open a new browser window and display the html file in local drive. The below html applet work in local system successfully. But i deploy the same in web server (Tomcat) and try the same in client machine it does not work. Please help.
    Note:
    The class below fileopen.FileOpen.class i make it as a jar and put it in jre\ext folder at the client machine.
    ------------------------------------FileOpen.html(Tomcat)-----------------------------------------------------
    <html>
    <body >
    <applet code="OpenFile.class" archive="loadfile.jar" width="100" height="100">
    <param name="path" value="file://c:/open.html" />
    </applet>
    </body>
    </html>
    -------------OpenFile.java in server(Tomcat)--------------------------------------------
    public class OpenFile extends Applet implements ActionListener{
    String path = "";
    fileopen.FileOpen open = null;
    Button b = null;
    public void init(){
    path = getParameter("path");
    b = new Button("Open");
    b.addActionListener(this);
    add(b);
    public void actionPerformed(ActionEvent ae){
    try
    open = new fileopen.FileOpen(this,path);
    catch (Exception e){
    e.printStackTrace();
    -------------------------------------------FileOpen.java /Client JRE/ext----------------------------------------------------
    package fileopen;
    public class FileOpen
    AppletContext context = null;
    URL url = null;
    public FileOpen(Applet applet,String path)
    try
    if(null != applet){
    context = applet.getAppletContext();
    if (null != path)
    url = new URL(path);
    context.showDocument(url, "_blank");
    }catch(Exception ex)
    ex.printStackTrace();
    Please help to solve this issue very urgent.
    Thanks in advance.
    By,
    Saravanan.K.

    zzsara wrote:
    I want to open a new browser window and display the html file in local drive. ...Did you ever pause to consider how ridiculous that is?
    The best audience for applets is people off the internet. 'People off the internet' might be using a computer that has no (what was it?) 'open.html' in the root of the C: drive. In fact (shock horror) they may not even be running Windows, and would therefore probably have no 'C:' drive at all.
    If you do not intend to distribute this to people off the web, an application makes a lot more sense, but even then, you cannot rely on the document being there unless you 'put it there' (during installation, for instance).
    As the other poster intimated, applets can load documents off the local disk as long as they are trusted. Here is an example*, but note that it is not so rash as to presume any particular path or file, and instead leaves it to the user to choose the document to display.
    * The short code can be seen at SDNShare on the [Defensive Loading of Trusted Applets|http://sdnshare.sun.com/view.jsp?id=2315] post.
    On the other hand, a sandboxed applet can load any document coming from its own server via URL, or get showDocument(URL) to work. In that case, the JRE must recognize that the URL is from its own server, so the best way to form URLs for applet use is via the URL constructor
    new URL(getDocumentBase(), "path/to/open.html");That is how I form the URL in this [ sandboxed example of formatting source|http://pscode.org/fmt/sbx.html?url=/jh%2FHelpSetter.java&col=2&fnt=2&tab=2&ln=0]. Of course, in this case the applet loads the document, then parses the text to draw the formatted version, but the point is that an URL produced this way will work with showDocument(URL).
    I am pretty sure showDocument() in an applet off the internet will work with an URL pointing to a foreign (not its own) server, but it will not be able to load documents off the end user's local disks.
    I suggest a couple of things.
    - Try to express this problem in terms of what feature it is that you want to offer the end user. Your question jumps directly to a bad strategy for achieving ..who knows what? An example of a feature is "Shows the applet 'help' files on pressing F1".
    - A good way to indicate interest in a solution is to offer [Duke stars|http://wikis.sun.com/display/SunForums/Duke+Stars+Program+Overview] to match that interest.
    Edit 1:
    ..and please figure out how to use the CODE tags.
    Edited by: AndrewThompson64 on Sep 12, 2008 11:14 PM

  • Help! iPad 2 showing NEF/RAW files as 'local disk' ?!

    Hi all. I really hope someone can help as this is doing my nut in!
    I've always used the camera connection kit with my iPad 2 and Nikon D700 before with no problems. I can transfer the RAW/NEF files from my camera to my iPad 2, and then when I get home I can simply copy the RAW files to my PC by connecting the iPad via USB, browsing for the NEF files and copying.
    I've just returned from holiday and tried to do the same, but my NEF/RAW files from this trip are showing up as 'local disk' as shown here:
    They are definitely the RAW files, as when I right click on their properties they are about 13-14 MB in size which is about right. The properties box shows the file types as 'Local Disk'. If I try to copy the file on to my PC (Windows 7 Home Premium), it says there is an unexpected error (0x00000000) that keeps me from copying the file.
    I can't rename the file to .nef or anything.
    Previous RAW files from other holidays that are stored on the iPad2 still show as NEF/RAW and I can copy them to my PC with no probs. It's just this recent transfer from Camera to iPad has buggered all the files.
    If anyone knows of a remedy to somehow rescue these RAW files or let my PC be able to read/copy them I'd be much appreciative.
    Many thanks for your help in advance, and for reading.

    1.) Which of the two is the visible one in Library mode? can one set the preference?
    Raw only. The jpeg is sort of like sidecar. Cannot set a preference. The only setting you can change is to view them separately.
    2.) Which is edited?
    Raw only.
    ... and at the same time I feel I need to be able to compare them.
    Lightroom's Canon-specific DNG profiles are developed to match Canon's picture styles (or whatever they are called). So, if you use, say, the Faithful Picture style in Camera, Lightroom's "Camera Faithful" profile will render your raws very close to DPP, if not identical. That's for default settings. However when you start adjusting, Lightroom's and DPP's processing may differ.
    You may not even need those Jpegs for comparison, after all.

  • Download Text file to Local drive from BSP Application

    Hi Guys,
    I am new to BSP, and I am doing a BSP application in which i want to download a text file to local drive C: on click of button. For that I am having a data in Internal table and Onclick event, in model class method DO_HANDLE_EVENT i want to download text file to local machine drive.
    Can anybody provide me full code with all data declaration and all?
    Your help would be appriciable. Thanks in Advance.

    Hi Jessy ,
    You can download the file from BSP pages using the method
    CL_BSP_UTILITY=>download.
    Please follow the below mentioned steps.
    1.Convert the text to a text table ie Internal table with a line type char255 or some others.
    2.Convert the text table into a string.
    3.Convert the string to XSTRING.
    4.Download that XSTRING as text file using the method
       CL_BSP_UTILITY=>download.
    Parameters:
    OBJECT_S    - XSTRING data
    CONTENT_TYPE  =  ' application/download'
    CONTENT_DISPOSITION = 'attachment; file=test.txt'
    RESPONSE                   = runtime->server->response
    NAVIGATION                   = navigation
    OBJECT_T
    I dont have system to give a programatical explanation to u.
    If you have any doubt kindly post.
    Reward for every useful solutions..
    Best Regards
    Renga

  • Can I write to a text file on local HDD from forms appl?

    Hi All,
    We have 8i database being accessed by 6i forms application using web-based arch. Clients are on windowsNT/window2000. Is it possible to dump some data in a text file from forms application (by pressing a button) on local hard disk? User is looking something similar to sqlplus spool in forms 6i. Is this possible? User is specific about file being created in local machine and not on server(utl_file/dbms_pipe). Any ideas?
    Thanks.

    You can find explanation and a quick start guide on PJCs on the Forms Upgrade Center at:
    I think the following code can give you a starting point for a PJC (based on text_item) that will do it.
    Also you will need to sign this JAR because you want to access the client machine - see the sigining paper on OTN.
    To activate this PJC you will use something like SET_CUSTOM_PROPERTY ('text_item1', 1, 'WRITE', :text_item1);
    In your form.
    import oracle.forms.ui.VTextField;
    import java.io.FileOutputStream;
    import oracle.forms.properties.ID;
    public class textio extends VTextField
    public final static ID WRITE = ID.registerProperty("WRITE");
    String a = "hello";
    public textio()
    public boolean setProperty(ID p0, Object p1)
    if (p0==WRITE)
    try
    FileOutputStream fileOut = new FileOutputStream("c:\\temp\\textio.txt");
    fileOut.write(p1.toString().getBytes());
    fileOut.close();
    } catch (Exception ex)
    ex.printStackTrace();
    }

  • How to redirect the to the file outside the context from jsp

    Hello Everybody,
    I am trying to redirect using jsp to the file available physically in the server machine out side the application.
    How can I do it..
    Thanks
    Saikrishna

    Write a servlet which takes the file ID as parameter, reads the file from the disk and writes it to the outputstream of the response. Finally redirect to that servlet with the file ID as parameter.
    You can find here an example of such a FileServlet: [http://balusc.blogspot.com/2007/07/fileservlet.html].

  • Store data on local disk from extension panel

    Hi,
    I'm trying to write an extension to InDesign and I use the following code to store a simple string in the encrypted data store that is available in Air:
          var hostnameBytes:ByteArray = new ByteArray();
          hostnameBytes.writeUTF("http://www.google.com");
          EncryptedLocalStore.setItem("hostname", hostnameBytes);
    Then, I use the following code to retrieve the data from storage:
        storedValue = EncryptedLocalStore.getItem("hostname");
        if (storedValue != null)
              serverName = storedValue.readUTFBytes(storedValue.length);
    However, the above does not work within the context of the extension. Do we have access to the encrypted data store in the extensions? Is there anything else that I need to do to get this to work?
    Thanks,
    Bulent

    Hi Jey,
    Thanks for your prompt replay.
    Unfortunately, Iu2019ve tried both your suggestions without success. Smartforms behaves just like in case of GUI_DOWNLOAD. There is no file saved on disk.
    Do you have any other idea?
    BR,
    Baske

  • Saving a file to users desktop using JSP

    Hi,
    I wrote a JSP program,which gets data from Database and displays in XML/HTML format on the browser.It is working fine.Now,I want to give an option to the user to save that HTML format to his Desktop.So that he view it Offline(I know it sounds stupid...),the information.
    I tried using
    File outputFile=new File("temp.html");
    //Some more statements to write into File
    in my JSP file,but I couldnt see where "temp.html" is it getting saved.(Iam working on CLient machine).
    Any useful information wii be Apperaciated...
    thanks
    Rao

    I think you will get what you are looking for by setting the contentType and header info at the top of your jsp.
    <%@page contentType="application/save; charset=iso-8859-1" language="java" import="(your classes)"%>
    <%
    // set the filename for download
    response.setHeader ("Content-Disposition","attachment;filename=your_file.txt");
    %>
    Text text text

  • Passing correct image-file path in flashVar from jsp into embedded Flex application

    I have an application that embeds an image viewer, written in
    Adobe Flex within a jsp page running in a J2EE application on
    Tomcat 5.5. The Flex code is a one-line modification of the
    application displayed at (
    http://www.adobe.com/devnet/flex/samples/fig_panzoom/).
    The image viewer is founded and loaded in the output to the
    screen, but I cannot get the Image Viewer to display the image
    correctly, even though I succeed when either I run the .swf from
    the command-line or from an HTML page.
    My webapp is called FRSApp. The directory structure is, under
    FRSApp:
    myTest.html
    jsp/catalog.jsp
    pan_zoom_files/images/map.jpg
    The JSP code is thus,
    code:
    <%@ taglib prefix="mm" uri="FlexTagLib" %>
    <mm:mxml
    source="../pan_zoom_files/FIG_PanZoom_for_jsp.mxml" >
    <mm:flashvar name="myVar"
    value="/FRSApp/pan_zoom_files/images/map.jpg"/>
    </mm:mxml>
    the code within PanZoom.mxml is,
    private var _imageURL:String =
    Application.application.parameters.myVar;
    <ns1:ImageViewer
    id="imageViewer"
    imageURL="{ _imageURL }"
    bitmapScaleFactorMax="5"
    bitmapScaleFactorMin=".05"
    width="100%" height="100%"
    x="0" y="0"/>
    I have tried other paths to the image file, including
    images/map.jpg [required by command-line execution of .swf]
    pan_zoom_files/images/map.jpg [required by HTML page
    (myTest.html) that embeds the .swf file]
    I have succeeded in loading image viewer embedded in the jsp
    page when the image path is hard-coded in the mxml file, by means
    of the following code:
    <div id="swf-id" class="swfcontent"><embed
    type="application/x-shockwave-flash"
    src="../pan_zoom_files/FIG_PanZoom_for_jsp.swf" id="swf-id"
    name="swf-id" bgcolor="#ffffff" quality="high" wmode="opaque"
    height="480" width="772"></div>
    <script type="text/javascript">
    // <![CDATA[
    var props = new Object();
    props.swf = "../pan_zoom_files/FIG_PanZoom_for_jsp.swf";
    props.id = "swf-id";
    props.w = "772";
    props.h = "480";
    props.ver = "9";
    props.wmode= "opaque";
    var swfo = new SWFObject( props );
    registerSWFObject( swfo, "swf-id" );
    // ]]>
    </script>
    The error is either a "failed to load image" generated by the
    Image Viewer code, or a Flex system error message, resembling a
    null-pointer exception:
    TypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    at FIG_PanZoom_for_jsp()
    at _FIG_PanZoom_for_jsp_mx_managers_SystemManager/create()
    at mx.managers::SystemManager/initializeTopLevelWindow()
    at mx.managers::SystemManager/docFrameHandler()
    Any ideas are greatly appreciated!!

    Solved the problem. I had made several mistakes. One of them
    was to pass in the J2EE context path when what was needed was the
    fully qualified image url:
    http://localhost/FRSApp/pan_zoom_files/images/earth-map_small.jpg.
    The second mistake was to assume the flashvar variable could be
    picked up by initializing Action Script in the the mxml file,
    designated by <mx:script> tags. No, the flash variable will
    only be visible within the <mx:Application>
    </mx:Application> tags.

  • Open a file in UNC path from jsp page

    Hi,
    it might be simple but I don't know how i can achieve this,
    I have a UNC path to a remote computer something like this,
    \\ComputerName\SharedFolder\ResourceFileName
    i can open this file from windows by typing the above in Windowes explorer or something like this in browser file://ComputerName/SharedFolder/myfile.txt
    I want a simple jsp page that will have a hyperlink or a button which when clicked should prompt me with a dialog to open/save/cancel the file. it should not open the text fine inside the browser itself. when i click open it should open the file in appropriate viewer(i think this is judged by the mimetypes set on my machine).
    Thanks in Advance.

    khana6454 wrote:
    I want a simple jsp page that will have a hyperlink or a button which when clicked should prompt me with a dialog to open/save/cancel the file. it should not open the text fine inside the browser itself. when i click open it should open the file in appropriate viewer(i think this is judged by the mimetypes set on my machine).You need to set the content disposition to 'attachment' rather than 'inline' (which is default).
    You may find this FileServlet example useful: [http://balusc.blogspot.com/2007/07/fileservlet.html].
    That said, the file needs to be located on the server machine, not on the client machine. If you want to open files from the client machine, rather write a client side application which you can integrate in your webpage, e.g. a signed applet or web start application (jnlp).

  • Unable to save PDF file to local drive from sap after Above reader XI update.(Not as sap issue ,this is related to Adobe)

    Hi All,
    Users are unable to download/save file from sap after a adobe XI update.(no pop comes to save/open)
    Surprisingly,i am able to do so on my system without any adobe plug ins disabled or any registry editing.
    This is a strange behaviour and need to be resolved Asap....
    I contacted sap..this is not sap issue..this is a pure adobe reader bug.
    Please need help on this experts
    Feel free to comment for further details
    kind Regards,
    Sumit
    Mail me at [email protected]

    Hi ,
    Please tell us a lot more.
    - Is SAP running a local process, or something in a web browser?
       sap is running via SAPGUI ,no java system
    - What system?
      Users facing issue in all system
    - What browser?
    IE 9.0.28
    - Can PDFs from other sources be downloaded?
    Yes,they are downloaded.
    More Details-I did some tricks below which resulted in open/save popup......tht is not recomended by IT team...i need a permanent solution
    In IE, goto menu Options -> "Manage
    Addons", select in box "Show:" "Run without
    permission", then you see the Adobe PDF plugin
      Ichanged status to "Disabled
    Also, if i change the registry key settings for users as
    HKEY_CLASSES_ROOT\AcroExch.Document.11
    Value: EditFlags
    Changed: 0x00000100
    to 0x00000000
    (Remove the "Open always with this
    program" option)
    ITS WORKING.....
    But,in my system i need not to do all this settings and surprisingly it is working  only for me,rest all users are facing this issue.....
    If any one using Lync ,communicator ..do let me know..i wil show  the actual scnerio.
    Kind Regards,
    Sumit

Maybe you are looking for