File Upload UI not Working

Hi all,
I am using File Upload UI for one my application, for that i created a context attribute of type
com.sap.ide.webdynpro.uielementdefinitions.Resource
, i placed one button which has the action whether any file was selected or not.
public void onActionuploadSelectedFile(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
    if(wdContext.currentContextElement().getCaResource()!=null)
         wdComponentAPI.getMessageManager().reportSuccess("File Selected");
    else
          wdComponentAPI.getMessageManager().reportSuccess("File not Selected");
i am getting the message 
File not Selected
when no file was seleted. But when i select a file i am not getting any message.
Kindly help me and let me know where is the actual problem....
Currently I am using NWDS 7.0.11
Thanks & Regards,
Chandran S

Hi,
Please carefully check the below properties(cardinality, selection && types) and bindings.
1. Create a value node(Ex: ctx_vn_FileData) of cardinality 0..1 and selection 0...1
2. Create a context attribute(Ex: ctx_va_FileResource) of 
    type "com.sap.ide.webdynpro.uielementdefinitions.Resource" under this node.
3. Check you binded this context attribute to resource property of FileUpload UI element.
4. Now you can get the value of this resource using below code.
IPrivateUploadFileKM_View.ICtx_vn_FileDataElement element = wdContext.currentCtx_vn_FileDataElement();
IWDResource resource = element.getCtx_va_FileResource();
4. You can get the resource(file) name & resource(file) extension using below code.
//Read the File
InputStream stream = resource.read(true);
String resourceName = resource.getResourceName();
String resourceExtn = resource.getResourceType().getFileExtension();
Check that you did all these as it is??
Regards,
Charan

Similar Messages

  • Export to Excel and File Upload is not working on ipad/IPhone

    Hi
    We have a site in ASP.Net 2008 which is running on browsers and devices. There is an option to export to excel and file uploadd, It is working in the browsers but not working in Devices like IPad and Iphone. we are creating xml file when export to excel. We have tried it on IPad1,IPad3 and iphone3.
    can you please elaborate the causes of these issues? Pleas support to fix the issues.
    Regards,
    Manoj

    How does your PL/SQL for the saving of uploaded files looks like? Where does this error happen? Does your process have an error message?
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • File upload is not working

    Hi
    The file upload (any kind static/image etc) is not working.
    It is giving error "No Data found". This happens only on certain PCs, on other PCs, it works fine.
    Have any one experience such issue ? I am not sure how to trouble shoot this, as there are no errors in Apache logs and no record created in wwv_flow_file_objects$.
    TIA
    DineshS

    How does your PL/SQL for the saving of uploaded files looks like? Where does this error happen? Does your process have an error message?
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Jakarta Commons -- File Upload does not work with Application Server

    Hi ALl,
    I tried Jakarta Commons file upload. In the netbeans, I copied the common jar files "commons-io-1.2.jar" and "commons-fileupload-1.1.1.jar" in the
    netbeans-5.5\enterprise3\apache-tomcat-5.5.17\common\lib and set the class paths. It is working correctly when I compile and run from the netbeans. However, when I deployed in Sun Application Server PE 9.0, I am receiving the following errors. In Sun application I copied the above jars files to "C:\Sun\AppServer\jdk\jre\lib\ext"..
    I have read in several postings that it does not work this way but could find any solution. Any idea will be greatly appreciated.
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/servlet/ServletInputStream
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:930)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:863)
         org.apache.jsp.fileUpload_jsp._jspService(fileUpload_jsp.java:109)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:353)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:409)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:317)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
         com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
         org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
         com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
         com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
         com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
         com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
         com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
         com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
         com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    root cause
    java.lang.NoClassDefFoundError: javax/servlet/ServletInputStream
         org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:116)
         org.apache.jsp.fileUpload_jsp._jspService(fileUpload_jsp.java:76)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:353)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:409)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:317)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
         com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
         org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
         com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
         com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
         com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
         com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
         com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
         com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
         com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    note The full stack trace of the root cause is available in the Sun Java System Application Server Platform Edition 9.0 logs.
    Sun Java System Application Server Platform Edition 9.0
    Thank you,
    --Sam                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi All,
    I solved this few minutes after I posted this question. Thought I should share with everybody, just in case some one else need it.
    I copied these three files in the folder C:\Sun\AppServer\jdk\jre\lib\ext
    1. servelet-api.jar
    2. commons-io-1.2.jar
    3. commons-fileupload-1.1.1.jar
    No need to set any class path.
    Thanks

  • Help:simple file upload example not working

    Request input on what's wrong with this -
    Using JDeveloper 10G.
    1) I created a simple jsp file upload file using the OJSP
    File Access Tag library options. With empty JSP file,I
    dropped in the httpUploadForm and the httpUpload tags.
    Now when I run this I get the following error stack on
    the web page.
    javax.servlet.jsp.JspTagException: Posted content type isnt multipart/form-data at oracle.jsp.webutil.fileaccess.tagext.HttpUploadTag.doStartTag(HttpUploadTag.java:130)at test4.jspService(test4.jsp:10)[test4.jsp]
    2)Now if I use a simple JSP without the tag library - the
    page fails to display. Found that commenting out the
    line "upbean.upload()" lets the page run and atleast
    show me the upload form. What's wrong with this
    standard example from the OC4J documentation -
    <%@ page import =
    "javax.servlet.http.*,
    java.io.*,
    java.util.*,
    oracle.jsp.webutil.fileaccess.*;" language="java" session="true" contentType="text/html;charset=windows-1252"
    %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Upload</title>
    </head>
    <body>
    <% String userdir = "mydir"; %>
    <form action="pUpload.jsp" ENCTYPE="multipart/form-data" method=POST>
    <br>
    File to upload: <INPUT TYPE="FILE" NAME="File" SIZE="50" MAXLENGTH="120" >
    <br>
    <INPUT TYPE="SUBMIT" NAME="Submit" VALUE="Send">
    </form>
    <jsp:useBean id="upbean" class="oracle.jsp.webutil.fileaccess.HttpUploadBean" >
    <jsp:setProperty name="upbean" property="destination" value="<%= userdir %>" />
    </jsp:useBean>
    <% upbean.setBaseDir(application, request);
    //upbean.upload(request);
    %>
    </body>
    </html>

    It's not clear from your post, but are you aware that the
    documentation is really showing multiple files?
    The doc examples are based on the ones you can try out by downloading the ojspdemos.ear file.
    They use discrete steps. For example, the fileUploadIndex.html contains the following
    This will call the form and set the action in the form to call the tag upload jsp file. The form will do the multi-part post and the tag upload file does display the text after the <upload:httpUpload> tag. I just re-ran the example to be sure.
    The same basic mechanism applies to the upload bean. That is it is called via:
    This is the only way that these can work because the upload code (beans & tags) both require a multi-part post. I hope this helps

  • File Upload Demo not working

    I downloaded the source for this from OTN for 6i & recompiled the forms & libraries in 9i & tried to run after following all the steps mentioned in the readme doc but the form does not show up, the jinitiator java console window shows loading f90all...jar file & UploadClient.jar.sig file & stops
    i have registered PJC using JavaKey as mentioned in the doc & also set the class path in the default.env file pointing to orahome/jdk/jre/bin/classic.
    Would any one throw light on what has gone wrong???
    Mahesh

    If you install the 9i demos from OTN, they include the fileupload sample and the installation does all the setup for you including the classpath etc.

  • File conversion is not working

    File conversion is not working.

    Using online services and it simply times out. I login and upload the file
    I want converted and it takes 5 mins or longer and then simply says the
    file conversion failed.
    I got one file to work, but it took like 12 tries.
    Very annoying and it's impossible to call and get a tech person to help.
    On Tuesday, February 11, 2014, PECourtejoie <[email protected]

  • I keep getting the message: "what should firefox do with this file" in Windows XP every time I want to download a file, e.g., adobe, excel, etc. How can this annoying message be deleted? The check box to "open file automatically" does not work!

    I keep getting the message: "what should Firefox do with this file" in Windows XP every time I want to download a file, e.g., adobe, excel, etc. How can this annoying message be deleted? The check box to "open file automatically" does not work!

    cor-el,
    Thanks for your prompt reply. However, the sources you gave do not seem to apply exactly to my situation. I have attached some screenshots that show what the dialogue box looks like for a pdf download, and what my settings in the Apps panel of Options are. You will note in the first screenshot that I have checked the box to handle this file type automatically; however, the next time I try to download a file of that type, the same dialogue box appears looking exactly like the one shown, so checking the "automatic" option appears to do nothing. The files to be downloaded from my Gmail messages are not generic or altered file types - they are shown as pdf, doc, docx, etc. So while your intent was good, your post did not help. Thanks anyway.

  • Hyperlink to file in JSP not working

    I have a JSP page where I am providing a hyperlink to a file on the C: drive as follows
    Try this
    Nothing happens when I click this hyperlink.
    When I scroll over the hyperlink I see the correct path "file:///C:/ReqImport/data.txt" in the status bar and when paste this path in my address bar, it does open up the file.
    Any ideas why this file hyperlink does not work on this JSP page.
    Thanks

    Hmm, you're right, I just tried it and it doesn't appear to work. It looks like a security thing: If the original page is on my hard drive, links to other files on my hard drive work. But when the original page is on a web server, links to files on my hard drive don't appear to work.
    Do you realize that such a link is referring to a file on the C: drive of the client, the user, not the C: drive of the server? I'm not sure what you're up to, but for most applications such a link is pretty much useless, as you normally have no way of knowing what files the user has on his C: drive.

  • Include file in jsp not working

    Hi ,
    I have an include file statement in my jsp file which is not working. Not getting any error message either only the page is displayed without the jsp file included.
    My include code looks like this :
    <%@ include file ="Includes/hello.jsp" %>Also i tried including an html file or an image in the same place neither of the two displayed.
    <!--#include virtual="includes/footer.html" -->
    My jsp file is hosted on IIS

    nb123 wrote:My jsp file is hosted on IIS
    Hi ,
    I have an include file statement in my jsp file which is not working. Not getting any error message either only the page is displayed without the jsp file included.
    My include code looks like this :
    <%@ include file ="Includes/hello.jsp" %>Also i tried including an html file or an image in the same place neither of the two displayed.
    <!--#include virtual="includes/footer.html" -->
    My jsp file is hosted on IIS
    Check the path you've specified. It may well be;
    <%@include file="hello.jsp" %>or
    <%@include file="/Includes/hello.jsp" %>

  • File sharing is not working from pc to imac os x 10.9.2

    file sharing is not working from pc to imac os x 10.9.2

    Hello there Karen,
    It sounds like you are having to power cycle your modem to get internet back every single day. We can start by troubleshooting your Airport Express to help isolate the issue. I would first perform a Soft Reset, then test the issue again. If needed as a last resort I would then perform a Hard Reset:
    Soft reset
    Connect the device to power and wait for it to complete its start up process. To learn more about the start up process, please see All about Wi-Fi base station Status Lights (LED).
    Press and hold the reset button with a pen, pencil, or straightened paperclip for 1 full second, then release it. The light (LED) will begin flashing amber, indicating that the device is in soft reset mode.
    From the AirPort menu bar item, choose the network created by the device (the network name does not change).
    Open AirPort Utility from Applications > Utilities.
    Select the base station, then click Edit (The Edit window will indicate that the base station is in Soft Reset mode).
    Move through the tabs to make changes to your passwords or other settings as needed, and click Update and Continue as required
    Quit AirPort Utility.
    Hard reset
    Press and hold the reset button with a pen, pencil, or straightened paperclip until you see the status light (LED) start to flash amber rapidly, which should occur after about five seconds.
    Release the button and the device will reset.
    Wait about a minute for the base station to finish restarting, then open AirPort Utility from Applications > Utilities.
    Select the base station from Other Wi-Fi Devices, then click Edit.
    Select the Other Options button.
    Select "Restore previous settings" and click Next until you get to the final window.
    AirPort Utility will indicate that Setup is complete. Click Done.
    Quit AirPort Utility.
    Resetting an AirPort base station FAQ
    http://support.apple.com/kb/ht3728
    Thank you for using Apple Support Communities.
    Cheers,
    Sterling

  • File manager still not working w 10.7.3combo

    Since installing lion (I started with 10.7.2) file manager is not working. Yes, I can force uit it and than it does but it is still very annoying and time consumin to do it 2-4 times a day. I was hoping that 10.7.3 will solv it. Than installed based on advice I received hee 10.7.3 compbo but the problem is still there.
    Do you know or have you run accross a thread that explains how to solve it?
    Advanced thats to anyone who can help
    Ruvy

    What is "file manager?"  Is that a piece of third-party software, or are you referring to the Finder?  If it's third-party software, you'll need to contact the developer for an update or fix.  If the Finder is not working (how is it not working?), then you could try some of the tips in Understanding upgrade nightmares.
    (Note that my pages contain links to other pages that promote my services, and this should not be taken as an endorsement of my services by Apple.)

  • The Open URL or File function is not working when I publish as a exe?

    The Open URL or File function is not working when I publish as a exe.  I have tried putting the exe in the same location as the files with no luck.  How do I get the buttons to function properly with a exe file.

    Have you set the Publish folder as a trusted location in Flash Global Security?
    If not, please read this post:
    http://www.infosemantics.com.au/adobe-captivate-troubleshooting/how-to-set-up-flash-global -security
    It may explain your issue.

  • Uploading files to website not working with Safari in Windows 7

    Safari version: 5.1.7
    OS: Windows 7
    Hi,
    I am a website owner, and I have a feature on my site where users can upload large (up to 50MB) music files to my server. The feature works in Firefox on OSX & Windows platforms and it also works in Safari on OSX. The uploading feature is not working with Safari for Windows. Do you have any idea why and how to fix this? It can't be an issue with my server as it works in other browsers fine and works fine in Safari for OS X.
    If you have any information on how to solve this or things for me to try to rectify this for use with Windows operating system it would be much appreciated.
    Thanks.

    GREAT NEWS!!!!
    I have solved this issue myself with some help from my a user on Microsoft Forums. The issue stems from the mime type of each Browser Chrome, IE, & Safari for Windows defaults as audio/wav. When the mime type is changed to audio/x-wav everything works. Firefox defaults to audio/x-wav and when changed to audio/wav it DOES NOT work.
    Once I input some code in my .php upload page to change the mimetype if audio/wav is detected everything works GREAT!!!
    So Here is what you need to do: Find your upload page and input this code:
    echo "<p>MIME Type: ".$_FILES["file"]["type"]."</p>";   
    right before your "If/then" statement of file type. For me it was near line 30 in my upload.php page, but I'm sure this is different for everyone.
    This will detect and DISPLAY the default mime type of your browser on the error page when your upload doesn't work. Once you know what mime type works for your file type then you can change your "if/then" statement for mime type upload to change your mime type to the correct one.
    I don't want to give the code here, because I'm sure it's specific to your file types and your site construction, but this should lead you on the right track.
    ***This is the solution if you ARE NOT ABLE to upload any certain file in a certain Browser. It has to do with mime type construction***
    I hope this helps others like it helped me!!!!!

  • Google documents - 'select files to upload' does not work with v 3.6.8 Firefox - several users have noticed this.

    Until Friday, I could upload documents using google's facility within Firefox . Suddenly, the 'select files to upload' stopped working. Internet Explorer does this ok.
    I noticed on the Google forum that several users have reported this and someone suggested it should be reported to Firefox as it works with other browsers. I am using Windows XP on a laptop.

    It is an issue that Google are aware of and are working on a solution. See [http://www.google.com/support/forum/p/Google+Docs/thread?tid=4f0369bdcf6fd7ff&hl=en "Select files to upload" not working in Firefox - Google Docs Help]
    (Thanks to Joolsa for the link)

Maybe you are looking for

  • My itunes doesn't save new music files to the itunes media folder, even though I have ticked the box in the preferences telling it do so...???

    Ok so, my itunes version is up to date, and I've located my itunes media folder... However, newly purchsed songs are not being backed up to the media folder, despite all the right options being ticked in the preferences box. This is immensly frustrat

  • How to Configure the Buttons on the QAF for Mobile UI Screens...

    Hi Experts, I am in a serious need of help from the experts who already designed the Mobile UI screens. I have built a add-on where now we are looking this add-on to be available to use in mobile applications also. Now here what I did is I have devel

  • Problem in create query

    Hai good afternoon to all, When i execute create query in oracle9i{create table t1 as(select * from t6)} it shown error like that ERROR at line 1: ORA-01536: space quota exceeded for tablespace 'SYSTEM' Please tell me the solution..

  • External Speaker gave out.

    My external speaker gave out during a phone conversation on my 3 GS iphone.  I can hear through the internal speaker or with the earplugs attached.  I cannot hear through the external speaker nor does my phone ring so that I can hear it.  Is there a

  • Help with a basic query

    Hello I am looking at a set of records and need to query them but cannot work out what syntax to use to get the desired result. This is the query for the basic data SELECT SCE_STUC, SCE_CRSC, SCE_STAC FROM SRS_SCE WHERE SCE_AYRC = '2009/0' and Sce_st