File upload problem in java servlets

hello,
I want to upload my files.i have used Multipartrequest object.In my form i had included enctype="multipart/form-data".
I want to upload one or more files .
So, I made a file input box and then a select option box. With the help of java script i stored the values of the file input box to the select option drop down box.In this way i stored the name and path of the file in the select option drop down box also. Now when i tried to upload all the file in the select option box it is uploading only one file which is the last one selected from the file input box.
I hope that file name is also getting from the file input box, and that is the reason why it is uploading that file only.I write this code to execute it.
MultipartRequest multi=new MultipartRequest(request,".",5*1024*1024);
I want to upload all the files, so what should i do,
Please help me to solve this problem
puneet

Hi,
First go through the Multipart code and try to study what it does.it does not upload all the fields u submit in a form.it will first parse the servletInputStream which seperates the normal form fields and the "File" field.when u say ENC-TYPE="multipart/form-data" the way in which it is sent is different for normal fields and the "File" field.there'll be boundaries for each field.also for "File" field the filename will be passed in the Content-disposition info(which contains the values of form fields,their names and filename(only for File input)in specific format) .so if u want to upload more files in the same submit use two or more "File" fields.
If any one else has a better option let me know

Similar Messages

  • How to Save a file uploaded in WebDynpro Java to Windows server

    Hi Guys,
    I need to save a file uploaded in WebDynpro Java to a location on one of my companys many internal Window servers but I cannot get it to work.  I do not get any errors with the following code, but NOTHING happens...  And when I check the folder it is still emply...  Please advise.  I am particularly not sure about specifying the Path syntax.  Also, I do have permission to write to this server.  Is it even possible to save to a Windows server from WebDynpro??
    //uploaded document already in context...
    byte[] file = element.getFileResource();
                //    get the size of the uploaded file  
                element.setFileSize(this.getFileSize(file));
                wdContext.currentContextElement().setFSize(this.getFSize(file)); 
                //    get the extension of the uploaded file       
                element.setFileExtension(binaryType.getMimeType().getFileExtension());
                String fName = wdContext.currentContextElement().getFName();
                String fExt = wdContext.currentContextElement().getFileExtension();
                String foName1 = "
    server01.w9\Files\P
    HRP_Attachments\" + fName + ".pdf";
                File f1 = new File(foName1);
                DataOutputStream dos1;
                dos1 = new DataOutputStream(new FileOutputStream(f1));
                dos1.write(file);
                dos1.flush();
                dos1.close();
    Edited by: christiaanp on Sep 30, 2011 8:07 AM

    Hi Christiaan,
    When specifying the path, make sure you escape the slashes
    So, when you would normally use something like
    \\server\path\file.txt
    in your code you must use it in the form:
    String fileName = "\\\\server\\path\\file.txt";
    Hope this helps!
    Robin van het Hof

  • File Upload Problem in .jsff page

    Hi
    I tried to upload a file in my jsff fragment.(I did the POC in jspx page and its working fine )
    But when in fragment when i tried to add af:form elemenst errors are coming and as per my research we cann t add af:form element in jsff page.
    Cna any bidy tell me what shoudl be done to have file upload functionality working in page fragment?

    I am using ADF - 11.1.1.3 and even if i put af:form in my jspx page i am receiving following erro message -
    *<Jul 13, 2010 3:20:22 PM SGT> <Error> <HTTP> <BEA-101020> <[ServletContext@22880480[app:sqe module:sqe path:/abc spec-version:2.5]] Servlet failed with Exception*
    java.lang.NullPointerException
    *     at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:233)*
    *     at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1369)*
    *     at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)*
    *     at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:765)*
    *     at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)*
    *     Truncated. see log file for complete stacktrace*
    *>*
    *<Jul 13, 2010 3:20:22 PM SGT> <Notice> <Diagnostics> <BEA-320068> <Watch 'UncheckedException' with severity 'Notice' on server 'DefaultServer' has triggered at Jul 13, 2010 3:20:22 PM SGT. Notification details:*
    WatchRuleType: Log
    WatchRule: (SEVERITY = 'Error') AND ((MSGID = 'BEA-101020') OR (MSGID = 'BEA-101017') OR (MSGID = 'BEA-000802'))
    *WatchData: DATE = Jul 13, 2010 3:20:22 PM SGT SERVER = DefaultServer MESSAGE = [ServletContext@22880480[app:sqe module:sqe path:/abc spec-version:2.5]] Servlet failed with Exception*
    java.lang.NullPointerException
    *     at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:233)*
    *     at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1369)*
    *     at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)*
    *     at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:765)*
    *     at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)*
    *     at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2567)*
    *     at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:432)*
    *     at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1071)*
    *     at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1369)*
    *     at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)*
    *     at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:765)*
    *     at org.apache.myfaces.trinidad.component.UIXComponentBase.__encodeRecursive(UIXComponentBase.java:1515)*
    *     at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeAll(UIXComponentBase.java:785)*
    *     at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)*
    *     at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:271)*
    *     at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:202)*
    *     at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)*
    *     at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)*
    *     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:710)*
    *     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:273)*
    *     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:205)*
    *     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)*
    *     at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)*
    *     at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)*
    *     at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)*
    *     at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)*
    *     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)*
    *     at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)*
    *     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)*
    *     at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)*
    *     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)*
    *     at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)*
    *     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)*
    *     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)*
    *     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)*
    *     at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)*
    *     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)*
    *     at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)*
    *     at java.security.AccessController.doPrivileged(Native Method)*
    *     at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)*
    *     at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)*
    *     at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)*
    *     at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)*
    *     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)*
    *     at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:159)*
    *     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)*
    *     at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)*
    *     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)*
    *     at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)*
    *     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)*
    *     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)*
    *     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)*
    *     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)*
    *     at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)*
    *     at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)*
    *     at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)*
    *     at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)*
    *     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)*
    *     at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)*
    *SUBSYSTEM = HTTP USERID = <WLS Kernel> SEVERITY = Error THREAD = [ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)' MSGID = BEA-101020 MACHINE = CI0000000080442 TXID = CONTEXTID = 4eaa01d34767a0a4:3859a5d6:129ca386f71:-8000-0000000000000045 TIMESTAMP = 1279005622489*
    WatchAlarmType: AutomaticReset
    WatchAlarmResetPeriod: 30000
    *>*
    *<Jul 13, 2010 3:20:25 PM SGT> <Alert> <Diagnostics> <BEA-320016> <Creating diagnostic image in c:\documents and settings\shmishra\application data\jdeveloper\system11.1.1.3.37.56.60\defaultdomain\servers\defaultserver\adr\diag\ofm\defaultdomain\defaultserver\incident\incdir_166 with a lockout minute period of 1.>*
    Any idea about the reason??
    And what else can be done to solve this problem...

  • 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

  • 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 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)
    }

  • Help needed...   File UPload  problem on remote Machine..

    Hello Helpers....
    Advance My heartfull thanks
    me have problem in file uploading...
    me have program for file upload...
    but it will work perfectly in same system.. (i mean server)..
    i cant upload in client machine..
    resourse not found (error) is comming
    me use tomcat5.0 with jdk1.4..
    Html File
    <html>
    <head>
    <form action="fileupload.jsp" name="upform" enctype="multipart/form-data">
    <table width="60%" border="0" cellspacing="1" cellpadding="1" align="center" class="style1">
    <tr>
    <td align="left"><b>Select a file to upload :</b></td>
    </tr>
    <tr>
    <td align="left">
    <input type="file" name="filename" size="50">
    </td>
    </tr>
    <tr>
    <td align="left">
    <!-- <input type="hidden" name="todo" value="upload"> -->
    <input type="submit" name="Submit" value="Upload">
    <input type="reset" name="Reset" value="Cancel">
    </td>
    </tr>
    </table>
    </form>
    </body>
    </html>
    jsp file
    <%@ page import="java.util.*,java.io.*"%>
    <%
    String path=request.getParameter("filename");
    String newPath="";
    int count=0;
    if(path!=null)
         ArrayList arr=new ArrayList();
         StringTokenizer st=new StringTokenizer(path,"\\");
         while(st.hasMoreTokens())
              arr.add(count,st.nextToken());
              count++;
         // create ur own path
         newPath="//javaserver/Tomcat5.0/webapps/ROOT/fileupload/fl/"+arr.get(count-1);
         int c;
         FileInputStream fis=new FileInputStream(path);
         FileOutputStream fos=new FileOutputStream(newPath);
         while((c=fis.read())!=-1)
              fos.write((char)c);
    out.println("Thanks for using");
    out.println("<br>");
    out.println("<br>");
    out.println("1.File1 Uploaded from :: "+path);
    out.println("<br>");
    out.println("<br>");
    out.println("2.Uploaded File1 is Saved in :: "+newPath);
    %>
    Message was edited by:
    drvijayy2k2
    Message was edited by:
    drvijayy2k2

    hai mshanu...
    thus me asking whats wrong any other solution..
    thanks for ur ........................
    Message was edited by:
    drvijayy2k2

  • Jar files download problems in Java Webstart with JRE 1.6

    We have encountered a few problems in Java Webstart with JRE 1.6
    In JRE 1.5, the jar files are getting downloaded onto the client
    machine with it's original names.
    Example :
    Server File Name : acm.jar
    Client File Name : RMacm.jar
    But in JRE 1.6, the jar files are getting downloaded with improper file names.
    Example :
    Server File Name : acm.jar
    Client File Name : 4fb074cc-66fc7407
    Moreover the path itself seems to be invalid.
    Example Path :
    JRE 1.5 path:
    C:\Documents and Settings\Administrator\Application
    Data\Sun\Java\Deployment\cache\javaws\https\D17.16.23.11\P443\DMtest\DMwebStart
    JRE 1.6 path:
    C:\Documents and Settings\Administrator\Application
    Data\Sun\Java\Deployment\cache\6.0\12
    Due to this, we are facing Classpath problems.
    What changes do we have to make to the code, for Java
    Webstart to work ?
    We are using JBoss 4.0.4 and JDK 1.5 in the Server
    On the client machine, we have IE 6 and JRE 1.6.01
    Help would be appreciated.

    Ask your Java Web Start question at:
    http://forum.java.sun.com/forum.jspa?forumID=38

  • 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.

  • Problem Installing Java Servlets Package

    I downloaded a sample servlet program which imports classes from the Java Servlets Package. I have the JDK 1.2 which does not come with the servlet classes (javax.servlet and javax.servlet.http). So I then downloaded them from java.sun.com. They come as a set of class files in .zip format. I thought packages were supposed to be in .jar format? At any rate, my compiler still fails to see these classes even after I have extracted these files into the same directory as the original .zip file and added this directory to my classpath. Am I going about this the wrong way? Any ideas on how I can make my compiler see these classes? --Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    I down loaded j2sdk 1.4 . and also down loade servlet package. I installed in bin directory.
    i took the sample program and compiled. there is error message " java servlet package not found.
    please help. email me at [email protected]
    Thanks
    sri

  • Problems calling Java Servlets from HTML pages Online

    Hello
    I have created a Web site using Java Servlets, and have acquired some servlet enabled web-space however i am having some difficulty in calling the actual servlets from the HTML pages i was using the line of code as follows
    http://localhost:8080/servlet/....
    followed by the name eg.
    http://localhost:8080/servlet/Login
    however this doesn't seem to be working i have also tried using the exact address of the servlet but this didn't work either
    i.e ..servlet/Login.java
    I was wondering would anyone have any idea as in how the servlets should be called
    Thanks very much

    Once you write the Servlet code, you have to compile and put the classes in the server classpath. To refer these servlets from your pages, you have to configure them in the server configuration(typical a xml file). There you define how you are going to refer to the servlet(/servlet/Logon) and the correponding class.
    -Mak

  • File upload: problem with writing uploaded file to server-harddisk

    Hello,
    according to the example in the File upload tutorial, I tried to save an uploaded file to disk, but it didn't work (and also no messages / exceptions were thrown).
    The Javadoc for the function uploadedFile.write(filename) says that if the file should be written in an other directory than the servers' tmp-directory, the server.policy has to be adjusted.
    The following line is already included in my server.policy:
    permission java.io.FilePermission "<<ALL FILES>>", "read,write";
    So I have two questions:
    1) Where can I find the servers' tmp-directory?
    2) How should the sever.policy permission code look like?

    The File Upload tutorial at http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/file_upload.html has you save the uploaded file to disk. It also gives this information:
    The server holds the uploaded file in memory unless it exceeds 4096 bytes, in which case the server holds the file contents in a temporary file. You can change this threshold by modifying the sizeThreshold parameter for the UploadFilter filter entry in the web application's web.xml file. For more information on modifying the web.xml file, see the last section in this tutorial, Doing More: Modifying the Maximum File Upload Size.
    In cases where you want to retain the uploaded file, you have three choices:
    * Write the file to a location of your choosing, as shown in this tutorial.
    * Create an UploadedFile property in a managed bean and set it to the component's value before you exit the page (as in the button's action method).
    * Save the file to a database.
    By default, the File Upload component can handle files up to one megabyte in size. You can change the maximum file size by modifying the maxSize parameter for the UploadFilter filter entry in the application's web.xml file, as described in the last section in this tutorial, Doing More: Modifying the Maximum File Upload Size.

  • Web Dynpro ABAP - File upload Problem (Timeout)

    Hello Experts,
    we are facing an issue with a custom WD Abap application:
    We use the file upload UI element in order to store PDF files within our system. For 90% of our users it works perfectly.
    However, for some users an error occurs: Once they select the file at their local system and press "upload", the system is loading and loading and eventually it ends up as a time out.
    We have checked the browser settings and permissions. But everything looks good.
    We are running on:
    SAP_BASIS 731 0013
    Does anybody know a solution for this problem?
    Thanks for your help!
    Maximilian

    Hi Maximillian,
    Please check the following notes,if they are applicable to you.
    1912687 - IE11: File Upload not working
    1818772 - WDA: Performance issue for file upload
    Regards,
    Harsha

  • Any one having file upload problems via webforms for site in the Australian data center or elsewhere?

    For the last 3-4 weeks we have a web app that can longer upload largish files (e.g. 35mb PDF) via a web form Uploads no problem via SFTP.
    Adobe so far has provided to answers and can't reproduce the problem.
    Yet we (in Auckland) and our client in Wellington have the same problem.
    Is there an issue with AWS Sydney, Adobe's setup or has BC introduced some new throttling or security rules around file uploads?
    Any help greatly appreciated.

    Hi,
    Please try to use the UI element "Office Control" of a web dynpro view.
    For more details, refer to the web dynpro component: IOS_TEST_HELLOWORLD_MS.
    Best regards,
    Shalini.

