Problem with file download through JSP under WLS6.1 SP3

Hello,
We're in the process of trying to migrate from WLS 6.1 SP1 to SP3, and we're encountering
some difficulties with this migration.
I'm attaching a very simple JSP here - it's a snippet from a larger more dynamic
JSP, that I managed to narrow down to a pretty simple case which still doesn't
work.
This JSP opens a file residing at "c:\\BDELog.txt" (it's hardcoded - so change
it to any textual local file on your machine in order to test it), and writes
it to the output stream as a txt attachment.
This JSP works perfectly well on SP1, however, on SP3, it fails only during the
first hit. If you call this JSP again from the same browser window - it'll work.
Needless to say - this isn't an acceptable behavior for a website.
Hope you can help.
Appreciate any response.
Roy.
[download.jsp]

SP4 indeed solved it.
Thanks again!
Roy.
"Eric Gross" <[email protected]> wrote:
As a follow-up, SP4 is now available.
Regards,
Eric
"Eric Gross" <[email protected]> wrote in message
news:3dd19974$[email protected]..
I would wait until SP4(I believe it may be coming out this week actually).
If you can't wait until then, please contact support for a 1-off patch.
Regards,
Eric
"Roy Abitbol" <[email protected]> wrote in message
news:3dd10ef1$[email protected]..
Many thanks !! (sigh of relief...)
Is there a way to work around this problem - for example - write
the
header explicitly
so that the problematic header will be overriden or simply get a
patch
from you
guys ?
Or do we have to wait for SP4 ?
Thanks again,
Roy.
"Eric Gross" <[email protected]> wrote:
This is a known issue and has been fixed.
The fix is in SP4. This has to do with a bug that IE has with respect
to a
header:
Cache-Control: no-cache="set-cookie"
We introduced that as the default header to be returned on all
responses.
As of SP4(due out very soon), the default behaviour will be notto send
this
header back with each response.
Regards,
Eric
"Roy Abitbol" <[email protected]> wrote in message
news:3dca7f19$[email protected]..
Hello,
We're in the process of trying to migrate from WLS 6.1 SP1 to
SP3,
and
we're encountering
some difficulties with this migration.
I'm attaching a very simple JSP here - it's a snippet from a largermore
dynamic
JSP, that I managed to narrow down to a pretty simple case which
still
doesn't
work.
This JSP opens a file residing at "c:\\BDELog.txt" (it's hardcoded- so
change
it to any textual local file on your machine in order to test
it),
and
writes
it to the output stream as a txt attachment.
This JSP works perfectly well on SP1, however, on SP3, it fails
only
during the
first hit. If you call this JSP again from the same browser window- it'll
work.
Needless to say - this isn't an acceptable behavior for a website.
Hope you can help.
Appreciate any response.
Roy.

