File Upload in Portal Enviroment

I have a web page with a File Upload tag, and a PageFlow with a Form Bean where
it has a FormFile attributte. When i run this pageFlow, it run excelent, but when
the pageFlow is in a porlet of the portal, never upload the file. What i have
to do?? Please... help me!!!

It's a patched version of netui-pageflow.jar that is going to be in the
next sp. For now you have to get it directly from BEA support.
/Steen
Juvenal Guzman wrote:
Steen,
Which patch I have to get? Because only found Service Pack 1 for App Server 8.11
and that's it..
Regards
Juvenal
Steen Larsen <[email protected]> wrote:
Hi,
It's a bug. You can get a patch from BEA support.
/Steen
Daniel Montenegro wrote:
I have a web page with a File Upload tag, and a PageFlow with a FormBean where
it has a FormFile attributte. When i run this pageFlow, it run excelent,but when
the pageFlow is in a porlet of the portal, never upload the file. Whati have
to do?? Please... help me!!!

Similar Messages

  • File Upload in Portal

    Hello;
    I have following code. and i can easily upload in apache tomcat server (it doesnt care about file size) but after i deploy portal i cannot upload if file size above 30kb. And i get this error:
    <b>Cannot read from InputStream. The buffer is null or the offset and length are incorrect</b>
    Is there any idea?
    <%@ page import="java.io.*" %>
    <%
        String contentType = request.getContentType();
        out.println("Content type is :: " +contentType);
        if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0))
            DataInputStream in = new DataInputStream(request.getInputStream());
            int formDataLength = request.getContentLength();
            byte dataBytes[] = new byte[formDataLength];
            int byteRead = 0;
            int totalBytesRead = 0;
            while (totalBytesRead < formDataLength) {
                byteRead = in.read(dataBytes, totalBytesRead, formDataLength);
                totalBytesRead += byteRead;
            String file = new String(dataBytes);
            String saveFile = file.substring(file.indexOf("filename="") + 10);
            saveFile = saveFile.substring(0, saveFile.indexOf("n"));
            saveFile = saveFile.substring(saveFile.lastIndexOf("\") + 1,saveFile.indexOf("""));
            //out.print(dataBytes);
            int lastIndex = contentType.lastIndexOf("=");
            String boundary = contentType.substring(lastIndex + 1,contentType.length());
            //out.println(boundary);
            int pos;
            pos = file.indexOf("filename="");
            pos = file.indexOf("n", pos) + 1;
            pos = file.indexOf("n", pos) + 1;
            pos = file.indexOf("n", pos) + 1;
            int boundaryLocation = file.indexOf(boundary, pos) - 4;
            int startPos = ((file.substring(0, pos)).getBytes()).length;
            int endPos = ((file.substring(0, boundaryLocation)).getBytes()).length;
            saveFile="c:\"+saveFile;
            FileOutputStream fileOut = new FileOutputStream(saveFile);
            //fileOut.write(dataBytes);
            fileOut.write(dataBytes, startPos, (endPos - startPos));
            fileOut.flush();
            fileOut.close();
            out.println("File saved as " + saveFile);
    %>

    Hi Eray,
    I completely agree with Vivek. <a href="http://jakarta.apache.org/commons/fileupload/">Commons FileUpload</a> is very good. In case you don't want to use it, you could have a look at the source code.
    Note that Integer.MAX_VALUE == 2^31-1 == 2147483647. Since request.getContentLength() returns the number of bytes, the maximum value is almost 2 GB.
    Anyway, there's at least one bug in your code. It should be
    byteRead = in.read(dataBytes, totalBytesRead, formDataLength - totalBytesRead);
    Besides this, I'm wondering why you use a DataInputStream instead of just an InputStream (it's the responsability of the servlet container to provide an efficient implementation like a BufferedInputStream). I'm not sure what you're trying to do next, but it looks like you save the file locally. The implementation looks a bit buggy though...
    Kind regards,
    Sigiswald

  • File upload functionality in oracle portal server

    I have got a struts portlet on oracle portal server 9.0.4.My functionality is to have a file upload facility. I tried to achieve it , but problem arises when i use any pdk taglibs like
    <pdk-html:link page="/ShowInitialSupportScreen.do?action=initial&levelOfAction=3">
    after uploading when i forward to a result.jsp. and in that file if i use a tag like above, it gives null pointer exception because
    httpservletrequest.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST)
    this returns null when my enctype is multipart/form-data. in the fileupload.jsp
    and the in the internal implementation of the pdk taglib it refers to the PortletRenderRequest from httprequest object.
    The following link says multipart is not supported by the Parallel Page Engine.
    Re: multipart/form-data jsp
    Do you have any idea on this issue. File upload seems to be a basic functionality but doesnt the Oracle portal Server support it?
    With kind regards,
    -Rafeeq

    I got the solution, we cannot achive file upload in portal server cos it does not support Multi-part Data . instead i achieved it by a separate struts application to upload and invoked it from my portal application in an popup window.

  • Handling file upload

    Dear Experts,
    I create a custom webdynpro java application. It has a form with file upload option. When I run the application in portal user uploads a file. After this he clicks submit button in the form. Here I triggger my workflow using FM. Now I want to make that form available as attachment in subsequent approval steps. Can you please how can I make the file uploaded in portal to be available as attachment in my workitem for approval.
    KR,
    Bharath

    Iam really sorry to mis lead you from the main issue,
    You are right you cannot pass the ZTSRING directly to workflow conatiner, so what you can do is before calling the fm SW_EVENT_CREATE try to convert the XSTRING into BINARY by using the FM SCMS_XSTRING_TO_BINARY this FM will give you the output in a table, so you can pass the binary table into workflow container.
    in the application global data INCLUDE <CNTN01>. and in the source code of the button action SWC_CREATE_CONATINER lt_cont.
    DATA lt_cont type table of SWCONT.
    then you can append the table into the cotnainer
    by using the macro
    SWC_SET_TABLE lt_cont <element Name of the workflow container> <table output of the FM SCMS_XSTRING_TO_BINARY>
    and pass this lt_cont to SWE_EVENT_CREATE tables parameter EVENT_CONTAINER.

  • Not able to view the uploaded PAR file in the portal archive selection.

    Dear All,
    I have modified com.sap.portal.runtime.logon.par and have renamed it to some other name.
    Now I have uploaded the par file.
    The problem is that when choose new from PAR option (to create iview from a par file),I am not able to see the par file in the Portal Archive selection.
    I also want to know that if I am able to call the par file in the iview, can I use this iview to have a portal login.
    Our requirement is that we want to give login page for the portal in the portal home page.The portal home page will be for the anonymous users.
    Kindly try to guide me

    Hi Nitin,
    Check ur Portalapp.xml file. If u have the following code in that just <b>remove</b> them
    <property name="com.sap.portal.pcm.Category" value="platform">
    <property name="inheritance" value="final"/>
    Deploy it again.now u can see that par in ur portal.Refer this thread also
    PAR File not seen
    Regards,
    Tamil K

  • Urgent : file upload / download functionality in oracle portal page

    Hi friends
    I am new to portal development and am working on oracle portal 9i rel2 . I need to know how to put the file upload and download functionality in any page. the functionality given in oracle portal user guide is not user friendly (i.e in the content area add item of type file" ) .... i need to now is their any way to achieve the simple , one button click upload download functionality ..like we do in yahoo mails etc.
    any help will be highly appreciated.
    regards
    Dheeraj

    Well, I do not know the exact location of the document, however you can find the document to do this in modplsql User Guide ..(File Upload/Download).
    I am pasting some hint:
    e.g.
    Create an html form..code something like this:
    <html>
    <head>
    <title>test upload</title>
    </head>
    <body>
    <FORM      enctype="multipart/form-data"
    action="pls/mydad/write_info"
    method="POST">
    <p>Author's Name:<INPUT type="text" name="who">
    <p>Description:<INPUT type="text" name="description"><br>
    <p>File to upload:<INPUT type="file" name="file"><br>
    <p><INPUT type="submit">
    </FORM>
    </body>
    </html>
    Create a table
    (who varchar2(..).
    description varchar2(..),
    file varchar2(..));
    Your procedure something like this:
    procedure write_info (
    who in varchar2,
    description in varchar2,
    file in varchar2) as
    begin
    insert into myTable values (who, description, file);
    htp.htmlopen;
    htp.headopen;
    htp.title('File Uploaded');
    htp.headclose;
    htp.bodyopen;
    htp.header(1, 'Upload Status');
    htp.print('Uploaded ' || file || ' successfully');
    htp.bodyclose;
    htp.htmlclose;
    end;
    You should be able to download/access the file using the following URL format:
    http://<host>:<port>/pls/<dad>/docs/<file_name>
    Where file name is = Look for the value in the "myTable" > file.
    Do tell how you get on this.
    Thanx,
    Chetan.

  • How can we limit uploading file size in portal.

    we have a feature where customers can upload there files, we use portals for uploading files, form which has the file type is posted to a stored procedure and which in turns calls the wwv_things.saveitem.
    we need to restrict a file size and file type for the uploading files, I can restrict the file type with javasript but wanted to find out if oracle portals has any way to restrict the uploading file size,
    thanks and regards,
    Sunil.

    Currently, this is not available. You could have a query that has all RKF as a starting point to achieve this. If you think this would be good to have by default, please log a development request on the OSS Messaging System.

  • How to upload a large size file to enterprise portal?

    Dear All,
    I want to upload a file to my portal but its size is around 500 MB so in single run it is not allowing me for the same.
    I tried to access that one via creating a external link from portal to local disk of server but it is also restricted if I access my portal from outside the LAN.
    So is there any other way to serve this purpose?
    Regards,
    Aditya

    Hi! aditya,
      i think you can get a better idea about portal Drive by following link -
    http://help.sap.com/saphelp_nw04/helpdata/en/42/C99B91341A6BADE10000000A1553F6/frameset.htm
    If i am not wrong, i think you are are talking about creating a Network Drive on your local machine,if yes then Network Drive and Portal drive are different.
    please read the ablove Document.
    regards,
    sahu

  • Uploading Itutor files(.sim) into Portal

    Hi All,
    Can you suggest me the procedure to upload Itutor files into the Portal
    Thanks in Advance

    For large files, the upload time through WebDAV is limited by
    1) the repository manager's performance and
    2) bandwidth.
    Thus it's unlikely you'll find a faster way, except one that doesn't require transferring the contents at all (such as CM repository in FSDB mode).
    WRT to IE vs Firefox: Microsoft's WebDAV client is not part of IE; so it doesn't matter which browser you use. Alternatively, use a third-party client (such as Portal Drive), or whatever your preferred operating system comes with.
    BR, Julian

  • How to download a file uploaded in the portal admin console

    Hi All ,
    I have created a content using admin console.
    It has a property called , "file", and it is of type "Binary".and its primary property
    I need to have link in JSP , to download that file/content.
    I am using <templates tag , but not able to download.
    Could you pls suggest how to download a file uploaded to admin console
    Thanks & Regards,
    Srinivas

    Srinivas,
    Check the WLP API http://e-docs.bea.com/wlp/docs102/javadoc/index.html?overview-summary.html
    Search for com.bea.content.manager.servlets.ShowBinaryServlet class and com.bea.content.manager.servlets.DownloadBinaryServlet class. You can use one of these depending on your requirment. I think there is not jsp tag for these classes so you have to use scriptlets.

  • File Upload UI element is not working properly inside Table Popin container

    Hi Expert,
    I created a table with popin, i placed file-upload UI element inside table popin contatiner.
    The file upload UI element is displaying properly but, when i click the browse button to select  the file, the file open dialog box is not popping out.
    will table popin support file-upload UI element inside it?
    it not is there any other way to call a file_open dialog box from inside the table popin.
    Thanks,
    James

    If you are on NetWeaver 7.01, you can try both the ACFUpDownload UI element or try creating your own FileUpload in Adobe Flex with Flash Islands.  ACFUpDownload requires the KPRO by default (which is why the same application isn't working for you), but you can write your own handler class to act as the KPRO receiver.  Here is an eLearning on the topic:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/109b9b52-bc00-2c10-8786-e4c5e96d7e04
    and source code:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70645070-bb00-2c10-f086-f126721acdb4
    If you want an eLearning on the FlashIslands approach, you can find it here as well:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50d42644-91ef-2b10-228c-9e0ae75b274e
    and Source Code:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f044b62c-90ef-2b10-64a6-9ec25294d133
    However in both of these approaches you still have to be careful with how you handle large files.  The problem is that they are processed often a single binary string.  This makes the processing easy, but requires total amount of session memory at least as large as the file being uploaded.  In NetWeaver 7.02 ABAP adds the concept of Streams and Locators to help with the partial processing of large files.  This feature doesn't come until later this year, but if you are interested you can learn about it here:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/80f983df-213e-2c10-ba89-b5a12ef178e8

  • File upload in KM throws a system exception: java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key xtlt_Required

    Hi All,
    We are on Netweaver 7.01 SP14. (well I understand we are way behind patch levels, but a simple file upload should be working ?/)
    We are trying to upload (HTML &/ Image) a file in one of the KM's public folder.
    As and when we select folder and click on upload we get the below message:
    Below is the error trace details:
    Full Message Text
    com.sapportals.wdf.WdfException
    at com.sapportals.wcm.control.edit.ResourceUploadControl.render(ResourceUploadControl.java:688)
    at com.sapportals.wdf.layout.HorizontalLayout.renderControls(HorizontalLayout.java:42)
    at com.sapportals.wdf.stack.Pane.render(Pane.java:155)
    at com.sapportals.wdf.stack.PaneStack.render(PaneStack.java:73)
    at com.sapportals.wdf.layout.HorizontalLayout.renderPanes(HorizontalLayout.java:73)
    at com.sapportals.wdf.stack.Pane.render(Pane.java:158)
    at com.sapportals.wdf.stack.PaneStack.render(PaneStack.java:73)
    at com.sapportals.wdf.layout.HorizontalLayout.renderPanes(HorizontalLayout.java:73)
    at com.sapportals.wdf.stack.Pane.render(Pane.java:158)
    at com.sapportals.wdf.stack.PaneStack.render(PaneStack.java:73)
    at com.sapportals.wdf.layout.HorizontalLayout.renderPanes(HorizontalLayout.java:73)
    at com.sapportals.wdf.stack.Pane.render(Pane.java:158)
    at com.sapportals.wdf.stack.PaneStack.render(PaneStack.java:73)
    at com.sapportals.wdf.WdfCompositeController.internalRender(WdfCompositeController.java:709)
    at com.sapportals.wdf.WdfCompositeController.buildComposition(WdfCompositeController.java:674)
    at com.sapportals.htmlb.AbstractCompositeComponent.preRender(AbstractCompositeComponent.java:33)
    at com.sapportals.htmlb.Container.preRender(Container.java:120)
    at com.sapportals.htmlb.Container.preRender(Container.java:120)
    at com.sapportals.htmlb.Container.preRender(Container.java:120)
    at com.sapportals.portal.htmlb.PrtContext.render(PrtContext.java:408)
    at com.sapportals.htmlb.page.DynPage.doOutput(DynPage.java:238)
    at com.sapportals.wcm.portal.component.base.KMControllerDynPage.doOutput(KMControllerDynPage.java:134)
    at com.sapportals.htmlb.page.PageProcessor.handleRequest(PageProcessor.java:133)
    at com.sapportals.portal.htmlb.page.PageProcessorComponent.doContent(PageProcessorComponent.java:134)
    at com.sapportals.wcm.portal.component.base.ControllerComponent.doContent(ControllerComponent.java:88)
    at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
    at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
    at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
    at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
    at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
    at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
    at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:645)
    at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
    at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
    at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
    at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
    at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:249)
    at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:557)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:430)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1064)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
    at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
    at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
    at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
    at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)
    --- Nested WDF Exception -----------------------
    java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key xtlt_Required
    at java.util.ResourceBundle.getObject(ResourceBundle.java:327)
    at java.util.ResourceBundle.getObject(ResourceBundle.java:324)
    at java.util.ResourceBundle.getString(ResourceBundle.java:287)
    at com.sapportals.wcm.util.resource.ResourceBundles.getString(ResourceBundles.java:55)
    at com.sapportals.wcm.control.base.WcmBaseControl.getBaseBundleString(WcmBaseControl.java:150)
    at com.sapportals.wcm.control.base.WcmBaseControl.getBaseBundleString(WcmBaseControl.java:176)
    at com.sapportals.wcm.control.edit.ResourceUploadControl.renderUploadFileContent(ResourceUploadControl.java:773)
    at com.sapportals.wcm.control.edit.ResourceUploadControl.render(ResourceUploadControl.java:655)
    at com.sapportals.wdf.layout.HorizontalLayout.renderControls(HorizontalLayout.java:42)
    at com.sapportals.wdf.stack.Pane.render(Pane.java:155)
    at com.sapportals.wdf.stack.PaneStack.render(PaneStack.java:73)
    at com.sapportals.wdf.layout.HorizontalLayout.renderPanes(HorizontalLayout.java:73)
    at com.sapportals.wdf.stack.Pane.render(Pane.java:158)
    at com.sapportals.wdf.stack.PaneStack.render(PaneStack.java:73)
    at com.sapportals.wdf.layout.HorizontalLayout.renderPanes(HorizontalLayout.java:73)
    at com.sapportals.wdf.stack.Pane.render(Pane.java:158)
    at com.sapportals.wdf.stack.PaneStack.render(PaneStack.java:73)
    at com.sapportals.wdf.layout.HorizontalLayout.renderPanes(HorizontalLayout.java:73)
    at com.sapportals.wdf.stack.Pane.render(Pane.java:158)
    at com.sapportals.wdf.stack.PaneStack.render(PaneStack.java:73)
    at com.sapportals.wdf.WdfCompositeController.internalRender(WdfCompositeController.java:709)
    at com.sapportals.wdf.WdfCompositeController.buildComposition(WdfCompositeController.java:674)
    at com.sapportals.htmlb.AbstractCompositeComponent.preRender(AbstractCompositeComponent.java:33)
    at com.sapportals.htmlb.Container.preRender(Container.java:120)
    at com.sapportals.htmlb.Container.preRender(Container.java:120)
    at com.sapportals.htmlb.Container.preRender(Container.java:120)
    at com.sapportals.portal.htmlb.PrtContext.render(PrtContext.java:408)
    at com.sapportals.htmlb.page.DynPage.doOutput(DynPage.java:238)
    at com.sapportals.wcm.portal.component.base.KMControllerDynPage.doOutput(KMControllerDynPage.java:134)
    at com.sapportals.htmlb.page.PageProcessor.handleRequest(PageProcessor.java:133)
    at com.sapportals.portal.htmlb.page.PageProcessorComponent.doContent(PageProcessorComponent.java:134)
    at com.sapportals.wcm.portal.component.base.ControllerComponent.doContent(ControllerComponent.java:88)
    at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
    at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
    at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
    at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
    at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
    at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
    at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:645)
    at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
    at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
    at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
    at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
    at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:249)
    at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:557)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:430)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1064)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
    at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
    at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
    at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
    at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176) 

    Hi Vijay,
    Thanks for the quick reply.
    I have gone through the notes 1535201  & now on 1606563  after your advise.
    Both the notes says the fix is available on 7.01 after SP 07 and we are on SP 14 already.
    Also just in case I did checked with our basis and they confirmed we are a head and we have the above notes in our release already.
    Unfortunately the notes are not the solution to the investigation till date.
    Thanks,
    Sai

  • 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

  • URGENT! File Upload Utility or a Custom UI for File Upload is needed!

    Hi all,
    I'm trying to find or develop a file upload utility or custom user interface rather than editing and adding file type item to a page. There is a free portlet for file upload in Knowledge Exchange resources, but it is for 3.0.9 release. I'm using portal 9.0.2.
    I could not any sample about the new release. Also API such as wwsbr_api that is used to add item to content areas is out dated.
    I create a page with a region for "items". When "edit" page and try to add an "file" type item the generated url is sth like this;
    "http://host:7779/pls/portal/PORTAL.wwv_additem.selectitemtype****"
    After selecting item type as a simple file autogenerated url is sth. like ;
    "http://host:7779/pls/portal/PORTAL.wwv_add_wizard.edititem"
    I made search about these API but could not find anything (in PDK PL/SQL API help, too).
    I need this very urgent for a proof of consept study for a customer.
    Thanks in advance,
    Kind Regards,
    Yeliz Ucer
    Oracle Sales Consultant

    Answered your post on the General forum.
    Regards,
    Jerry
    PortalPM

  • 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

Maybe you are looking for