Maybe you are looking for

  • File name structure for picking up X12/EDIFACT documents from an FTP Server

    According to some documents, and posts in this forum, the file name for a document retreived from an FTP server by B2B has to be in the following format: %TPName%_%X12 Doc Type%_%X12 Version_1_12345.dat Why is this format required? Is it possible to

  • Problem with Tomcat 404 Redirects & Internet Explorer

    Hello All -- I am running Tomcat 5.5.9 stand alone on a linux server. My default application is loading when you visit http://*IPAddress*/ I have set up the standard <error-page> tags in my context web.xml, located in: TOMCAT-INSTALL/webapps/contextn

  • SATA boot with IDE hard dr. installed

    Newbie here. I'm so proud of myself. MoBo is KM4M-V w/latest BIOS and Athlon XP 2600+ CPU. 2 CDROMs, Zip Dr. and 60GB HD in a Pull-Out use up all 4 IDE's. So I had to use SATA 80GB as boot up. With 60gb NOT plugged into Pull-out, Win XP installs perf

  • Hardware configuration with PXI

    I need to control the operation of a chemical pump using the Labview. The control panel consist of: 1. Pump, on/off 2. Two Heaters on/off 3. Tank level indicator, sensys co. 4. pressure transmitter, sensys co. 5. vibration transmitter, sensys co. Its

  • Can't open logicExpress-project in LogicPro7

    I've got the following problem: I'm using LOGIC PRO 7 and I try to open a project which was created in LOGIC EXPRESS (7/8?)... but unfortunately I can't find any project-file to open...? the project is composed of 4 folders (Bounces,Fade Files, Proje