Similar Messages

  • Problem With File Download Dialog Box

    Hi all,
    I have jsp page that allows a user to export oracle data to excel.
    I have these code in my page:
    <%@ page contentType="application/vnd.ms-excel" %>
    response.setContentType ("application/vnd.ms-excel");
    response.setHeader ("Content Disposition",
    "filename=\"historicalrate.xls\"");
    I run the page and it popups a file download dialog box with Open and Save buttons.
    When I click the Save button a Save As window opens with a hr.xsl file name and Microsoft Excel Workbook(*.xls) as save type. It is what I want.
    The problem I have is when I click the Open button on the file download dialog box it displays data in excel format on a browser well. Then I click File > save as on browser's tool bar the Save As window pop up with no file name and a default Text(tab delimited)(*.txt).
    I need the file name and Microsoft Excel Workbook(*.xls) as default save type.
    Any help would be greatly appreciated.
    Please help
    Thanks

    I have the same problem with hui_ling.
    When user click on "Open", Excel start and open excel file correctly but the file name on excel title bar. 'Cause the file name is in Japanese characters. Any one can help me?
    Message was edited by:
    TNTVN

  • I am using Windows XP SP3, I have problem with file download while resuming downlod giving error "file...could not be saved, because the source file could not be read." Please help me

    I am using Fire Fox 5 beta version. After pausing the long file download, when I press the Resume download button the above message appear each time asking "Contact to Administrator". This problem was not with Fire Fox version 3 and above. Please Help Immediately. Thanks in advance...

    It is possible that your anti-virus software is corrupting the downloaded files or otherwise interfering with downloading files by Firefox.
    Try to disable the real-time (live) scanning of files in your anti-virus software temporarily to see if that makes downloading work.
    * http://kb.mozillazine.org/Unable_to_save_or_download_files

  • Problem with file download option in ALV via ITS. Please help!

    Hi Experts,
           I have a ALV report which I have web enabled using ITS service. In the ALV there is a delivered functionality for file download. It works fine when the report is run in the SE80. But when I run the ITS service for the report and choose file download option it displays a page saying "this page has been diaplayed due to technical reasons" with title "File properties". In addition it looks for Java runtime in the browser. After all this it opens a popup window for selecting path and file name.
    This is not user friendly and many customers have rasied their concerns on it.
    My question is that,
    Q1: What is the need of this "File properties page"? Why ITS calls this while ABAP editor does not?
    Q2: Is there any way we can suppress this so that it directly opens a popup window for selecting path and file name?
    Please help me.
    Thanks
    Gopal

    Hello Klaus,
    i have also the problem with these intermediate screens!
    We have in between installed patch 22 for ITS 6.20 and SP18 at SAP Netweaver 2004!
    But they are still not processed invisible for the users.
    Are there any additional parameters, which controls this behaviour(~webgui_updown_make_visible is not used!)?
    How can i check, if i have really a.ex. the actual ws.jar-file or other related files of the patch?
    We are using the standalone ITS with an own (modified) IAC with an own CI-design for the webpages. The intermediate screens are displayed with the "normal" SAPGUI-design because of the parameter ~generatedynpro. Without this it does not work, because the template SAPLSIT_0100 is missing!
    Or do you have an example for such a intermediate template with the applet for an upload of a file?
    Thanks in advance
    Felix

  • Problem with File download in ALV via ITS. Please help!

    Hi Experts,
           I have a ALV report which I have web enabled using ITS service. In the ALV there is a delivered functionality for file download. It works fine when the report is run in the SE80. But when I run the ITS service for the report and choose file download option it displays a page saying "this page has been diaplayed due to technical reasons" with title "File properties". In addition it looks for Java runtime in the browser. After all this it opens a popup window for selecting path and file name.
    This is not user friendly and many customers have rasied their concerns on it.
    My question is that,
    Q1: What is the need of this "File properties page"? Why ITS calls this while ABAP editor does not?
    Q2: Is there any way we can suppress this so that it directly opens a popup window for selecting path and file name?
    Please help me.
    Thanks
    Gopal

    Hello Klaus,
    i have also the problem with these intermediate screens!
    We have in between installed patch 22 for ITS 6.20 and SP18 at SAP Netweaver 2004!
    But they are still not processed invisible for the users.
    Are there any additional parameters, which controls this behaviour(~webgui_updown_make_visible is not used!)?
    How can i check, if i have really a.ex. the actual ws.jar-file or other related files of the patch?
    We are using the standalone ITS with an own (modified) IAC with an own CI-design for the webpages. The intermediate screens are displayed with the "normal" SAPGUI-design because of the parameter ~generatedynpro. Without this it does not work, because the template SAPLSIT_0100 is missing!
    Or do you have an example for such a intermediate template with the applet for an upload of a file?
    Thanks in advance
    Felix

  • Problem with FIle DownLoad

    Hi All,
    I am working on project where I need to display all the files (on the UI screen)which are in  windows folder with a download link.
    I used IWDDownload UI element for  downloading the file. Its working fine but problem is , when ever I download a file for first time its working fine. Later what ever I download other files, I was able to see only first file download. I guess this is problem with context binding but I am not sure.
    I used for loop to iterate all the files in folder and I binded the file name to IWD Download UI element using bindText option.I am creating UI elements dynamically in wdDoModifyView and it will call another method to bind to context.(As SAP Suggested not to modify any context elements in wdDoModifyView method).
    Please help me in this regard.
    Ramesh

    Ramesh,
    You need N dynamic binary attributes or IWDResource (in newer versions), one per file. Create them either in wdDoInit of view or in some suitable action handler.
    Then you have to populate IWDResource or set bytes of binary attributes. Check corresponding WD tutorials how to do this.
    In wdDoModifyView create IWDFileDownload control per every attribute and bind either "data" property (to binary attribute) or "resource".
    Valery Silaev

  • Problem with file downloads - please help

    Good morning. Since upgrading to BT Infinity 2, I have been experiencing the following problems:
    Cannot update Sonos firmware to version 5 - download times out and gives error 30
    Cannot download most files from safari - all start for the first few kb and then just hang
    Cannot download larger PDF files from Mac Mail
    These problems manifest themselves over wireless and wired connections, with the BT Homehub 5 and an Asus router. My ipad has no problems when on other networks or if I access my email from my work computer. When talking to BT technical support over the chat facility yesterday the connection dropped once every 10-30 seconds before reconnecting again. All of this leads me to believe that I have an intermittent failure on my broadband connection however BT insist that there is nothing wrong with the line or the router. I have changed channels on my router but this does not seem to make things better. Internet is working fine on all my devices for web browsing - only file downloads experiencing problems.
    Please help.

    Oh sorry, I thought from your description you were using an ASUS connected to the HH5, but it turns out you're using them separately.
    Is there a firmware update you can get on the ASUS?
    If you found this post helpful, please click on the star on the left
    If not, I'll try again

  • Problem with file receiving through abap web service

    Hi experts,
    I need to created web service for import file from .NET application into SAP.
    ABAP function expect hexadecimal string (same as GUI_UPLOAD / GUI_DOWNLOAD) but hexadecimal string from C# is too long (double longer), and I have no idea how to convert it. Also there is a problem with code page...
    Is there some better way to do this? Any idea is welcome!

    Hi Nemanja,
    Please bear in mind that your SAP system is based on UTF-8 encoding. Since you have the xstring length doubled, most probably your sender system uses UTF-16 encoding. So what you need to do is change the encoding used by your .NET application when sending the data to SAP.
    Alternatively, you can try using XSL Transformations in ABAP to have the input data converted from UTF-16-encoded xstring to ABAP structures. You can find a little example in this thread: ABAP data to XML conv with UTF-8 encoding and custom namespace. The point is to start your XSLT with the following: <?xml version="1.0" encoding="utf-16"?>.
    Hope this helps,
    Greg

  • Problem with file length in jsp it is working in IE, not working Firefox

    Hi,
    I'm upload a file from the browser. i'm calculating the length i'm not getting the length of the file.
    The below shown code is working perfectly in IE and not working in Firefox.
    FileUpload.html
    <DOCTYPE>
    <HTML>
    <HEAD>
    <TITLE>Retailmint Jobs - Registration Form</TITLE>
    </HEAD>
    <BODY>
    <form>
    <table>
    <tr><td>Upload Resume :</td>
    <td> <input>
       </td>
    </tr>
    </table>
    <input>
    </p>
    <p>  </p>
    </form>
    </BODY>
    </HTML>
    FileUploadSubmit.jsp
    <page>
    <page>
    <page>
    <html>
    <head><title>Retailmint- Submission</title></head>
    <body>
    <FileInputStream>
    </body>
    </html>
    I find an error in firefox browser is not taking the fully qualified path
    i.e: C:\Documents and Settings\Administrator\Desktop\if.doc
    In firefox it is taking if.doc only.
    please tell me the solution.
    Regards
    venkat

    I agree with your words
    sorry for the code pasting.
    Here is the code:
    FileUpload.html
    <HTML>
    <HEAD>
    <TITLE>Retailmint Jobs - Registration Form</TITLE>
    </HEAD>
    <BODY>
    <form name='subregiform' method="get" action ="FileuploadSubmit.jsp" >
    <table width="566" border="0" cellspacing="0" cellpadding="0">
    <tr><td width="197"align="right">Upload Resume</td>
    <td width="369"> <input type="file" name="file" value ="" >
    </td>
    </tr>     
    </table>
    <input type="submit" name="submit" value="Submit">
    </form>
    </BODY>
    </HTML>
    FileUploadSubmit.jsp
    <%@ page import="java.text.*"%>
    <%@ page import="java.sql.*" %>
    <%@ page import="java.util.*" %>
    <%@ page import="java.io.*" %>
    <html>
    <head><title>Retailmint- Submission</title>
    </head>
    <body bgcolor="#e0e0e0">
    <%
    FileInputStream fis = new FileInputStream(request.getParameter("file"));
    len = (int)file.length();
    System.out.println("length"+len);
    %>
    </body>
    </html>
    And how to find the absolute path of a file in jsp or java
    Edited by: venkat.k on Sep 17, 2007 10:12 PM

  • Problem with file download in oracle portal:UnsupportedEncodingException

    Hi,
    I'm developing a struts application inside Oracle Portal, when i click on a
    action link i need to download a file.
    <pdk-struts-html:link action="/fileDownload2Action?file=myfile.txt">Click Here to See the PDF</pdk-struts-html:link>
    i've tried to use org.apache.struts.actions.DownloadAction as follows:
    public class MyExampleFileDownload extends DownloadAction{
    protected StreamInfo getStreamInfo(ActionMapping mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception {
    // File Name
    String fileName = mapping.getParameter();
    // Set the content disposition
    response.setHeader("Content-disposition",
    "attachment; filename=" + fileName);
    // Download a "pdf" file - gets the file name from the
    // Action Mapping's parameter
    String contentType = "application/pdf";
    File file = new File(fileName);
    return new FileStreamInfo(contentType, file);
    but on the forward i receive the following exception:
    received IOException
    java.io.UnsupportedEncodingException: Media Type of a TextResponseWrapper must start with "text/"
    at oracle.webdb.provider.v2.utils.http.TextResponseWrapper.getData(Unknown Source)
    at oracle.webdb.provider.v2.utils.http.TextResponseWrapper.getData(Unknown Source)
    at oracle.portal.provider.v2.render.http.AbstractResourceRenderer.renderBody(Unknown Source)
    at oracle.portal.provider.v2.render.RenderManager.render(Unknown Source)
    at oracle.portal.provider.v2.DefaultPortletInstance.render(Unknown Source)
    at oracle.webdb.provider.v2.adapter.soapV1.ProviderAdapter.showPortlet(Unknown Source)
    at oracle.webdb.provider.v2.adapter.soapV1.ProviderAdapter.handleHttp(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor119.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at oracle.webdb.provider.v2.adapter.SOAPServlet.doHTTPCall(Unknown Source)
    at oracle.webdb.provider.v2.adapter.SOAPServlet.service(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
    ---end
    so it seems that struts forward in oracle have to be only text/html files
    but i don't wanto to go tio another page, just download a file on the same page
    after some control in my action.
    Could you suggest me any alternative solution?
    Regards,
    Francesco Rizzello

    Hi,
    Did this work ? :-
    Struts Download action portlet:UnsupportedEncodingException
    Regards,
    Sandeep

  • Problem with file adapter (FTP) created under business service

    Hi
    I am using file adapter in my receiver communication channel. I dont know the physical existance of the system so i have created one business service. Under this business system i have created a file adapter with FTP protocol. I have given all the parameters. But when i am trying to execute my scenarion i am getting the following error in SXMB_MONI.
    com.sap.aii.utilxi.misc.api.BaseRuntimeException thrown during application mapping com/sap/xi/tf/_SQLMediaCodeToCRMCapaign_: RuntimeException in Message-Mapping transformatio~
    In RWB i am getting the following error.
    Mapping Error
    Execption_During_Execution
    In Communication Channel monitoring I am not getting any information regarding receiver file adapter. Its not showing any message either error or sucessful. How to find whether my receiver communication channel FTP parameters configured correctly or not.What is the error. Please help me.
    Regards
    Sowmya

    Somya,
    Error clearly indicates that issue is with mapping....so there is no point of checking receiver adapter..
    BTW for checking whether the FTP site is working properly or not , you can use any ftp client softwares or command prompt of windows also.
    ---->In Communication Channel monitoring I am not getting any information regarding receiver file adapter. Its not showing any message either error or successful.
    Message has not reached up to that level so no point of looking at receiver communication channel.
    Regards,

  • Problem with file created through GUI_DOWNLOAD

    Hello,
    I have the following code
    REPORT  zprueba.
    START-OF-SELECTION.
      TYPES: BEGIN OF t_type,
        field1(20),
        field2(20),
      END OF t_type.
      DATA: lt_data TYPE STANDARD TABLE OF t_type,
            ls_data TYPE t_type.
      ls_data-field1 = '1'.
      ls_data-field2 = 'UNO'.
      APPEND ls_data TO lt_data.
      CLEAR ls_data.
      ls_data-field1 = '2'.
      ls_data-field2 = 'DOS'.
      APPEND ls_data TO lt_data.
      CLEAR ls_data.
      ls_data-field1 = '3'.
      ls_data-field2 = 'TRES'.
      APPEND ls_data TO lt_data.
      CLEAR ls_data.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
    *   BIN_FILESIZE                    =
          filename                        = 'C:\Users\jochavez\Desktop\Algo.txt'
       filetype                        = 'DAT'
    *   APPEND                          = ' '
    *   WRITE_FIELD_SEPARATOR           = ' '
    *   HEADER                          = '00'
    *   TRUNC_TRAILING_BLANKS           = ' '
    *   WRITE_LF                        = 'X'
    *   COL_SELECT                      = ' '
    *   COL_SELECT_MASK                 = ' '
    *   DAT_MODE                        = ' '
    *   CONFIRM_OVERWRITE               = ' '
    *   NO_AUTH_CHECK                   = ' '
    *   CODEPAGE                        = ' '
    *   IGNORE_CERR                     = ABAP_TRUE
    *   REPLACEMENT                     = '#'
    *   WRITE_BOM                       = ' '
    *   TRUNC_TRAILING_BLANKS_EOL       = 'X'
    *   WK1_N_FORMAT                    = ' '
    *   WK1_N_SIZE                      = ' '
    *   WK1_T_FORMAT                    = ' '
    *   WK1_T_SIZE                      = ' '
    *   WRITE_LF_AFTER_LAST_LINE        = ABAP_TRUE
    *   SHOW_TRANSFER_STATUS            = ABAP_TRUE
    * IMPORTING
    *   FILELENGTH                      =
        TABLES
          data_tab                        = lt_data.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    In one machine the file is like
    1 UNO
    2 DOS
    3 TRES
    In my machine it is
    1 UNO2 DOS 3 TRES
    As you can see all is in one line.
    Both machines are Windows Vista same version, same model (hehe).
    Any idea of why this differente?
    Best Regards

    My problem comes from report CRMD_UI_ROLE_PREPARE
    This report generates a file that can be uploaded to PFCG. When I try to load the file I receive an error message. I saw the file and the generated file has the same problem.
    So I create this test program to see if it is a program error or it is something wrong with my computer.
    The test gave me the same result. NO carriage returns.
    So I need to solve this issue to run again CRMD_UI_ROLE_PREPARE and get a correct file.
    So I think it is configuration of my user or with my computer.
    Any idea?
    Best Regards

  • Problem with file length in jsp it is working in IE, not workig Firefox

    Hi,
    I'm upload a file from the browser. i'm calculating the length i'm not getting the length of the file.
    The below shown code is working perfectly in IE and not working in Firefox.
    FileUpload.html
    <DOCTYPE>
    <HTML>
    <HEAD>
    <TITLE>Retailmint Jobs - Registration Form</TITLE>
    </HEAD>
    <BODY>
    <form>
    <table>
    <tr><td>Upload Resume :</td>
    <td> <input>
       </td>
    </tr>
    </table>
    <input>
    </p>
    <p>  </p>
    </form>
    </BODY>
    </HTML>
    FileUploadSubmit.jsp
    <page>
    <page>
    <page>
    <html>
    <head><title>Retailmint- Submission</title></head>
    <body>
    <FileInputStream>
    </body>
    </html>
    I find an error in firefox browser is not taking the fully qualified path
    i.e: C:\Documents and Settings\Administrator\Desktop\if.doc
    In firefox it is taking if.doc only.
    please tell me the solution.
    Regards
    venkat

    Sorry for that
    here is the code:
    FileUpload.html
    <HTML>
    <HEAD>
    <TITLE>Retailmint Jobs - Registration Form</TITLE>
    <script language="Javascript" src="FileRead.js">
    </script>
    </HEAD>
    <BODY>
    <form name='subregiform' method="get" action ="FileuploadSubmit.jsp" >
    <table width="566" border="0" cellspacing="0" cellpadding="0">
    <tr><td width="197"align="right">Upload Resume :</td>
    <td width="369"> <input type="file" name="file" value ="" onchange ="javascript:fopen('file');"><br>
       </td>
    </tr>     
    </table><br>
    <input type="submit" name="submit" value="Submit">
    </strong></p>
    <p>  </p>
    </form>
    </BODY>
    </HTML>
    FileUploadSubmit.jsp
    <%@ page import="java.text.*"%>
    <%@ page import="java.sql.*" %>
    <%@ page import="java.util.*" %>
    <%@ page import="java.io.*" %>
    <jsp:useBean id="DBase" class="dbconnection.DBconnection" scope="session" />
    <html>
    <head><title>Retailmint- Submission</title>
    </head>
    <body bgcolor="#e0e0e0">
    <%
    FileInputStream fis = new FileInputStream(request.getParameter("file"));
    len = (int)file.length();
                   System.out.println("length"+len);
    %>
    </body>
    </html>
    And tell me How to find the absolute path of a file in JSP or JAVA?

  • Problem with file length in jsp IE it is working Firefox it is not workig

    Hi,
    I'm upload a file from the browser. i'm calculating the length i'm not getting the length of the file.
    The below shown code is working perfectly in IE and not working in Firefox.
    FileUpload.html
    <DOCTYPE>
    <HTML>
    <HEAD>
    <TITLE>Retailmint Jobs - Registration Form</TITLE>
    </HEAD>
    <BODY>
    <form>
    <table>
    <tr><td>Upload Resume :</td>
    <td> <input>
       </td>
    </tr>
    </table>
    <input>
    </p>
    <p>  </p>
    </form>
    </BODY>
    </HTML>
    FileUploadSubmit.jsp
    <page>
    <page>
    <page>
    <html>
    <head><title>Retailmint- Submission</title></head>
    <body>
    <FileInputStream>
    </body>
    </html>
    I find an error in firefox browser is not taking the fully qualified path
    i.e: C:\Documents and Settings\Administrator\Desktop\if.doc
    In firefox it is taking if.doc only.
    please tell me the solution.
    Regards
    venkat

    Sorry for that
    here is the code:
    FileUpload.html
    <HTML>
    <HEAD>
    <TITLE>Retailmint Jobs - Registration Form</TITLE>
    <script language="Javascript" src="FileRead.js">
    </script>
    </HEAD>
    <BODY>
    <form name='subregiform' method="get" action ="FileuploadSubmit.jsp" >
    <table width="566" border="0" cellspacing="0" cellpadding="0">
    <tr><td width="197"align="right">Upload Resume :</td>
    <td width="369"> <input type="file" name="file" value ="" onchange ="javascript:fopen('file');"><br>
       </td>
    </tr>     
    </table><br>
    <input type="submit" name="submit" value="Submit">
    </strong></p>
    <p>  </p>
    </form>
    </BODY>
    </HTML>
    FileUploadSubmit.jsp
    <%@ page import="java.text.*"%>
    <%@ page import="java.sql.*" %>
    <%@ page import="java.util.*" %>
    <%@ page import="java.io.*" %>
    <jsp:useBean id="DBase" class="dbconnection.DBconnection" scope="session" />
    <html>
    <head><title>Retailmint- Submission</title>
    </head>
    <body bgcolor="#e0e0e0">
    <%
    FileInputStream fis = new FileInputStream(request.getParameter("file"));
    len = (int)file.length();
                   System.out.println("length"+len);
    %>
    </body>
    </html>
    And tell me How to find the absolute path of a file in JSP or JAVA?

  • Partial Submit problem with file download listener

    Hi All,
    I am exporting a table to PDF in my jspx page. For this i have written below code:-
    <af:commandImageLink id="cil6" icon="pdf.png"
    partialSubmit="true"
    >
    <af:fileDownloadActionListener contentType="application/pdf"
    filename="SumData"
    method="#{Sum.exportToPDF}"/>
    </af:commandImageLink>
    It is saving the pdf at a desired location. But as i have made my COMMAND LINK is not executing partial submit behaviour inspite that i have made it partialSubmit="true" .
    After downloading pdf when i click anyother button i get an alert saying...DO YOU WANT TO RESEND THE INFORMATION TO SERVER?
    I don't want this behaviour but i am unable to debug this. Please help.

    Hi,
    afaik.. fileDownloadActionListener does a post to server..even if you do partialSubmit to command component
    After downloading pdf when i click anyother button i get an alert saying...DO YOU WANT TO RESEND THE INFORMATION TO SERVER?I guess you might not have enabled partialSubmit on the other button..
    Try these options, in your web.xml set following in context initialization parameters section
    org.apache.myfaces.trinidad.PPR_OPTIMIZATION                  on
    oracle.adf.view.rich.pprNavigation.OPTIONS                          onRegards.

Maybe you are looking for