File dialog problems in JSP

Hi I am trying to open a file dialog using java script in my JSP program. Below is the code written for JS. I have also imported
<%@ page import = "java.awt.*" %>...when I try to execute by pressing a button supposed to open the dialog box it shows "object expected for the line "var Frame = new Frame();" written in the code below.seek help
Regards
PS: I am using IE 6.0 with cookies enabled
<SCRIPT language="javascript">
function buttonHandling(event,str)
     if(str == '4')
          document.StreamTestingKCC.submit();
     if(str == '5')
          var Frame = new Frame();
          var fd = new FileDialog(Frame, "Browse File",
               FileDialog.LOAD);
          fd.toFront();
          fd.show();
          var getDirectory = new FileDialog(Frame1);
          var filename = fd.getDirectory() + fd.getFile();
          alert('You selected: ' + filename);
     return false;
</SCRIPT>

OK, do you have any idea if I have to implment the same in IE 6.0
Thanks

Similar Messages

  • Save File Dialog problem

    Hello ! I'm new with java so dont be to rude plz ;) ...
    First, my situation :
    I have a jsp that calls a servlet that get data from a database. After that I have to take these data and write them in a .txt file by calling a Save File Dialog. What I've done for now is to put
    response.setContentType("application/msword");
    response.setHeader("Content-Disposition",
    "attachment; filename=\""+fileName+"\"");
    in my servlet after created my file.
    My problem :
    The Save File Dialog shown but if I save the file, it contains the code of my jsp page. I suppose that I have to "bind" the file and the response, but how do I do that ??
    Or if you have a better way to do it ...
    Thx a lot !

    Here's some changes ...
    I'm now able to get the file with a Save File Dialog, but I also get my jsp code in the top of my page.
    Here's my code :
    String fileName = "MyData.txt";
    File myFile = (File)request.getAttribute("file");
    /*cyc.mypackage.DataDefects ddDefects = bConn.getddMyDefects();
    cyc.mypackage.Export exp = new cyc.mypackage.Export();
    File myFile = exp.createDataFile(ddDefects, fileName);*/
    String value = "attachment; filename=\"" + myFile.getName() + "\";" ;
    response.setContentType("application/octet-stream");
    response.setHeader("Content-Disposition",value);
    response.setContentLength((int)myFile.length());
    BufferedInputStream fif = new BufferedInputStream(new FileInputStream(myFile.getAbsolutePath()));
    int data;
    while((data = fif.read()) != -1)
    out.write(data);
    fif.close();
    and the result is :
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <link href="./css/Cyclic.css" type="text/css" rel="stylesheet">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
    <title>Infos</title>
    </head>
    <body>
    <form id="fInfos" method="POST" action="./Login.jsp" >
    <input type="submit" value="Unconnect" />
    </form>
    <form id=...>
    ( ... I dont put all cause the code is too long ...)
    </form>
    212007778197.9059295654296875-1600
    212007779245.207000732421875-1600
    212007779927.3587188720703125-1600
    212007774641.695709228515625-960
    (... rest of my good data)
    Does anybody knows how to get rid of the jsp code ??

  • File dialog problems

    When I try to place a file, the file dialog box closes automatically before I have a chance to find my file. Seems like a bug. Had to switch back to CS6. That's two problems now! AE CC is unusable too!

    There was no question in your post. Do you seek any assistance?
    To place files, you can also drag 'n drop.
    About the self-closing dialog window - is your mouse/keyboard perhaps faulty?

  • File path problem in jsp

    Hi techies,
    I am having a jsp ,which is having the following fields,
    url
    driver
    userName
    Password
    Location of the file
    Here is my jsp code
      <table rows=6 cols=2>
                   <tr>
                        <td>Enter url</td>
                        <td> <input type="text" name="url" value ="<%= url%>"></input></td>
                   </tr>
                   <tr>
                        <td>Enter DriverName </td>
                        <td><input type="text" name="driver" value="<%= driver%>"></td>
                   </tr>
                   <tr>
                        <td>Enter UserName </td>
                        <td><input type="text" name="userName"></td>
                   </tr>
                   <tr>
                        <td>Enter Password </td>
                        <td><input type="password" name="passWord"></td>
                   </tr>
                   <tr>
                        <td>choose the backupXml file</td>
                        <td><input type ="file" name ="xmlFileName"></td>
                        <input type="hidden" name ="xmlFile" >
                   </tr>
                   <input type="hidden" name ="resubmit" >
              </table>
                   <br>
                   <input type="button" value="submit" onClick ="doSubmit()" >
                     For the first time I am sending request to the servlet and after checking the conditions we will get one confirmation box.
    If we click ok (i.e true) ,we have to again send the same data to the servlet.
    I am keeping all the variables in a session in servlet and retrieving in to jsp, but the problem is ,when again sending request to servlet , I am missing file name,but I am getting file path(i.e c:/sun/appserver/bin/) only.
    I need to get c://sun/appserver/bin How can i get entire path??
    Here is my servlet code
    File f = new File(xmlFileName);
      String     xmlFilePath = f.getAbsolutePath();     
    System.out.println("xmlFilePath"+xmlFilePath);
    session.setAttribute("xmlFile",xmlFilePath);Here is my java script code
    function init() {
         <%
              if(message !=null && messageType != null && messageType.equals("ALERT")){ %>
              var mss = confirm("<%=message%>");
            //  alert(mss);
               if(mss == true)
          var user = '<%=session.getAttribute("user")!=null?session.getAttribute("user"):"0"%>';
            var pass = '<%=session.getAttribute("pass")!=null?session.getAttribute("pass"):"0"%>';
         var xmlF = '<%=session.getAttribute("xmlFile")!=null?session.getAttribute("xmlFile"):"0"%>';
                    alert("inside if"+xmlF);               
                    document.forms[0].resubmit.value = "true"
                    document.forms[0].userName.value =user;
                    alert(document.forms[0].userName.value);
                    document.forms[0].passWord.value=pass;
                    alert(document.forms[0].passWord.value);
                    document.forms[0].xmlFile.value=xmlF;
                    alert(document.forms[0].xmlFile.value);
                    doSubmit();
              else
                   alert("else");
         <% } %>
    function doSubmit() {
                       alert(document.forms[0].userName.value);
                       alert(document.forms[0].passWord.value);
                        alert(document.forms[0].xmlFileName.value);
                document.forms[0].submit();
                         }

    Thanks for u r reply Mr.Prasad.
    Sorry for the delay for reply.
    My scenario is in 2 phases
    Phase 1. I am taking input from the front end using jsp and writing the contents in to a file and then downloading that file on to my desktop.(Now let us say this one as file downloading)
    Phase 2. Now I had designed a page,which locates the downloaded file by using the following tag.
                        <td><input type ="file" name ="xmlFileName"></td>
        In the downloaded xml file I am having applicationid. I am checking whether the application id already xists in the database (or)not.
    If already exists in the database , the end user will get one confirmation msg,saying application already exists in the database.
    If the user clicks ok again the request has to go to the servlet.
    Now the actual problems are
    1. When I locate the file on the desktop let us say c:\desktop\krish and click on submit button, it is locating to the file that is present in the server(this is the case for the first time means before checking the application id in the database).
    2. when the end user clicks "ok" on the confirmation box , I am not getting the file name,that has to be submitted to the servlet.
    Can u plz help me how to resolve this issue.
    regards,
    Krish

  • File Dialog Problem

    When I use a file dialog with a datalog type wired to it, it only list all
    files
    with the same datalog type, that's ok. But then i open one of them, when
    I try to read another file, the first one is no longer in the list.
    Do you know why, and how to solve it?
    Thank you

    using JFileChooser can we create a file under specified directory.if so through which method we can perform

  • Upload file form problem in JSP portlet !!!

    Hi!
    I use "OrdHttpUploadFile" class for upload file in JSP portlet to database!
    Problem is that this class must use FORM ENCTYPE="multipart/form-data" whis I suppose dont work in portlet!?
    Which FORM ENCTYPE should I use in portlet! Or there is some other solution for upload file in JSP portlet!?
    Thanks!
    Kristjan

    Thanks for u r reply Mr.Prasad.
    Sorry for the delay for reply.
    My scenario is in 2 phases
    Phase 1. I am taking input from the front end using jsp and writing the contents in to a file and then downloading that file on to my desktop.(Now let us say this one as file downloading)
    Phase 2. Now I had designed a page,which locates the downloaded file by using the following tag.
                        <td><input type ="file" name ="xmlFileName"></td>
        In the downloaded xml file I am having applicationid. I am checking whether the application id already xists in the database (or)not.
    If already exists in the database , the end user will get one confirmation msg,saying application already exists in the database.
    If the user clicks ok again the request has to go to the servlet.
    Now the actual problems are
    1. When I locate the file on the desktop let us say c:\desktop\krish and click on submit button, it is locating to the file that is present in the server(this is the case for the first time means before checking the application id in the database).
    2. when the end user clicks "ok" on the confirmation box , I am not getting the file name,that has to be submitted to the servlet.
    Can u plz help me how to resolve this issue.
    regards,
    Krish

  • Open File Dialog - JSP pages

    If I create a jsp page with an open file dialog will it work no matter what OS people are running? What I want to do is attach a file. It would be preferrable if I could set a "working" directory and when I open up the dialog it starts in that directory. It has to work with Windows, Macs, and Linux . If there is no way to set the "working" directory, can a cookie be created that remembers the last directory accessed from the page so that when they open up the dialog it opens up under the last directory accessed?

    there is a html input type that sparks up the OS native filechooser. Thus, it should be platform independent. You should look into Apache Commons FileUpload, as it makes the process of uploading/sending files ridiculously easy.

  • File dialog box: how get full path and filename (firefox 3.0 problem)

    Hi,
    I have a smilar problem then discussed in this thread: file dialog box: how get  full path and filename
    Now this solution doesn't seem to work in firefox 3.0,I only get the filename but not the full path.
    I have tried to solve this problem by adding *"netscape.security.PrivilegeManager.enablePrivilege("UniversalFileRead");"* in a javacript function but that doesn't do the trick
    Although when i tested it local it does work.
    Any idees how to solve this?
    Best Regards
    Stijn

    Actually, that is strange and scarry. With 20% of the browser market share they decide to behave like Microsoft did in the past - they want to decide what users need and what they do not need. With 3.0 I have a real problem with some of my applications. They are all tested in IE6, IE7, FF2.0 and they all work the same way (they even work with Opera and Safari). Now, I will for sure not go there and make it work for 3.0, just because 2 out of 200 users use FF3.0. Up to now I have always recomended FF as the best browser. 3.0 causes my opinion to change completely. Competition is always good but it is a question if it is good if we have 20 different browsers out there with equal market shares.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Problem using the File Dialog Box in a Client/Server application

    I am developping a client-server application using Labview 5.1 . The application on the server acquires data from some instruments and saves it on file, while the application on the clients displayes such acquired data. For doing this I call some routines on the server via the "Open Application vi" (remote connection). All goes well except when I open on the server the "File Dialog Box vi" : in this case the application on the clients is blocked (is blocked the execution of the called vi on the server). Only when
    the File Dialog Box on the server is closed, the execution of the called vi on the server starts again.
    I need to use the File Dialog Box on the server, but I don' t want to stop at the same time
    the clients !!
    I need help for resolving such problem.
    Many thanks in advance !!!

    Hi!
    waldemar.hersacher wrote:
    "It seems that the VIs called by the clients are running in the user interface thread.
    A call to the file dialog box will call a modal system dialog. So LV can't go on executing VIs in the user interface thread."
    Are you sure? I think, that File Dialog, called by LabVIEW File Dialog from Advanced File Functions Palette doesn't blocking any cycles in subVI, which running in UI Thread. Look in my old example (that was prepared for other topic, but may be good for this topic too).
    2 linus:
    I think, you must a little bit reorganize you application for to do this. You must put your File Dialog into separated cycle. This cycle, of course, will be blocked when File Dialog appear on the screen. But other cy
    cle, which responsible for visualization will run continuosly at the same time...
    Attachments:
    no_block_with_file_open_dialog.zip ‏42 KB

  • File dialog in jsf form problem

    Dear community,
    I created a form with several input text fields, one of which is to input a filename to attach a file to a form entry. This field has a button next to it which pops up a file dialog. My problem is if I set the button's immediate property to true all the other inputs get lost when the response is rendered. If I set immediate to false other required input fields have to be entered before I can open the file dialog.
    Can anybody please help me out here?
    Thanks,
    Achim

    Hi Achim,
    Did you figure out the answer to your question? I am having the same problem.
    Thanks. -Ceily

  • Problems adding an attachment file table in a JSP

    Hi,
    I'm working on CRM proyect and I want to add an attachment file table in a JSP, infoForm.jsp, so i copied the table
    from createComplaintAttachment.jsp and changed the JSPs releted with it, but when I just loggin and try to add
    a file in infoForm.jsp I get an Error Page and the following...
    #1.5#00156004D798005E0000009F000072D100043A9AAAE45CBD#1190335873308#com.sap.icss.impl.backend.crm.servicerequest.AttachmentBEImpl#sap.com/home~icss_sbx#com.sap.icss.impl.backend.crm.servicerequest.AttachmentBEImpl#J2EE_GUEST#2##mvicrd_CRD_209672450#Guest#c069617067dc11dcbc1a00156004d798#SAPEngine_Application_Thread[impl:3]_32##0#0#Error#1#/Applications/Common/Infrastructure#Java###An error occurred in method:
    #2#add(attachment)#com.sap.icss.util.IcssException: Cannot add attachment
         at com.sap.icss.impl.backend.crm.servicerequest.AttachmentBEImpl.add(AttachmentBEImpl.java:144)
         at com.sap.icss.impl.businessobject.servicerequest.AttachmentBOImpl.add(AttachmentBOImpl.java:146)
         at com.sap.icss.ctrl.action.servicerequest.AddRequestAttachmentAction.doIcssPerform(AddRequestAttachmentAction.java:175)
         at com.sap.icss.ctrl.action.IcssBaseAction.execute(IcssBaseAction.java:325)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at com.sap.isa.core.RequestProcessor.processActionPerform(RequestProcessor.java:674)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at com.sap.isa.core.RequestProcessor.process(RequestProcessor.java:391)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at com.sap.isa.core.ActionServlet.process(ActionServlet.java:243)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    #1.5#00156004D798005E000000A0000072D100043A9AAAE46208#1190335873310#com.sap.icss.ctrl.action.servicerequest.AddRequestAttachmentAction#sap.com/home~icss_sbx#com.sap.icss.ctrl.action.servicerequest.AddRequestAttachmentAction#J2EE_GUEST#2##mvicrd_CRD_209672450#Guest#c069617067dc11dcbc1a00156004d798#SAPEngine_Application_Thread[impl:3]_32##0#0#Error##Plain###The following error occured:  com.sap.icss.util.IcssException: AttachmentBOImpl:add - Error in getBackend
         at com.sap.icss.impl.businessobject.servicerequest.AttachmentBOImpl.add(AttachmentBOImpl.java:157)
         at com.sap.icss.ctrl.action.servicerequest.AddRequestAttachmentAction.doIcssPerform(AddRequestAttachmentAction.java:175)
         at com.sap.icss.ctrl.action.IcssBaseAction.execute(IcssBaseAction.java:325)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at com.sap.isa.core.RequestProcessor.processActionPerform(RequestProcessor.java:674)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at com.sap.isa.core.RequestProcessor.process(RequestProcessor.java:391)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at com.sap.isa.core.ActionServlet.process(ActionServlet.java:243)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    the strange thing is that i don't get that error if I get into the complaintCreateHeader.jsp (complaint) first, and my
    application works well if I do so. ¬¬
    I think i'm missing an attribute on the request but i don't know wich one.
    Thanks a lot for any help

    Thanks Prashant,
    Level 1 of the problem is solved.
    Now I want When I click on the workset iview link,
    It should open another workset iview in which the iviews are displayed as links.
    Page 1
      (Workset Iview1)Clickable                                                    Workset Iview2 Clickable
    When workset iview1 is clicked, it should go to a page
    Link 1(an iview) Link 2(iview2) Link 3(iview3) and so on
    how can I achieve this?

  • Trying to create multithreading problems when opening file dialog

    Warning: Newbie to Labview...
    I have a problem in a rather complicated VI where bringing up the open file dialog halts some background operations.
    I would really like to reproduce this behaviour for various reasons, but am unable to. I've created a simple VI with a for-loop where the index feeds a sine converter which in turn feeds a tank indicator. This produces an oscillating behaviour. To this VI I've added a file dialog control.
    Regardless of the multithreading setup, I'm unable to get the oscillating of the tank indicator to stop when the dialog is open. Is there something I can do to get this behaviour? I realize it's unusual to try to break things, but it is rather important for me.
    Tha
    nk you,
    Nigel

    Hi,
    The for loop (all loops by the way) is halted until everything in it is
    finished.
    Try this:
    + Make a while loop
    + wire TRUE to the stop criterium.
    + Put an indicator on the 'I'.
    + Put a MS Wait in it (e.g. 80 ms), to prevent 100% processor time.
    Run it, and the indicator will increase fast.
    Now put any dialog in the while loop. E.g. a message box.
    The indicator will increase everytime you press 'OK'.
    Note: stop by pressing CTRL+. and clicking 'OK' several times.
    Regards,
    Wiebe.
    "N Cook" wrote in message
    news:[email protected]..
    > Warning: Newbie to Labview...
    >
    > I have a problem in a rather complicated VI where bringing up the open
    > file dialog halts some background operations.
    >
    > I would real
    ly like to reproduce this behaviour for various reasons,
    > but am unable to. I've created a simple VI with a for-loop where the
    > index feeds a sine converter which in turn feeds a tank indicator.
    > This produces an oscillating behaviour. To this VI I've added a file
    > dialog control.
    >
    > Regardless of the multithreading setup, I'm unable to get the
    > oscillating of the tank indicator to stop when the dialog is open. Is
    > there something I can do to get this behaviour? I realize it's unusual
    > to try to break things, but it is rather important for me.
    >
    > Thank you,
    > Nigel

  • Jsp file dialog

    I need to open a file dialog box to allow users select a local file on their from a jsp.How do i implement this.
    thanks in advance
    Dalo

    ... to do a file upload I presume.
    File upload is not JSP specific, it's an HTML element called file
    <form name="myform" method="post" action="yourservletorjsp" enctype="multipart/form-data">
    <input type="file" name="fileparam">
    </form>Don't forget the enctype attribute or it won't work!
    What you have now is a multipart form... and you cannot read those with the standard servlet classes. So you'll need an external API that can do it. One example is Apache FileUpload.
    http://jakarta.apache.org/commons/fileupload/

  • File download using servlet and jsp. File Dialog comes twice

    Hi
    I was trying to download a file using servlet. There is a link which calls the servlet. When I click on the link file dialog box comes up. On selecting Open it again shows me the file dialog box. I changed the method from POST to GET and it worked properly.
    My question is why does it work with GET and not with POST. I am aware of the differences between POST and GET but am not able to come to a rational explanation for this behaviour.
    Please if anyone can explain this to me I am going crazy thinking an answer for this.
    Thank you.
    Regards
    Jay

    Hi Jay,
    I also have the same question. Why does it work with GET and not for POST?. If you were able to find the answer please let me know.
    Thank you.
    Regards,
    Aravind

  • How to open a 'Save As' Dialog box in JSP?

    Hi all, i need to export a CSV file. A button is provided to the user to choose the directory to save the file. My problem is how to open a 'Save As' dialog box in JSP?
    Thanks in advance

    Hi,
    Below is my full code to download fiel but still the Save Dialog box still not show..
    <%@ taglib prefix="cs" uri="futuretense_cs/ftcs1_0.tld"
    %><%@ taglib prefix="asset" uri="futuretense_cs/asset.tld"
    %><%@ taglib prefix="assetset" uri="futuretense_cs/assetset.tld"
    %><%@ taglib prefix="commercecontext" uri="futuretense_cs/commercecontext.tld"
    %><%@ taglib prefix="ics" uri="futuretense_cs/ics.tld"
    %><%@ taglib prefix="listobject" uri="futuretense_cs/listobject.tld"
    %><%@ taglib prefix="render" uri="futuretense_cs/render.tld"
    %><%@ taglib prefix="siteplan" uri="futuretense_cs/siteplan.tld"
    %><%@ taglib prefix="searchstate" uri="futuretense_cs/searchstate.tld"
    %><%@ taglib prefix="locale" uri="futuretense_cs/locale1.tld"
    %><%@ taglib prefix="dateformat" uri="futuretense_cs/dateformat.tld"
    %><%@ taglib prefix="blobservice" uri="futuretense_cs/blobservice.tld"
    %><%@ taglib prefix="satellite" uri="futuretense_cs/satellite.tld"     
    %><%@ taglib prefix="date" uri="futuretense_cs/date.tld"
    %><%@ page import="COM.FutureTense.Interfaces.*,
    COM.FutureTense.Util.ftMessage,
    COM.FutureTense.Util.ftErrors"
    %><%@ page import="COM.FutureTense.Interfaces.*,
    COM.FutureTense.Util.ftMessage,
    COM.FutureTense.Util.ftErrors"
    %>
    <%@ page language="java" contentType="text/html;charset=UTF-8" %>
    <%@ page import="java.io.File" %>
    <%@ page import="java.io.OutputStream" %>
    <%@ page import="java.io.FileInputStream" %>
    <cs:ftcs><%-- france/test_template
    INPUT
    OUTPUT
    --%>
    <%-- Record dependencies for the Template --%>
    <ics:if condition='<%=ics.GetVar("tid")!=null%>'><ics:then><render:logdep cid='<%=ics.GetVar("tid")%>' c="Template"/></ics:then></ics:if>
    <%
    String fileToFind = request.getParameter("file");
    if(fileToFind == null) return;
    File fname = new File(fileToFind);
    System.out.println("Save As: "+fname.getName() );
    if(!fname.exists()) return;
    FileInputStream istr = null;
    response.setContentType("application/octet-stream;charset=ISO-8859-1");
    response.setHeader("Content-Disposition", "attachment; filename=\"" + fname.getName() + "\";");
    try {
    istr = new FileInputStream(fname);
    int curByte=-1;
    while( (curByte=istr.read()) !=-1){
    out.write(curByte);
    out.flush();
    } catch(Exception ex){
    ex.printStackTrace(System.out);
    } finally{
    try {
    if(istr!=null) istr.close();
    } catch(Exception ex){
    System.out.println("Major Error Releasing Streams: "+ex.toString());
    try {
    response.flushBuffer();
    } catch(Exception ex){
    System.out.println("Error flushing the Response: "+ex.toString());
    %>
    </cs:ftcs>
    Can anybody help me with this???
    Thank you in advance.

Maybe you are looking for

  • 10.6.8 upgrade problems

    I've been VERY happy with my MBP since I bought it a year ago. However after the 10.6.8 update yesterday I have had the following problems: 1. Startup time VERY slow - 30 sec to login screen, then 7 minutes after user/pass entered to log in 2. Networ

  • S-video port on G4 MacBook Pro

    I have one of the old MacBook Pros that has an s-video port on it. It came with an adapter that plugged into that port and output composite video (standard RCA video connector). I have lost that adapter. Does anyone know where I can buy a replacement

  • Runtime information in BPM

    Hello XI Experts, I've got one question: Is it possible to obtain a runtime information in Business process ? I have created alerts where I use container to add dynamic text from payload but I also need to add information on which system this alert w

  • What is Remote Desktop Client Update v 3.8.2

    Why do I need Remote Desktop Client Update 3.8.2

  • Folder Structures

    Hello All, I was using iView Media Pro, until I picked up Aperture. Quick question ... since Aperture stores all photos in one library file, is there a way to get access to images from Photoshop without having to export from Aperture? Also, I am awar