File Upload Problem from Linux to Windows and Windows to Linux

Hi,
I am a newbie in the flex environment.
I have faced a problem for file upload from linux to windows and windows to linux
And I have put crossdomain.xml file in root folder, still this problem is appear.
Please help me, if anybody know the answer.
Thanks and Regards,
Senthil KUmar

Hi Pauley,
I thought you are moving from unix to windows. Now I got it.
Make sure that the folder is shared and have necessary permissions. Please see few suggestions here:
Re: NFS or FTP for file on Ip 10.x.y.z
Regards,
---Satish

Similar Messages

  • Linux on SSD and Windows XP on HDD

    This is what I am planning to do: Install Linux on SSD and Windows XP on HDD. It is a constant problem that the SSD fills up too fast. And when downloading from the internet it is not always given as an option to install on other drives than C:, for instance Adobe. So I will install Linux on SSD and maybe use some of the 160Gb hardiskspace as a logic partition for Linux. The rest of the harddisk will be C: and have Windows XP on it. The idea is to have a quickstarting Linux-pc with Firefox for internetuse only, and a regular Windows-pc. 
    But before I do this, is it anyone out there who has tried this? Anyone with warnings, cautions or notes? Recommendations? Or is it just not possible?
    Polaris

    why not install xp on the hdd and use lenovo quickstart for fast surfing using firefox? this will save effort and disk space..
    AMD Phenom II X6 1055T / 2xATI HD5770 CF / 8GB DDR3 / 4x500GB RAID-5 / Win 7 Ultimate x64
    Lenovo S10e Black / 2GB DDR2 / 160GB HDD / 6-cell battery / Win 7 Ultimate x86
    Motorola Xoom

  • I purchased flip player to convert wma files i have from a previous laptop and it played some of my music but not some of the others this error msg came up, i payed 30.00 so it could convert? The operation couldn't be completed. (OSStatus error -19000.)

    I purchased flip player to convert wma files i have from a previous laptop and it played some of my music but not some of the others this error msg came up, i payed 30.00 so it could convert? The operation couldn’t be completed. (OSStatus error -19000.)

    Dear Nay2000,
    I have the same problem, my girl-friend saved a bigger Gigabyte library from her old laptop before she sold it, then at some point she realized that she couldn't play many songs that she had transfered. Now, I paid those 30 quid as well, and it doesn't play 99% of the files, that is very frustrating, is there any way you got it revived?
    Regards.

  • How to upload data from excel to SAP and options to be used

    How to upload data from excel to SAP and options to be used
    thank you,
    Regards,
    Jagrut Bharatkumar shukla

    Hi Jagrut,
        You can use gui_upload.
    chk the sample program mentioned below.
    REPORT ZFTP .
    DATA: BEGIN OF I_FILE OCCURS 0,
    DATA(2000) TYPE C,
    END OF I_FILE.
    DATA: BEGIN OF I_FILE2 OCCURS 0,
    DATA(2000) TYPE C,
    END OF I_FILE2.
    DATA: W_COUNT TYPE I.
    PARAMETERS: P_FILEN TYPE STRING,
    P_FILE2 TYPE STRING,
    P_NUM(4) TYPE N..
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILEN.
    PERFORM F_FILE_GET USING P_FILEN TEXT-G01.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE2.
    PERFORM F_FILE_GET USING P_FILE2 TEXT-G01.
    START-OF-SELECTION.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = P_FILEN
    FILETYPE = 'ASC'
    HAS_FIELD_SEPARATOR = 'X'
    HEADER_LENGTH = 0
    READ_BY_LINE = 'X'
    DAT_MODE = ' '
    CODEPAGE = ' '
    IGNORE_CERR = ABAP_TRUE
    REPLACEMENT = '#'
    CHECK_BOM = ' '
    VIRUS_SCAN_PROFILE =
    NO_AUTH_CHECK = ' '
    IMPORTING
    FILELENGTH =
    HEADER =
    tables
    data_tab = I_FILE
    IF SY-SUBRC <> 0.
    MESSAGE E024(Z1).
    ENDIF.
    LOOP AT I_FILE.
    W_COUNT = W_COUNT + 1.
    IF NOT W_COUNT > P_NUM.
    MOVE I_FILE TO I_FILE2.
    APPEND I_FILE2.
    ENDIF.
    ENDLOOP.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE =
    filename = P_FILE2
    FILETYPE = 'ASC'
    APPEND = ' '
    WRITE_FIELD_SEPARATOR = 'X'
    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 = ' '
    IMPORTING
    FILELENGTH =
    tables
    data_tab = I_FILE2
    FIELDNAMES =
    *& Form F_FILE_GET
    text
    -->P_P_FILEN text
    -->P_TEXT_G01 text
    FORM F_FILE_GET USING L_FILENA L_TEXT.
    CALL FUNCTION 'WS_FILENAME_GET'
    EXPORTING
    DEF_FILENAME = ' '
    DEF_PATH = ' '
    MASK = ',.,*.TXT.'
    MODE = 'O'
    TITLE = L_TEXT
    IMPORTING
    FILENAME = L_FILENA
    rc =
    EXCEPTIONS
    INV_WINSYS = 1
    NO_BATCH = 2
    SELECTION_CANCEL = 3
    SELECTION_ERROR = 4
    OTHERS = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Reward if helpful.
    Regards,
    Harini.S

  • I uploaded pictures from a second camera and my iphoto created a second library, how do i get back to the first library?

    I uploaded pictures from a second camera and my iphoto created a second library, how do i get back to the first library? Can anyone help?

    I have no idea what you did or what happened - but I can assure you that loading from a different camera does not create a new library
    So you need to supply information and someone here will assist you in sorting this out and figuring out what you really did
    What version of iPhoto do you have? What version of the OS? Why do you think that a second library has been created? What do you see when you launch iPhoto with the optipon kep depressed and use the select library option? Where is your iPhoto library normally?
    Anything else you can tell us that might help?
    LN

  • No Print To File option in Photoshop Lightroom (Mac OS and Windows)

    Q - Where do I find the "Print To File" option in Photoshop Lightroom (Mac OS and Windows)?
    A - Photoshop Lightroom does not have the ability to print to file, but some print drivers can access the ability of the operating system to print to file. See
    TechNote for further information.

    If you use print to file then you get a file that is meant to be send to a printer and that file has all kind of formatting code for that specific printer.
    Opening such a file in Firefox or a text editor can only work if you use a text only printer to print the file to, so make sure that such a printer is installed and selected.

  • Pop up window, and window.opener function using workshop?

    hi,
    pop up window, and window.opener function using workshop?
    hi,
    i am having two folders.
    one folder having
    abc.jpf file,
    test1.jsp
    second folder having
    xyz.jpf
    test2.jsp
    i am using weblogic workshop8.1
    i need to call test2.jsp as pop up window
    from test1.jsp.
    i need to pass value from test1.jsp to test2.jsp
    again i need pass value from test2.jsp to test1.jap
    normal jsp programming we can use window opener
    javascipt function to do above.
    same thing how to us in weblogic workshop?
    any can help?
    thanks,
    jp reddy

    Hi,
    assuming action.do is the action method of ....../folder1/abc.jpf you can try out this in the test1.jsp,
    function openNameHistory(url) {
    var args = "<%= request.getContextPath() %>/folder1/"+url;
         window.showModalDialog(args,'','dialogHeight:320px;dialogWidth:600px;scroll:yes;status:no');
    <netui:anchor href="javascript:openNameHistory('action.do')">Name History</netui:anchor>
    u need not specify the abc.jpf in the url because , workshop allows only one jpf per folder
    hope this helps...
    regards
    shakan

  • File Upload problem: JSF, IBM WPS and Portlet - Please HELP Vey Very Urgent

    I want to upload a file from the front end using JSF and Portlets deployed on IBM WebSphere Portal.
    I have used Apache's commons file upload functionality as the file upload provided in JSF doesnot work with portlets and the action event is not invoked If I keep enctype="multipart/form-data". So I included 3 forms in my Faces JSP file.
    1) h:form = For displyign error message on screen
    2) html:form = Include the enctype="multipart/form-data" and the input type file for uploading. And a submit button
    3) h:form: Here I have a command link which is remotely excuted on click of sumit button in my html form. This is to invoke the action event in the pagecode to get the bean value from the context.
    Now in the my doView method in the portlet, isMultipartContent(httpservletrequest) always returns null as the content type is text/html and not multipart. Onclick of the submit button in the the html form I am calling a javascript function which sets the __LINK_TARGET__ to the command link in the 3rd h:form which will call the page code.
    The problem here is action is invoked only when I return false from the above javascript else it will trigger for the first time and from second time onwards it will not invoke the action event in the pagecode method. Whent the javascript function returns false, the content type is always text/html. However if I return "true" from the javascript the content type is multipart/form-data, but the action is not triggered for the second time. So basically when the javascript functions returns true, for the first click everything works perfectly. When it returns false, the content type is text/html, but the action is invoked in the page code every time.
    Returning always true would solve my problem with the content type, but the action with the command link will not get invoked always as its some type of problem with h:commanLink :(.
    I guess I gave too much info. Heres my code stepby step.
    Can somebody please tell me , how I should also invoke the action in the page code and get the content type as "multipart/form-data" at the same time.
    1:
    ======================= Faces JSP File: BPSMacro.jsp ====================
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <meta name="GENERATOR" content="IBM Software Development Platform">
    <meta http-equiv="Content-Style-Type" content="text/css">
    <%@taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
    <%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
    <%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@taglib uri="http://www.ibm.com/jsf/html_extended" prefix="hx"%>
    <%@taglib uri="/WEB-INF/tld/j4j.tld" prefix="j4j"%>
    <%@taglib uri="/WEB-INF/tld/core.tld" prefix="core"%>
    <%@page language="java" contentType="text/html; charset=ISO-8859-1"
         pageEncoding="ISO-8859-1" session="false"%>
    <portlet:defineObjects />
    <link rel="stylesheet" type="text/css"
         href='<%= renderResponse.encodeURL(renderRequest.getContextPath() + "/theme/stylesheet.css") %>'
         title="Style">
    <script type="text/javascript">
    function formSubmit() {
         var formName2 = document.getElementById("proxy_form_main_").title;
         var formName1 = document.getElementById("BPSMacroFormId").title;
         document.getElementById("__LINK_TARGET__").value = document.getElementById("proxy_HD_COMMAND_").title;
         document.getElementById(formName2).submit();
         return false;
    </script>
    <f:view>
         <hx:scriptCollector id="bpsMacroScriptCollector">
              <f:loadBundle var="bps" basename="bordereauprocessingsystem" />
              <table bgcolor="#FFF9C3">
                   <tr>
                        <td><h:form id="BPSMacroFormMain" styleClass="form">
                             <table class="tablemiddle" cellspacing="0" cellpadding="0">
                                  <tr>
                                       <td><h:messages layout="table" styleClass="errormessage"
                                                 id="ValidationErrorMsg" /> </td>
                                  </tr>
                             </table>
                             <j4j:idProxy id="proxy_form_main_0_" />
                        </h:form></td>
                   </tr>
                   <tr>
                        <td>
                        <form id="BPSMacroFormId" enctype="multipart/form-data">
                        <table bgcolor="#FFF9C3">
                             <tr>
                                  <td height="36" width="324">Worksheet <input type="file"
                                       name="upfile" /></td>
                             </tr>
                                  <tr>
                                       <td align="center" width="324"><input TYPE="submit"
                                       onclick="return formSubmit();" value="Upload">
                                  </td>
                             </tr>
                        </table>
                        </form>
                        </td>
                   </tr>
                   <tr>
                        <td>
                        <h:form id="BPSMacroFormMain2" styleClass="form">
                             <table cellspacing="2" cellpadding="2" class="tablemiddle">
                                  <tbody>
                                       <tr>
                                            <td colspan="2" align="center"><h:commandLink
                                                 styleClass="commandLink" id="lnkuserdelete"
                                                 action="#{pc_BPSMacro.doIdUpload1Action}">
                                                 <hx:graphicImageEx
                                                      styleClass="graphicImageEx" id="imgBtnCreateUser"
                                                      value="/theme/images/btnUpload.gif" style="border:0;cursor:pointer"></hx:graphicImageEx>
                                                 <j4j:idProxy id="proxy_HD_COMMAND_" />
                                            </h:commandLink></td>
                                            <h:inputHidden id="dtSize"
                                                 value="#{pc_BPSMacro.fileDetailsList.clicked}">
                                                 <j4j:idProxy id="proxy_clicked_" />
                                            </h:inputHidden>
                                       </tr>
                                  </tbody>
                             </table>
                             <j4j:idProxy id="proxy_form_main_" />
                        </h:form>
                   </td>
                   </tr>
              </table>
         </hx:scriptCollector>
    </f:view>
    ================== END: FACES JSP FILE: BPSMacro.jsp ========================
    2:
    =================== Action event in the Page Code: BPSMacro.java ============
    public String doIdUpload1Action() {
              System.out.println("PageCode");
              FacesContext context = FacesContext.getCurrentInstance();
              BPSMacroDetailsDataBean fileDetails = (BPSMacroDetailsDataBean)context.getApplication().createValueBinding("#{fileDetails}").getValue(context);
              BPSMacroListDataBean fileDetailsList = (BPSMacroListDataBean)context.getApplication().createValueBinding("#{fileDetailsList}").getValue(context);
              PortletSession sess = (PortletSession)context.getExternalContext().getSession(false);
              sess.setAttribute("BPS_MACRO_CONTEXT", context, PortletSession.APPLICATION_SCOPE);
              sess.setAttribute("BPS_MACRO_FILE_DETAILS", fileDetails, PortletSession.APPLICATION_SCOPE);
              sess.setAttribute("BPS_MACRO_FILE_LIST", fileDetailsList, PortletSession.APPLICATION_SCOPE);
              HttpServletRequest request = (HttpServletRequest)context.getExternalContext().getRequest();
              boolean isMultipart = ServletFileUpload.isMultipartContent(request);
              request.getContentType();
              return "gotoBPSMacro";
    ============== END Of Page Code Action event ==============================
    3:
    ============== doView() Portlet method ================================
    public void doView(RenderRequest arg0, RenderResponse arg1)
         throws PortletException, IOException {
              String METHOD_NAME = "doView(RenderRequest arg0, RenderResponse arg1)";
              Logger.debug(this.getClass(), METHOD_NAME, "Entering BPSMacroPortlet");
              FacesContext context = FacesContext.getCurrentInstance();      
              PortletSession sess1 = arg0.getPortletSession(true);
              BPSMacroDetailsDataBean fileDetails = new BPSMacroDetailsDataBean();
              BPSMacroListDataBean fileDetailsList = new BPSMacroListDataBean();
              context = (FacesContext)sess1.getAttribute("BPS_MACRO_CONTEXT", PortletSession.APPLICATION_SCOPE);
              if(context != null){
                   fileDetails = (BPSMacroDetailsDataBean)sess1.getAttribute("BPS_MACRO_FILE_DETAILS", PortletSession.APPLICATION_SCOPE);
                   fileDetailsList = (BPSMacroListDataBean)sess1.getAttribute("BPS_MACRO_FILE_LIST", PortletSession.APPLICATION_SCOPE);
              sess1.removeAttribute("BPS_MACRO_CONTEXT", PortletSession.APPLICATION_SCOPE);
              sess1.removeAttribute("BPS_MACRO_FILE_DETAILS", PortletSession.APPLICATION_SCOPE);
              sess1.removeAttribute("BPS_MACRO_FILE_LIST", PortletSession.APPLICATION_SCOPE);
              HttpServletRequest servletRequest = (HttpServletRequest)arg0;
              PortletRequest pReq = (PortletRequest)arg0;
              HttpServletResponse servletResponse= (HttpServletResponse)arg1;
              System.out.println("\n\n Content Type" + servletRequest.getContentType());
              try{
                   if(context != null){
              boolean isFileMultipart = ServletFileUpload.isMultipartContent(servletRequest);
              System.out.println("\nFILE TO BE UPLOADED IS MULTIPART ? " + isFileMultipart);
              if(isFileMultipart){
                   FileItemFactory factory = new DiskFileItemFactory();
                   ServletFileUpload upload = new ServletFileUpload(factory);
                   List items = upload.parseRequest(servletRequest);
                   Iterator iterator = items.iterator();
                   while (iterator.hasNext()) {
                        FileItem item = (FileItem) iterator.next();
                        InputStream iStream = item.getInputStream();
                        ByteArrayOutputStream ByteArrayOS = new ByteArrayOutputStream();
                        int sizeofFile =(int) item.getSize();
                        byte buffer[] = new byte[sizeofFile];
                        int bytesRead = 0;
                        while( (bytesRead = iStream.read(buffer, 0, sizeofFile)) != -1 )
                             ByteArrayOS.write( buffer, 0, bytesRead );
                        String data = new String( ByteArrayOS.toByteArray() );
                        int k = 0;
                        //Check if the file is Refund or Premium
                        int dynamicArraySize = 0;// = st2.countTokens() * 9;
                        dynamicArraySize = st2.countTokens() * 9;
                        if (!item.isFormField() ){
                             File cfile=new File(item.getName());
                             String fileName = "";
                             String separator = "\\";
                             int pos = item.getName().lastIndexOf(separator);
                             int pos2 = item.getName().lastIndexOf(".");
                             if(pos2>-1){
                                  fileName =item.getName().substring(pos+1, pos2);
                             }else{
                                  fileName =item.getName().substring(pos+1);
                             File fileToBeUploaded=new File("C:\\Sal\\BPS MACRO\\FileTransfer\\Desti", fileName);
                             item.write(fileToBeUploaded);
                             validate.displaySuccessMessage(context);
              }catch(Exception e){System.out.println(e);
              Logger.debug(this.getClass(), METHOD_NAME, "Leaving BPSMacroPortlet");
              super.doView(arg0, arg1);
    ==== END: doView method in the portle class. ================================
    Thanks.

    one more question. Is there a way where I can submit two forms ?
    Thats is submit 2nd form only when the first form is submitted.
    I tried this it works.
    function formSubmit(){
    document.form1.submit();
    alert();
    document.form2.submit();
    But If I dont put an alert(basically it disables the parent page) in between, only the second form is submitted.
    If I put a delay of say 3 seconds in between then it will throw a SOCKET CLOSED error in the code triggered due to first form submit.
    Thus disabling the paresnt page for a few seconds is reolving my problem.
    Any ideas ?
    Well Basically when the Alert pop's up the parent page "STALLS" and thus the form2 does not submit till I click on OK, Is there a way I can stall the browser/Parent JSP page using JAVA SCRIPT ??
    Edited by: hector on Oct 9, 2007 11:09 AM
    Edited by: hector on Oct 9, 2007 2:12 PM

  • FILE UPLOAD PROBLEM SHOWING THE CONTENTS IN THE SAME BROWSER WINDOW

    Hi,
    This is amit Joshi
    I have uploaded content using input tag of type file and posted to jsp as multipart/form-data type
    in that jsp i am using following code to display the content in browser but only first content is displayed How can i modify it to show all content in the file ..
    <html>
    <head>
    <title>File Upload Display</title>
    </head>
    <body>
    <%
    //ServletOutputStream sout=response.getOutputStream();
    StringBuilder strBuilder = new StringBuilder();
    int count=0;
    String f;
    f=request.getParameter("filedb");
    DBManager dbm = new DBManager();
    //dbm.createTable("mms3");
    //log.info("In JSP : "+ f);
    //dbm.insert_data(f,"mms3");
    %>
    <%
    if (ServletFileUpload.isMultipartContent(request)){
    ServletFileUpload servletFileUpload = new ServletFileUpload(new DiskFileItemFactory());
    List fileItemsList = servletFileUpload.parseRequest(request);
    strBuilder.append("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>").append('\r').append('\n').append("<xpage version=\"1.0\">").append('\r').append('\n');
    String optionalFileName = "";
    FileItem fileItem = null;
    Iterator it = fileItemsList.iterator();
    ServletOutputStream outputStream=null;
    while (it.hasNext()){
    FileItem fileItemTemp = (FileItem)it.next();
    if (fileItemTemp.isFormField()){
    %>
    <b>Name-value Pair Info:</b>
    Field name: <%= fileItemTemp.getFieldName() %>
    Field value: <%= fileItemTemp.getString() %>
    <%
    if (fileItemTemp.getFieldName().equals("filename"))
    optionalFileName = fileItemTemp.getString();
    else
    fileItem = fileItemTemp;
    if (fileItem!=null){
    String fileName = fileItem.getName();
    %>
    <b>Uploaded File Info:</b>
    Content type: <%= fileItem.getContentType() %>
    Field name: <%= fileItem.getFieldName() %>
    File name: <%= fileName %>
    <%
    if(fileItem.getContentType().equals("image/jpeg")) { %>
    File : <p><%
         //response.setContentType("image/gif");
         byte[] bArray=fileItem.get();
         response.setContentType("image/jpeg");
         outputStream=null;
         outputStream= response.getOutputStream();
         outputStream.write(bArray);
         outputStream.flush();
         outputStream.close();
    else if(fileItem.getContentType().equals("text/plain"))
         %> File : <%= fileItem.getString() %>
    <%
    byte[] bArray=fileItem.get();
    response.setContentType("text/plain");
         outputStream = response.getOutputStream();
         out.println();
         outputStream.write(bArray);
         outputStream.flush();
         outputStream.close();
    %> </p> <%
    %>
    </body>
    </html>
    Edited by: Amit_Joshi on Nov 13, 2007 10:58 PM

    Well Well Well..
    That would not work...
    What you have to do is save the uploaded file content on to a location and then pass the fileName as a request parameter to a deidicated which displays the contents of that file.
    Just as an example
    <html>
    <head>
    <title>File Upload Display</title>
    </head>
    <body>
    <%
    //ServletOutputStream sout=response.getOutputStream();
    StringBuilder strBuilder = new StringBuilder();
    int count=0;
    String f;
    f=request.getParameter("filedb");
    DBManager dbm = new DBManager();
    //dbm.createTable("mms3");
    //log.info("In JSP : "+ f);
    //dbm.insert_data(f,"mms3");
    %>
    <%
    if (ServletFileUpload.isMultipartContent(request)){
    ServletFileUpload servletFileUpload = new ServletFileUpload(new DiskFileItemFactory());
    List fileItemsList = servletFileUpload.parseRequest(request);
    strBuilder.append("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>").append('\r').append('\n').append("<xpage version=\"1.0\">").append('\r').append('\n');
    String optionalFileName = "";
    FileItem fileItem = null;
    Iterator it = fileItemsList.iterator();
    ServletOutputStream outputStream=null;
    while (it.hasNext()){
       FileItem fileItemTemp = (FileItem)it.next();
    %>
    Name-value Pair Info:
    Field name: <%= fileItemTemp.getFieldName() %><br/>
    Field value: <%= fileItemTemp.getString() %><br/>
    <%
    if (fileItemTemp.getFieldName().equals("filename"))
        optionalFileName = fileItemTemp.getString();
    if(!fileTempItem.isFormFiled()){
       String fileName = fileItem.getName();
       fileItem.write(optionalFileName);
    %>
    Uploaded File Info:
    Content type: <%= fileItem.getContentType() %><br/>
    Field name: <%= fileItem.getFieldName() %><br/>
    File name: <%= fileName %><br/>
    <%
    if(fileItem.getContentType().equals("image/jpeg") || fileItem.getContentType().equals("image/pjeg")) {
    %>
      <img src="FileServlet?fileName=<%=optionalFileName%>"   
    <%
    %>
    </body>
    </html>a sample code snippet for FileServlet.
    String fileName =  request.getParameter(fileName);
      File file = new File(fileName);
       if(!file.exists())
         return;
      // If JSP
      String mimeType = application.getMimeType("fileName");
           If you are using servlet
           String mimeType = this.getServletContext().getMimeType(fileName);
         response.setContentType(mimeType);  
         response.setHeader("Content-Disposition","inline;filename=\\"+fileName+"\\");
      BufferedOutputStream out1 = null;
      InputStream in = null;
      if(mimeType == null)
         mimeType = "application/octet-stream";
      try{
         in = new FileInputStream(f);
         response.setContentLength(in.available());
         BufferedOutputStream out1 = new BufferedOutputStream(response.getOutputStream(),1024);
         int size = 0;
         byte[] b = new byte[1024];
         while ((size = in.read(b, 0, 1024)) > 0)
            out1.write(b, 0, size);
      }catch(Exception exp){
      }finally{
          if(out1 != null){
             try{
                out1.flush();               
                out1.close();
             }catch(Exception e){}
          if(in != null){
            try{in.close();}catch(Exception e){}
      } Hope that might answer your question :)
    However,this is not the recommended way of doing this make use of MVC pattern.Would be a better approach.
    you might think of googling on this and can findout what is the best practise followed for problems of this sort
    REGARDS,
    RaHuL

  • Problems with Nvidia GeForce 210 and windows 8.1

    Hi all, I have Windows 8.1 Pro update 1 64bit installed, two weeks ago I started giving problems graphics card NVidia (even has me
    given several blue screen).
    I tried to update the drivers for the card but I got the same problem. It was working properly with generic
    drivers, and if I went to Computer Administrator me a yellow triangle appeared
    on my graphics card and the properties told me the following:
    Windows has stopped this device because it has reported problems.
    (Code 43 )
    My machine is as follows:
    Mainboard : Asus P5K SE
    Chipset: Intel P31/P35
    Processor : Intel Core 2 Quad Q6600 @ 2400MHz
    Physical Memory : 3072MB (3 x 1024 DDR2- SDRAM)
    Video Card : NVIDIA GeForce 8500 GT
    Hard Disk : Seagate ST3320620AS ATA Device (320GB )
    Monitor Type: LG Electronics L1919S
    I just formatted
     the computer from scratch, and
    I still had the same problem with the graphics card,
    so I imagined it would be a hardware problem
    and bought NVIDIA GeForce 210.
    In the end I
    upgraded to Windows 8.1 update 1 with
    the latest drivers for the GeForce 210,
    and after 6 days running everything correctly, a few days ago
    returned to give me problems,
    the screen sometimes freezes and will not
    let me do anything and after a while
    giving me a blue screen and reboots
    me, I suspect that the graphics drivers
    are giving me problems, and I had to
    disable the graphics card and work with
    generic drivers from Microsoft, and even then I
    was restarted once.
    I installed Driver Booster and all the drivers are updated.
    Could
     anyone analyze
    dump files dmp ? Download here 
    I got another dmp:
     C:\Windows\MEMORY.DMP  but it is too heavy.
    Thanks

    yes, I check the dump files
    this cause by graphic card, on which graphic card you reformat your PC and update
    .NET framework maybe cause this driver corrupted
    my suggestion is try using internal graphic card, just for testing
    Just in case you don't believe me, please check this dump file
    * Bugcheck Analysis *
    Use !analyze -v to get detailed debugging information.
    BugCheck 116, {ffffe000d84c4010, fffff800b540be2c, ffffffffc000009a, 4}
    Unable to load image \SystemRoot\system32\DRIVERS\nvlddmkm.sys, Win32 error 0n2
    *** WARNING: Unable to verify timestamp for nvlddmkm.sys
    *** ERROR: Module load completed but symbols could not be loaded for nvlddmkm.sys
    Probably caused by : nvlddmkm.sys ( nvlddmkm+9bbe2c )
    Followup: MachineOwner
    1: kd> !analyze -v
    * Bugcheck Analysis *
    VIDEO_TDR_FAILURE (116)
    Attempt to reset the display driver and recover from timeout failed.
    Arguments:
    Arg1: ffffe000d84c4010, Optional pointer to internal TDR recovery context (TDR_RECOVERY_CONTEXT).
    Arg2: fffff800b540be2c, The pointer into responsible device driver module (e.g. owner tag).
    Arg3: ffffffffc000009a, Optional error code (NTSTATUS) of the last failed operation.
    Arg4: 0000000000000004, Optional internal context dependent data.
    Debugging Details:
    FAULTING_IP:
    nvlddmkm+9bbe2c
    fffff800`b540be2c 803db68aeeff00 cmp byte ptr [nvlddmkm+0x8a48e9 (fffff800`b52f48e9)],0
    DEFAULT_BUCKET_ID: GRAPHICS_DRIVER_TDR_FAULT
    CUSTOMER_CRASH_COUNT: 1
    BUGCHECK_STR: 0x116
    PROCESS_NAME: System
    CURRENT_IRQL: 0
    ANALYSIS_VERSION: 6.3.9600.16384 (debuggers(dbg).130821-1623) amd64fre
    STACK_TEXT:
    ffffd000`8adadbb8 fffff800`b457bfac : 00000000`00000116 ffffe000`d84c4010 fffff800`b540be2c ffffffff`c000009a : nt!KeBugCheckEx
    ffffd000`8adadbc0 fffff800`b457008d : fffff800`b540be2c ffffe000`d760b7f0 ffffe000`d84c4010 00000000`00000001 : dxgkrnl!TdrBugcheckOnTimeout+0xec
    ffffd000`8adadc00 fffff800`b4570582 : ffffe000`d760f540 ffffd000`8adadc60 00000000`00000002 00000000`00000001 : dxgkrnl!ADAPTER_RENDER::Reset+0x1f5
    ffffd000`8adadc30 fffff800`b457b919 : ffffd000`8ada01b0 00000000`00000000 ffffe000`d5ff91a0 ffffe000`d742b000 : dxgkrnl!DXGADAPTER::Reset+0x416
    ffffd000`8adadca0 fffff800`b446cfde : fffff800`b4453c90 ffffe000`d742b000 fffff802`84c1c000 00000000`00000000 : dxgkrnl!TdrResetFromTimeout+0x15
    ffffd000`8adadcd0 fffff800`b4453d1d : ffffe000`d742b000 00000000`00000080 ffffe000`d50b4500 ffffe000`00000000 : dxgmms1!VidSchiRecoverFromTDR+0x1a
    ffffd000`8adadd00 fffff802`84ceb794 : fffff802`84f69a00 ffffe000`d50b4500 ffffd000`8adaddd0 fffff802`84d7337d : dxgmms1!VidSchiWorkerThread+0x8d
    ffffd000`8adadd40 fffff802`84d765c6 : fffff802`84f02180 ffffe000`d50b4500 fffff802`84f69a00 00000000`00000000 : nt!PspSystemThreadStartup+0x58
    ffffd000`8adadda0 00000000`00000000 : ffffd000`8adae000 ffffd000`8ada8000 00000000`00000000 00000000`00000000 : nt!KiStartSystemThread+0x16
    STACK_COMMAND: .bugcheck ; kb
    FOLLOWUP_IP:
    nvlddmkm+9bbe2c
    fffff800`b540be2c 803db68aeeff00 cmp byte ptr [nvlddmkm+0x8a48e9 (fffff800`b52f48e9)],0
    SYMBOL_NAME: nvlddmkm+9bbe2c
    FOLLOWUP_NAME: MachineOwner
    MODULE_NAME: nvlddmkm
    IMAGE_NAME: nvlddmkm.sys
    DEBUG_FLR_IMAGE_TIMESTAMP: 5315b408
    FAILURE_BUCKET_ID: 0x116_IMAGE_nvlddmkm.sys
    BUCKET_ID: 0x116_IMAGE_nvlddmkm.sys
    ANALYSIS_SOURCE: KM
    FAILURE_ID_HASH_STRING: km:0x116_image_nvlddmkm.sys
    FAILURE_ID_HASH: {c89bfe8c-ed39-f658-ef27-f2898997fdbd}
    Followup: MachineOwner
    1: kd> lmvm nvlddmkm
    start end module name
    fffff800`b4a50000 fffff800`b56a8000 nvlddmkm T (no symbols)
    Loaded symbol image file: nvlddmkm.sys
    Image path: \SystemRoot\system32\DRIVERS\nvlddmkm.sys
    Image name: nvlddmkm.sys
    Timestamp: Tue Mar 04 19:07:52 2014 (5315B408)
    CheckSum: 00C20523
    ImageSize: 00C58000
    Translations: 0000.04b0 0000.04e4 0409.04b0 0409.04e4

  • File Upload Problem in JSF

    Hi all,
    I have a problem in file upload. I have a file upload third party component which uploads the file with the filter action depending on the url. My requirement is to trace the uploaded filename for addressing it with the database record. So I need the filename in my backing bean to store it in the database. Ho can i get the filename from view page to backing bean. Any Ideas and help please.
    Many thanx,
    vijaycanaan

    Mr BalusC,
    Yes Iam talking about a custom made upload component. The fileupload tutorials u send are good but my requirement is not meeting them. Among my requirements one is mutilple file uploads in the single view page. This is possible at present with my custom upload componet. Only if the problem gets solved. Any way once again please think on my problem and give your solution on it.
    Here is my problem:
    The problem is I have to access the components from view page which this kind of requirement possible in jsp by request parsing which results the key value pairs of the form components. This same thing/way I should get in backing bean from JSF view page.
    The solution I want may like as follows.
    Note this code is incorrect and wrong but for to understand my requirement.
    someobject.getComponentIdValue("clientID"); which returns a string value as d:\images\Tutle.jpg
    The clientID is upload file component' Id . In the request it may be the key associated with value as file complete path. By this kind of way my upload filter is able to get the orignal file. Ok i need this in my  backing bean to get the orignal filename to insert into the database. Please for this give the solution or reply.many thanx,
    vijaycanaan.

  • File Upload Problem in Mozila

    Hi;
    My code is workin in IE but problem in Mozila Fireforx:
    <%@page import="org.apache.commons.fileupload.DiskFileUpload"%>
    <%@page import="org.apache.commons.fileupload.FileItem"%>
    <%@page import="java.util.List"%>
    <%@page import="java.util.Iterator"%>
    <%@page import="java.io.File"%>
    <%@page import="java.io.FileNotFoundException"%>
    <%@page import="java.io.BufferedReader"%>
    <%@page import="java.io.FileReader"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Upload Process</title>
    </head>
    <body>
    <%
    String record=null;
    try{
    System.out.println("Content_type:"+request.getContentType());
    DiskFileUpload fu = new DiskFileUpload();
    fu.setSizeMax(100000000);
    List fileItem = fu.parseRequest(request);
    Iterator iter = fileItem.iterator();
    FileItem fi = (FileItem)iter.next();
    if(!fi.isFormField()){
    File file = new File(fi.getName());
    out.println("NAME:"+fi.getName());
    File nFile = new File(application.getRealPath("/"),file.getName());
    // BufferedReader br =new BufferedReader(new FileReader(nFile));
    out.println("Name:"+nFile.getName());
    out.println("ABPath:"+nFile.getAbsolutePath());
    }else{
    System.out.println("Field ="+fi.getFieldName());
    } catch(Exception ex){
    ex.printStackTrace();
    %>
    </body>
    </html>
    Problem is for AbsolutePath it looking file under project directory.
    :D:\Dir name\build\web\.....
    PLEASE HELP
    Thanks in Advance
    Mamun

    Mr BalusC,
    Yes Iam talking about a custom made upload component. The fileupload tutorials u send are good but my requirement is not meeting them. Among my requirements one is mutilple file uploads in the single view page. This is possible at present with my custom upload componet. Only if the problem gets solved. Any way once again please think on my problem and give your solution on it.
    Here is my problem:
    The problem is I have to access the components from view page which this kind of requirement possible in jsp by request parsing which results the key value pairs of the form components. This same thing/way I should get in backing bean from JSF view page.
    The solution I want may like as follows.
    Note this code is incorrect and wrong but for to understand my requirement.
    someobject.getComponentIdValue("clientID"); which returns a string value as d:\images\Tutle.jpg
    The clientID is upload file component' Id . In the request it may be the key associated with value as file complete path. By this kind of way my upload filter is able to get the orignal file. Ok i need this in my  backing bean to get the orignal filename to insert into the database. Please for this give the solution or reply.many thanx,
    vijaycanaan.

  • File upload problem. Can't write to server

    Hi guys,
    I am currently trying to upload some images to the server I am using but I can't succeed.
    I am using a form consisting of 3 text fields 1 textarea and an upload form.
    The whole thing is working fine on my localhost . All the items are being inserted to the database and the files saved to the path.
    But when I try to upload to the commercial server even though the text field are being read and inserted to database the files just can't!!
    my tree structure is
    /home/domain/www-domain/webapps
    and that's what I am getting when using
    getServletContext().getRealPaththe full line for getting the real path is
    FileWriter fw2 = new FileWriter(getServletContext().getRealPath("//upload"+fileName+".jsp")); I am using tomcat 4.0 and all the other servlets are working just fine
    as this one apart from the FileWriting thing?
    am I doing something wrong with the getServletContext thing?
    And if so, why is it working just fine on my pc?
    I am only suspecting that I am not getting the path correctly
    I want to store the images under
    webapps/upload/images
    but it doesn't work even when I am trying to store under webapps (root directory)
    Is there any way that I am not getting permission to write to the server??
    Any help is highly appreciated!!
    cheers

    the thing is that I am not getting any exception back to my browser> some of the values are inserted into the database (the ones that are not referring to any uploded items). i guess i have to do a print.stacktrace but I am not sure at which point...
    ok I am posting the full code to give you an idea. Your interest is much appreciated , thank you
    import java.sql.*;
    import java.text.ParsePosition;
    import java.text.SimpleDateFormat;
    import java.util.*;
    import java.util.Date;
    import gr.cretasport.util.*;
    import org.apache.commons.fileupload.*;
    import java.awt.Image;
    import java.io.*;
    import javax.servlet.RequestDispatcher;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletContext;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest ;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    * @author myron.veligradis
    * 17/09/2005
    * TODO To change the template for this generated type comment go to
    * Window - Preferences - Java - Code Style - Code Templates
    public class InsertArticle extends HttpServlet{
      * global variables
    String fieldName;
    Image imageIn;
    Resize rsImg = new Resize();
    Mirror mrImg = new Mirror();
    //ImageProcess ImPr = new ImageProcess();
    Date curDate;
    String datecur;
    String inputtext;
    BufferedWriter bw;
    String aRString ;
    String photoPath;
    File savedFile;
    String txtPath;
    String txtPathFullText;
    String author;
    String eidos;
    String kathgoriaID;
    String title;
    String rating;
    String kathgoria;
    String keimeno;
    String keimenoRest;
    String fullKeimeno;
    String hmeromhniaD;
    final String jspPrefix="<%@ page contentType=\"text/html; charset=iso-8859-7\" language=\"java\"  errorPage=\"\" %>";
    Connection con=null;
    Statement statement = null;
    ResultSet rs, rs1 = null;
    int kathgoriaIDInt;
    int ratingInt;
    public void init(ServletConfig conf) throws ServletException  {
      super.init(conf);
    public void doPost (HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException, UnsupportedEncodingException {
    //  try {
    //   req.setCharacterEncoding("iso-8859-7");
    //   catch (UnsupportedEncodingException uee)
      boolean isMultipart = FileUpload.isMultipartContent(req);
      HttpSession session = req.getSession();
      ServletContext sc = getServletContext();
       * GET THE FILE NAME
      curDate=new Date();
      datecur = curDate.toString ();
        String fileName = datecur.replaceAll("\\W","_");
        String strDate = curDate.toString();
        SimpleDateFormat formatter= new SimpleDateFormat ("EEE MMM dd hh:mm:ss zzz yyyy");
      Date date = formatter.parse(strDate,new ParsePosition(0));
      hmeromhniaD = new SimpleDateFormat("yyyy-MM-dd").format(date);
       *  GET THE PARAMETERS
       *  FILE UPLOAD *******************************************************
      System.out.println(isMultipart);
      DiskFileUpload upload = new DiskFileUpload();
      try {
       req.setCharacterEncoding("iso-8859-7");
       List items = upload.parseRequest(req);
       Iterator itr = items.iterator();
       while(itr.hasNext()) {
        FileItem item = (FileItem) itr.next();
    //    String articleTitle = new String(req.getParameter("articleTitle").getBytes("iso-8859-1"),"iso-8859-7");
       // check if the current item is a form field or an uploaded file
         if(item.isFormField()) {
         // get the name of the field
         // if it is name, we can set it in request to thank the user
         if (item.getFieldName().equals("author")) {
                author = new String(item.getString().getBytes("iso-8859-1"),"iso-8859-7");
         if (item.getFieldName().equals("eidos")) {
                eidos = new String( item.getString().getBytes("iso-8859-1"),"iso-8859-7");
         if (item.getFieldName().equals("keimeno")) {
                keimeno =item.getString();
                FileWriter fw1 = new FileWriter(getServletContext().getRealPath("webapps//upload"+"pro_"+fileName +".jsp"));
           fw1.write(jspPrefix+"<html><body>"+keimeno+"</body></html>");
           fw1.close();
           txtPath = ("upload/text/"+"pro_"+fileName+".jsp");
         if (item.getFieldName().equals("keimenorest")) {
                keimenoRest =item.getString();
                FileWriter fw2 = new FileWriter(getServletContext().getRealPath("//upload"+fileName+".jsp"));
           fw2.write(jspPrefix+"<html><body>"+keimeno+" "+keimenoRest+"</body></html>");
           fw2.close();
           txtPathFullText = ("upload/text/fulltext/"+fileName+".jsp");
         if (item.getFieldName().equals("title")) {
               // title = new String(item.getString().getBytes("iso-8859-1"),"iso-8859-7");
                System.out.println ("titlos "+title);
                title=getServletContext().getRealPath("webapps//upload");
         if (item.getFieldName().equals("rating")) {
                rating = item.getString();
         if (item.getFieldName().equals("kathgoriaID")) {
                kathgoriaID = item.getString();
       else {
        // the item must be an uploaded file save it to disk. Note that there
        // seems to be a bug in item.getName() as it returns the full path on
        // the client's machine for the uploaded file name, instead of the file
        // name only. To overcome that, I have used a workaround using
        // fullFile.getName().
        File fullFile  = new File(item.getName()); 
        //check if input file is actually an image
        if ( item.getName().toLowerCase().endsWith(".jpg") ||
        item.getName().toLowerCase().endsWith(".gif") ||
        item.getName().toLowerCase().endsWith(".bmp"))
         File temp = new File(getServletContext().getRealPath("webapps//upload")," temp.jpg");
         item.write(temp);
         //to class Resize pernei 2 inputs, to file kai to path string
         rsImg.resizeImage(temp,getServletContext().getRealPath("webapps//upload"+fileName+".jpg"));
         //to class Mirror pernei kai ayto 2 inputs, to file poy exei dhmiourgithei apo panw
         //pou to kanei overwrite epeidh pernoun to idio onoma me to time stamp
         Mirror.mirrorImage(new File(getServletContext().getRealPath("webapps"+fileName+".jpg")),
           getServletContext().getRealPath("webapps//upload"+fileName+".jpg"));
         System.out.println("upload/images/"+fileName+".jpg");
      kathgoriaIDInt= new Integer(kathgoriaID).intValue();
      ratingInt   = new Integer(rating).intValue();
       * HTML UPLOAD
      catch (Exception fe) {
      //get the string names to insert to database
      photoPath="upload/images/"+fileName+".jpg";
       * INSERT THE DATA INTO THE DATABASE
      InsertToDatabase();
      String url="/insertarticle.jsp";
      RequestDispatcher rd = sc.getRequestDispatcher(url);
      rd.forward(req,res);
    //res.sendRedirect( res.encodeRedirectURL( "indextest.jsp "));
    public void InsertToDatabase() {
      try {
       con=null;
       statement = con.createStatement();
       String insertprefix = "insert into articles(eidos,photopath,textpath,textpathfull,title,author,dateen,rating, kathgoriaID) VALUES"
         + "('" + eidos.trim() +"','" + photoPath.trim()  + "','"   +
         txtPath + "','" + txtPathFullText + "','" +title + "','"+ author + "','"+ hmeromhniaD + "','"+ ratingInt+ "','"
         +kathgoriaIDInt + "')";
       statement.execute(insertprefix);
       statement.close();
       con.close();
       catch (Exception e)
    }

  • Upload problem from EP  iview.

    hi all,
    i have created a trasaction iview for uploading infotype 0,1 and 7 . If i run it from r/3 , data is uploaded to all the infotypes .
    But if i run the same from Portal , it uploads data only to 0000 -infotype and 1 & 7 is not updated .
    Thanks ,
    J
    (Prob Solved : I have missed some authorization params in my user master record .)
    Message was edited by: Jothivenkatachalam.P
    Message was edited by: Jothivenkatachalam.P

    iPhoto is a database and like any database you need to work with the structures of the db when using the data.
    There are many, many ways to access your files in iPhoto:   You can use any Open / Attach / Browse dialogue. On the left there's a Media heading, your pics can be accessed there. Command-Click for selecting multiple pics.
    (Note the above illustration is not a Finder Window. It's the dialogue you get when you go File -> Open)
    You can access the Library from the New Message Window in Mail:
    There's a similar option in Outlook and many, many other apps.  If you use Apple's Mail, Entourage, AOL or Eudora you can email from within iPhoto.
    If you use a Cocoa-based Browser such as Safari, you can drag the pics from the iPhoto Window to the Attach window in the browser.
    If you want to access the files with iPhoto not running:
    For users of 10.6 and later:  You can download a free Services component from MacOSXAutomation  which will give you access to the iPhoto Library from your Services Menu.
    Using the Services Preference Pane you can even create a keyboard shortcut for it.
    For Users of 10.4 and 10.5 Create a Media Browser using Automator (takes about 10 seconds) or use this free utility Karelia iMedia Browser
    Other options include:
    Drag and Drop: Drag a photo from the iPhoto Window to the desktop, there iPhoto will make a full-sized copy of the pic.
    File -> Export: Select the files in the iPhoto Window and go File -> Export. The dialogue will give you various options, including altering the format, naming the files and changing the size. Again, producing a copy.
    Show File:  a. On iPhoto 09 and earlier:  Right- (or Control-) Click on a pic and in the resulting dialogue choose 'Show File'. A Finder window will pop open with the file already selected.    3.b.
    b: On iPhoto 11 and later: Select one of the affected photos in the iPhoto Window and go File -> Reveal in Finder -> Original. A Finder window will pop open with the file already selected.

  • PAR FIle upload falied from NWDS

    While deploying the .par file (.par file is created from .ear file) in developer studio, from a remote client the following error occurred.
    <b>"PAR Upload failed: Please make sure server is running. HTTPS protocol is not supported, Please ensure that server is not using HTTPS"</b>
    Please give me the solution for this problem.

    Hi Piyush,
    Thanks a lot for our answer. I tried to change the HTTP service provider setting <b>AcceptClientCertWithoutSSL</b>to true(by default its false)in visual admin . But I am getting error message <b>Error while loading service HTTP Provider.</b>
    Error log shows this error.
    <b>java.lang.Exception Null Pointer Exception.</b>
    Please provide me solution for this problem also.

Maybe you are looking for