File Upload Portlet Issue

I have a portlet written in .NET that allows a user to upload a file that is saved to a server and some back-end processing is done. I'm running into an issue where I can't upload a file over 80 MB. I have adjusted the setting in .NET to allow the file size for up to 400 MB. But, my Plumtree Portal is running on Tomcat on Windows. Is there another setting in either Tomcat or Plumtree that I need to adjust?
Thanks, Jamie

The binary gateway for Plumtree has a limit of 50mb. You can turnoff binary gateway, which you have to do it in 5.01 to fix some problems, or change the MaxPostData registry DWORD. You might even have to increase its timeout settings for files that large. See this article below:
http://portal.plumtree.com/portal/server.pt/gateway/PTARGS_0_280508_555092_0_0_18/registry_settings_for_plumtree_binary_gateway.htm
If you have a problem getting to it, just search for "binary gateway" and it should be the first hit.
Hope this helps!--Jason ParrishFTN Financial

Similar Messages

  • Integrated Planning - File upload - Locks issue

    Hi
    When we try to use file upload feature (planing function- how to guide) , it gives us error that says " Data is locked by user .....". We checked and we had one user in the layout so system had lock entry in SM12 transaction.
    Is there any way - we can release the locks created by user before we execute the file upload process automatically so that we donot have to go to SM12 to delete it and then trigger upload process?
    Is it recommended to delete such locks from SM12 using ABAP code ?
    Please help.
    Thanks
    A

    Hi ,
    Pls chk this link for complete doc abt Locking in IP.
    http://help.sap.com/saphelp_nw70/helpdata/en/44/588168ce8c08fae10000000a422035/content.htm
    *pls assign points,if link is useful*
    Regards
    CSM reddy

  • Help! File Upload Portlet

    Come on Plumtree Support, I know you can do it...
    How do I write a portlet that will upload a file and save it in a designated Knowledge Directory folder that the user picks from an existing Knowledge Directory folder list ? In addition, can I also perform the document submission and automatically approve the document?
    Paul

    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 Portlet?

    Within Oracle Portal there's an upload file screen - however I need to "customise" this and wondered if anybody had anything from the Knowledge Exchange that they wouldn't mind sharing please!
    Thanks
    AkiRob

    Hi....
    Any ideas what these are?
    Thanks.
    Rob

  • File upload issue in Portlet

    Hi Friends,
    I'm using FileUpload in one of my screen, so I'm using form enctype="multipart/form-data" and using apache commons fileUpload library. The file upload is working fine and I'm navigated from 1st screen to the 2nd screen.
    but in the 2nd screen, I have an anchor link, to navigate back to the 1st screen
    <li><a href="javascript:void (0)" onclick="'<%=renderResponse.createActionURL().toString()+"&paramView=Test1"%>'"> Test1</a></li>.
    When I click the anchor link in the 2nd screen, I'm getting the following exception,
    <ADFPortletServlet> <renderError>
    oracle.adfinternal.view.faces.renderkit.core.portlet.ADFPortletServletException: An error has occurred in the ADFPortletServlet
      at oracle.adfinternal.view.faces.renderkit.html.portlet.ADFPortletServlet.process(ADFPortletServlet.java:429)
      at oracle.adfinternal.view.faces.renderkit.html.portlet.ADFPortletServlet.doGet(ADFPortletServlet.java:349)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      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.portlet.client.adapter.adf.ADFPortletFilter.doFilter(ADFPortletFilter.java:32)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.wcps.client.PersonalizationFilter.doFilter(PersonalizationFilter.java:74)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.webcenter.content.integration.servlets.ContentServletFilter.doFilter(ContentServletFilter.java:168)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
      at java.security.AccessController.doPrivileged(Native Method)
      at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)
      at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
      at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
      at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
      at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
      at java.security.AccessController.doPrivileged(Native Method)
      at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)
      at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
      at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
      at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
      at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:163)
      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.wrapRun(WebAppServletContext.java:3715)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: oracle.adfinternal.model.portlet.psr.InvalidPortletServletRequest: Invalid request made to the portlet servlet.
      at oracle.adfinternal.view.faces.renderkit.html.portlet.ADFPortletServlet.process(ADFPortletServlet.java:380)
      ... 47 more
    Note :  I'm using webcenter 11.1.1.8 and this is WSRP 286 portlet. I'm using plain jsp to develop the portlet.
    Can anyone please help me in solving this exception. Any suggestion would be deeply welcomed.
    Thanks in Advance,
    Felix

    Hi Sreedhar,
    Thanks for your reply. I'm not able to access the document. I get the following message while trying to access the document. Are you able to access the document?
    Document cannot be displayed. Possible reasons are: 
    The document id was entered incorrectly. Please check and try again.
    The document id does not exist (was referenced incorrectly).
    The document is not classified as publicly accessible ("non-public").
    The content is being updated and it is temporarily unavailable but will be made available again soon.
    I don't have any problem in pulling the parameters from a Simple HTML Form with enctype="multipart/form-data" using JSR 286 portlets. But the problem is, if I do submit using the Form with enctype="multipart/form-data", in the next screen, the anchor link is not working, but submit buttons are working in the 2nd screen. If I'm navigated to the 2nd screen using default form enctype, I don't have any problem in the 2nd screen. I'm using Apache commons FileUpload.
    Here is my code.
        public void processAction(ActionRequest request,
                                  ActionResponse response) throws PortletException,
                                                                  IOException {
            if (!isMultiPartForm(request)) {
            // Determine which action.
            String okAction = request.getParameter(OK_ACTION);
            String applyAction = request.getParameter(APPLY_ACTION);
            if (okAction != null || applyAction != null) {
                // Save the preferences.
                PortletPreferences prefs = request.getPreferences();
                String param = request.getParameter(PORTLETTITLE_KEY);
                prefs.setValues(PORTLETTITLE_KEY, buildValueArray(param));
                prefs.store();
                if (okAction != null) {
                    response.setPortletMode(PortletMode.VIEW);
                    response.setWindowState(WindowState.NORMAL);
            String paramView= request.getParameter("paramView");
            PortletSession session=this.getSession(request);
            System.out.println("Setting the param view into the session ........."+paramView);
            session.setAttribute("paramView", paramView);
            }else{
                PortletFileUpload uploader =
                    new PortletFileUpload(new DiskFileItemFactory());
                List<FileItem> items;
                Map<String, String> formFieldsMap =
                    new HashMap<String, String>();
                Map<String, FileItem> nonFormFieldsMap =
                    new HashMap<String, FileItem>();
                try {
                    items = uploader.parseRequest(request);
                for (FileItem item : items) {
                        if (!item.isFormField()) {
                            String fieldName = item.getFieldName();
                            InputStream inpStream = item.getInputStream();
                            nonFormFieldsMap.put(fieldName, item);
                        } else {
                            String fieldName = item.getFieldName();
                            String value = getValue(item.getInputStream());
                            formFieldsMap.put(fieldName, value);
                    String paramView = (String)formFieldsMap.get("paramView");
                    if (paramView.equals("Test3")) {
                        PortletSession session=this.getSession(request);
                        System.out.println("Multi Setting the param view into the session ........."+paramView);
                        session.setAttribute("paramView", paramView);
                } catch (FileUploadException e) {
        private static String getValue(InputStream inp) throws IOException {
            BufferedReader reader =
                new BufferedReader(new InputStreamReader(inp, "UTF-8"));
            StringBuilder value = new StringBuilder();
            char[] buffer = new char[1024];
            for (int length = 0; (length = reader.read(buffer)) > 0; ) {
                value.append(buffer, 0, length);
            return value.toString();
        public boolean isMultiPartForm(ActionRequest request) {
            return PortletFileUpload.isMultipartContent(request);
        public PortletSession getSession(PortletRequest request){
            PortletSession session = request.getPortletSession();
            return session;
    Please provide your inputs.
    Regards,
    Felix

  • Problem using File upload in portlets

    hello there
    I'm trying to use file upload component in one of my portlets. I searched a lot about a working component to be used in portlets since the standard one that comes with JSC doesn't work in portlets. I managed to get commons file upload and tomahawk to run in my portlet, but when I choose a file and try to get selected file's details it throughs a NullPointerException reporting that the file object is null.
    so please can anyone guide me to a working portlet example, I tried to find one but I couldn't. if that's hard to find, what should I do ?
    thank you in advance

    I added file upload component in JSF from portlets in Sun Java Portal server.
    Take a look...
    portlet.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
    version="1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
    <portlet>
    <description>SFTB Anonymous Mail Portlet</description>
    <portlet-name>SFTBAnonymousMailPortlet</portlet-name>
    <display-name>SFTBAnonymousMailPortlet</display-name>
    <portlet-class>org.apache.portals.bridges.portletfilter.FilterPortlet</portlet-class>
    <init-param>
    <name>portlet-class</name>
    <value>com.sun.faces.portlet.FacesPortlet</value>
    </init-param>
    <!-- Filter for MyFaces Tomahawk extension. -->
    <init-param>
    <name>portlet-filters</name>
    <value>jp.sf.pal.tomahawk.filter.ExtensionsPortletFilter</value>
    </init-param>
    <init-param>
    <description>Portlet init page</description>
    <name>com.sun.faces.portlet.INIT_VIEW</name>
    <value>/jsp/index.jsp</value>
    </init-param>
    <supports>
    <mime-type>text/html</mime-type>
    <portlet-mode>VIEW</portlet-mode>
    <portlet-mode>EDIT</portlet-mode>
    <portlet-mode>HELP</portlet-mode>
    </supports>
    <portlet-info>
    <title>&#1054;&#1090;&#1087;&#1088;&#1072;&#1074;&#1082;&#1072; &#1087;&#1088;&#1077;&#1076;&#1083;&#1086;&#1078;&#1077;&#1085;&#1080;&#1081;</title>
    <short-title>&#1054;&#1090;&#1087;&#1088;&#1072;&#1074;&#1082;&#1072; &#1087;&#1088;&#1077;&#1076;&#1083;&#1086;&#1078;&#1077;&#1085;&#1080;&#1081;</short-title>
    </portlet-info>
    </portlet>
    </portlet-app>
    web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <display-name>SFTBAnonymousMailComment</display-name>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>server</param-value>
    </context-param>
    <context-param>
    <param-name>javax.faces.CONFIG_FILES</param-name>
    <param-value>/WEB-INF/faces-config.xml</param-value>
    </context-param>
    <!--
    Extensions filter from Apache MyFaces Tomahawk used for uploads files.
    -->
    <filter>
    <filter-name>ExtensionsFilter</filter-name>
    <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
    <init-param>
    <param-name>uploadMaxFileSize</param-name>
    <param-value>10m</param-value>
    <description>Set the size limit for uploaded files.
    Format: 10 - 10 bytes
    10k - 10 KB
    10m - 10 MB
    1g - 1 GB
    </description>
    </init-param>
    <init-param>
    <param-name>uploadThresholdSize</param-name>
    <param-value>100k</param-value>
    <description>Set the threshold size - files
    below this limit are stored in memory, files above
    this limit are stored on disk.
    Format: 10 - 10 bytes
    10k - 10 KB
    10m - 10 MB
    1g - 1 GB
    </description>
    </init-param>
    </filter>
    <filter-mapping>
    <filter-name>ExtensionsFilter</filter-name>
    <servlet-name>FacesServlet</servlet-name>
    </filter-mapping>
    <servlet>
    <servlet-name>FacesServlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>FacesServlet</servlet-name>
    <url-pattern>*.faces</url-pattern>
    </servlet-mapping>
    </web-app>
    Files in WEB-INF/lib
    commons-beanutils-1.7.0.jar
    commons-collections-3.2.jar
    commons-digester-1.8.jar
    commons-fileupload-1.2.1.jar
    commons-io-1.2.jar
    commons-logging-1.1.1.jar
    faces-response-filter-0.2.jar
    jsf-api-1.1_02.jar
    jsf-impl-1.1_02.jar
    jsf-portlet-1.1.5.jar
    jstl-1.1.0-D13.jar
    log4j-1.2.9.jar
    portals-bridges-portletfilter-1.0.jar
    standard-1.1.0-D13.jar
    tomahawk-1.1.6.jar
    tomahawk-bridge-0.9.1.jar
    Files tomahawk-bridge-0.9.1.jar, faces-response-filter-0.2.jar may be found there http://sourceforge.jp/projects/pal/
    In JSF beans I'm using org.apache.myfaces.custom.fileupload.UploadedFile
    Hope this helps.
    Bests,
    Alex Magdenko

  • File Upload issue in MVC

    Hi,
    For my MVC application, I have created a main controller.
    On the DO_REQUEST of the main controller, I am setting the sub controllers, and directly calling that controller using create_controller, controller_set_active, and call_controller.
    I included dispatch_input( ) in the Main controller's DO_REQUEST method.
    Inside the DO_REQUEST  of the sub controller, I am creating a view using create_view and call_view methods.
    In this view, I have a <htmlb:tableView /> and a <htmlb:fileUpload />, with a button. The issue is that, when the button is clicked, in the DO_HANDLE_EVENT method of the sub-controller, I am not getting the File Data, or the table data.
    For File upload, I use the following -
    data lv_fupld_data TYPE REF TO cl_htmlb_fileupload.
    lv_fupld_data ?= cl_htmlb_manager=>get_data(
                          request = runtime->server->request
                          name    = 'fileupload'
                          id      = 'fupld_1').
    I have the <htmlb:form method       = "post"
                      encodingType = "multipart/form-data" > etc in the view.
    When I call this sub-controller directly from the browser (after including the dispatch_input( ) part in DO_REQUEST), I do not get any issue. I am able to read the file data and upload the file.
    Any Idea why this is happening?

    Hi Rakesh,
    I think I got your problem:
    You only have the htmlb:form in your view of the subcontroller, and not in the main view.
    Therefore the subcontroller works by itself, but not within the main controller.
    If you are including subcontrollers, then make sure the form element is only present in the view of the main controller, wrapping around any subcontroller calls. And don't use the form tag anymore in the subcontrollers.
    Just as you put dispatch_input() just in your top controller, also place htmlb:form only in your top view.
    Regards,
    Max

  • 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

  • How to use file upload component inside a portlet

    Hi
    Thank you for reading my post.
    does file upload works inside portlets ?
    can some one help me with a sample code , does it need some tricks ?
    Thank you

    any help is welcomeLegolas,
    You could try your own implementation. Someone was able to implement a file upload with Creator 2004Q4 and the O'Reilly Servlet. See http://swforum.sun.com/jive/thread.jspa?forumID=123&threadID=50186.
    You will have to configure O'Reilly Servlet's "MultiPart Filter" in your application. Creator 2 uses a same approach (a filter) to accomplish this. Given that the file upload component is not supported on portlets, this leads me to the following: I don't know anything about portlets and portlet containers, but I'd check first for some architechtural restriction in the portlet subsystem that avoids the use of a filter for a file upload. If think this could be the only thing that will restrict you to implement your own file upload.
    Hope this helps.
    Antonio

  • Upload file in Portlet (JSR-168) with library commons-FileUpdate

    hi All,
    I have write portlet (JSR 168) "UpToFile.java" for upload a file with the Commons-FileUpload 1.1.1 but when deploy in the Oracle Portal the file is not upload, because the variable isMultipart is false:
    UPToFile.ProcessAction(...) :
    boolean isMultipart = PortletFileUpload.isMultipartContent(request);
    (Utility method that determines whether the request contains multipart content.)
    view.jsp:
    <FORM ACTION="<portlet:actionURL/>" METHOD="POST" enctype="multipart/form-data" >
    upload file: <INPUT TYPE="file" NAME="file-upload" SIZE="20">
    <INPUT TYPE="SUBMIT" value="upload" >
    </FORM>
    I do not understand because "isMultipart" is "false".
    Tanks.
    EDIT: sorry, now work. :)
    Message was edited by:
    dartan
    null

    hi All,
    I have write portlet (JSR 168) "UpToFile.java" for upload a file with the Commons-FileUpload 1.1.1 but when deploy in the Oracle Portal the file is not upload, because the variable isMultipart is false:
    UPToFile.ProcessAction(...) :
    boolean isMultipart = PortletFileUpload.isMultipartContent(request);
    (Utility method that determines whether the request contains multipart content.)
    view.jsp:
    <FORM ACTION="<portlet:actionURL/>" METHOD="POST" enctype="multipart/form-data" >
    upload file: <INPUT TYPE="file" NAME="file-upload" SIZE="20">
    <INPUT TYPE="SUBMIT" value="upload" >
    </FORM>
    I do not understand because "isMultipart" is "false".
    Tanks.
    EDIT: sorry, now work. :)
    Message was edited by:
    dartan
    null

  • Error "PPE is working" on File Upload with Oracle Portlet running 10.1.2

    I am attempting to perform file upload using an Oracle Portlet running under the 10.1.2 Portal.
    All the examples I have seen indicate you must identify the encoding type as "multipart/form-data" in your JSP. When I do this and attempt to submit the page I get a blank screen with the words "PPE is working.".
    Looking at the "http-web-access.log" on my OC4J Standalone server I can see that the Standalone server never actually receives the request. For some reason it appears the Portal is not forwarding the request to OC4J like it is suppose to.
    Can someone tell me what might be wrong? Does anyone have experience implementing file upload using Oracle Portlets and the 10.1.2 Portal?
    Thanks,

    I have encountered the same problem 4 years before. Finally i figured out, Oracle Portal is not supporting "multipart/form-data".
    Work around is write a servlet program to upload the file into DB.
    This blog may help you.. http://bsubramaniam.blogspot.com/search/label/Java%20File%20Upload
    --Balaji S                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Issues with file upload in flex mobile application (sharepoint as backend)

    Hello,
    I am working on flex mobile application for android platform for which we are having sharepoint as a backend.
    (Flex SDK 4.6 and AIR 3.9)
    Issue which we are facing is as follows:
    We are communicating with the backend server using webservices: example:
    <s:WebService id="kWebService" wsdl="http://www.kservice.net/kdatabaseservice.asmx?WSDL" >
                <s:operation name="AddPost"
                             resultFormat="object"
                             result="addPostResult(event)"
                             fault="postsfaulterr(event)" />
    </s:WebService>
    Above services are working fine but we are facing issue with one service which is related to file upload.
    File upload for <10 MB is working fine but when we try to upload larger file on server it fails to process.
    We are sending bytearray to the backend and backend code is writing those bytearray into file.
    We have tried many ways to overcome from this situation. like we have checked configuration for file upload size on server , we have tried wcf services as well. Please help us on this criticle point as soon as possible
    Thanks
    Dhwani

    Prashant8809 wrote:
    Hi
    >
    > I have already gone through the video by Thomas Jung for multiple file upload but it saves the contents in server and not in >transparent table. So please suggest me alternative solutions.
    >
    >
    > Regards
    > Prashant Chauhan
    What do you mean that my video saves the contents int he server and not in transparent table?  I save the data into a temporary database table so it can be accessed by the parent WDA session. From there the WDA session can do whatever it wants with it.  What do you mean by transparent table - that would be a database table. Do you actually mean internal table?  if so, just read the data from the temporary database table into memory.

  • File upload component and text area issue

    Hi guys,
    I have static text, text area and button on the same page. Text area binded to session bean value and all works fine (I can input text into text area and press button to save changes).
    After adding file upload component to the same page I have got a problem - now after page refreshing the non english characters inside text gets trashed.
    Other non english characters - inside static text components remains the same - the problem relates only to text area.
    It looks like file upload component code has an encoding related bug. Is that a known issue?
    And may be somebody have a workaround?
    Thanks.

    Hi Rom@n,
    I did some checking and this issue is currently logged as: 6442528. It is scheduled to be available in the next patch release. I'm sorry I don't have a time frame for the patch since it is still waiting for other fixes.
    Sorry for the inconvience.
    Lark
    Creator Team

  • Struts commons binary file upload issue

    Hi,
    I was wondering if someone could help me with uploading binary files using jakarta commons file upload. I've looked at several examples and forums and it seems to work but sometimes the binary files that I upload get corrupted. I have no idea why this might be happening. Here is a snippet of my code.
        UploadFileForm uploadFileForm = (UploadFileForm)form;
        FormFile file = uploadFileForm.getFile();
        String dirName = "/tmp/";
        InputStream inputStream = null;
        OutputStream bos = null;
        inputStream = file.getInputStream();
        bos = new FileOutputStream(dirName + file.getFileName());
        int bytesRead = 0;
        byte[] buffer = new byte[4096];
        while ((bytesRead = inputStream.read(buffer, 0, 4096)) != -1) {
            bos.write(buffer, 0, bytesRead);
        }            Am I doing something wrong?
    Thanks.
    PV

    FormFile myFile    = myForm.getTheFile();
        byte[] fileData    = myFile.getFileData();
        BufferedReader in = null;
       try{
           in = new BufferedReader(new InputStreamReader(new   ByteArrayInputStream(fileData)));
           // in = new BufferedReader(new  InputStreamReader(myFile.getInputStream()));
           String str;
            while ((str = in.readLine()) != null) {
                    System.out.println(str);
       }catch(Exception exp){
           exp.printStackTrace();
        }finally{
             if(in != null){
                try{
                   in.close();
                }catch(Exception ep){
                       ep.printStackTrace();
        } Hope this might help :)
    and a small advice please do reactivate archived posts.It'd be lot better if you start with a new one.
    Hope there are no hard and fast issues on this.
    REGARDS,
    RaHuL

  • File Upload issues

    There is a file upload that I have and I am getting an
    error...
    Notice: Undefined variable: file_list in
    C:\vhosts\mysite\upload\index.php on line 20
    On line 20 in my php page happens to be the following code
    that is giving an error...$file_list .= "<option value=\"$file\"
    >$file</option>";
    <?php
    #for windows...
    $dirname = $_SERVER['DOCUMENT_ROOT'].'/_assets/professor/';
    //$dirname = "C:\\wamp\\www";
    #(for Linux... $dirname = "user/local/apache/bin";)
    $dir = opendir($dirname);
    while(false != ($file = readdir($dir))){
    if(($file != ".") and ($file != "..")){
    $file_list .= "<option value=\"$file\"
    >$file</option>";
    closedir($dir);
    ?>
    This is what is in the body...
    <form enctype="multipart/form-data" action="uploaded.php"
    method="POST">
    <fieldset><legend>Upload Professor
    Image</legend>
    <!-- MAX_FILE_SIZE must precede the file input field
    -->
    <!--input type="hidden" name="MAX_FILE_SIZE"
    value="30000" /-->
    <!-- Name of input element determines name in $_FILES
    array -->
    Send this file: <input name="userfile" type="file" />
    <div align="center"><input type="submit"
    value="Send File" /></div>
    </fieldset>
    </form>
    <br>
    <br>
    <form action="delete.php" method="post">
    <fieldset><legend>Delete Professor
    Image</legend>
    <select name="deleteFile">
    <?php echo($file_list); ?>
    </select>
    <div align="center"><input type="submit" name="go"
    value="Delete File"></div>
    </fieldset>

    AdonaiEchad wrote:
    > There is a file upload that I have and I am getting an
    error...
    > Notice: Undefined variable: file_list in
    C:\vhosts\mysite\upload\index.php on
    > line 20
    > On line 20 in my php page happens to be the following
    code that is giving an
    > error...$file_list .= "<option value=\"$file\"
    >$file</option>";
    What that's telling you is that you're adding a value to a
    variable that
    doesn't yet exist. In your case, it probably doesn't matter,
    but using
    undefined variables is a potential security risk. To
    eliminate the
    warning - and the risk - declare $file_list before using it:
    $file_list = '';
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

Maybe you are looking for

  • IWeb and Quicktime Movie Upload 2013

    Three or so years ago, I made a website using iWeb (the last version Apple produced; i.e. the current version), and I included some videos. The videos were from a digital (tape) video camera, edited with iMovie HD, and were old-format 640x480. I mana

  • G4 MDD randomly powers UP!

    Hey all, I have a G4 MDD which ran perfectly until now! I recently purchased a Samsung 2333HD tv for my room which I hook my mac up to via vga. Worked fine to start with, but the next day I couldnt get it to power up. After reading some topics on her

  • Why does Teamspeex don't work anymore and how can I fix it?

    Hi At my university we use a Teamspeak2 Server for our online lectures. Last friday i tried to attend one of those lectures. I can still connect properly and see all participants but the is no sound at all. I can't hear anyone talking and the microph

  • UUID of current user in UI

    Hi, does anybody know how to get the UUID of the current user in the UI? We'd like to implement a DefaulSet that filters the selection of the OWL to show only instances that "belong" to the current user (something like "My Orders"). - Daniel

  • Parametrizaciones de seguridad en Excel

    Hola a todos Tengo un porblema al tratar de ejecutar reportes de XL Reporter, el mensaje que aparece es : "Parametrizaciones de seguridad en Excel  prohiben ejecutar XL Reporter" Esto sucedio cuando se actualizo la version de Office a 2007, ya he rev