JXL usage using Resource Type via Upload File UI Element

Looking for help on the following:
Using: Netweaver Developer Studio: 7.0.8
Created Library DC with jxl.jar library added
Rightclicked on jxl.jar and added to public part (Did this twice, once for api and the other for sda
Created WebDynpro DC, and included jxlDC as used DC, and is being referenced when I build and deploy the reference. 
Problem 1:  import statement isn't being added automatically, nor can it be found.  Any ideas as to the formatting of the import statement from the incoporated public part of the DC?
The library doesn't seem to be available via any of the standard paths.   
Does anyone have an example code snippet with the library import statement and the read from the IWDResource into a workbook object?
Thanks for any assistance, the blogs and pdfs regarding  fileuploadui don't address this info.

Hi Michael,
I believe the jxl jar file not been imported properly you need to re-import it, and then
Repair your project by right clicking on your application,
As per as lib is concern just click Navigator prospective, there you will see lib folder
and can import required jar file.
I hope it will solve your problem.
Thanks
Anup

Similar Messages

  • How to check the type of uploaded file

    Hi, experts,
    how can I check the type of the uploaded file? I am dealing with exception handling now: when user uploads a type of file which is not allowed, then error msg shows up. So first I have to retrieve the type of the uploaded file.
    Best regards,
    Fan

    Best approach would be to control the file upload program. Here in force user to chose only the kind of file supported.
    If you are using WD4A & fileupload UI element, then after user select a file to upload, before processing the file you can check the file name and get its MIME TYPE as shown below.
    example
    data type file string.
    data dot_offset type i.
    data extension type mimetypes-extension.
    data mimetype type mimetypes-type.
    file = 'Image.jpg'.
    " Find out file name extension
    find first occurrence of regex '\.[^\.]+$' in file match offset dot_offset.
    add 1 to dot_offset.
    extension = file+dot_offset.
    " Get mime type
    call function 'SDOK_MIMETYPE_GET'
      exporting
        extension = extension
    importing
        mimetype  = mimetype.
    later using if/else or CASE statement define your logic.
    Greetings
    Prashant
    P.S. Points Welcome

  • Problem using Resource Bundle in XSLT File

    Hi All,
    I've been trying to use Resource Bundle on my XSLT file with no success for the last 2 weeks. So I would like some help to definitely end this problem.
    The fact is that i have a property file that i would like to read and it works fine when i use jsp or a servlet however when i try to call the same property file using my XSL i get the message below:
    java.util.MissingResourceException: Can't find bundle for base name thoth, locale en_US
    Follow the code from my Stylesheet that i'm calling the resource bundle:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:java="java.util.ResourceBundle" exclude-result-prefixes="java" version="1.0">
    <xsl:strip-space elements="*"/>
    <xsl:output method="html" indent="yes" version="4.0"/>
    <xsl:output encoding="ISO-8859-1"/>
    <xsl:template match="page">
    <html>
    <body>
    <xsl:apply-templates select="paragraph"/>
    <xsl:variable name="resources" select="java:getBundle('thoth')"/>
    <xsl:value-of select="java:getString($resources,'general.title')"/>
    </body>
    </html>
    </xsl:template>
    </xsl:stylesheet>
    Please someone could help me why this file cannot be located, I am 100% of sure the property file path is in my classpath since it works fine in a servlet. Should i have to put it some other place? Do i have some other way to read this file and show the information from the file?
    I would appreciate any help
    thanks in advance and Regards
    Fabio

    Please someone could help me why this file cannot be located, I am 100% of sure the property file path is in my classpath since it works fine in a servlet.
    Is the property file in your classpath? or whether the directory where the property file is residing is in your classpath. Please put only the directory where the property file is located in the classpath and try again.
    It may be working fine with the servlet because j2ee servlet containers put the classes and lib directory automatically in the classpath therefore resource bundle gets loaded even without putting it explicitly in the classpath. This doesn't happen when you try to test some component from the console.
    Let me know if this does not work.
    regards,
    Abhishek.

  • Extends collection using generic type of org.w3c.dom.Element

    Hi, all.
    I am trying to extending collection using PriorityBlockingQueue.
    Extended queue is generic type of org.w3c.dom.Element.
    public class MyQueue<Element> extends PriorityBlockingQueue<Element> {***/}
    Compiler misunderstand to type of Element (as like E ?, not org.w3c.dom.Element), then methods in the code "this.peek ()" will be error reported by type difference.
    At fact, I tried it into MyQueue<Node> extends PriorityBlockingQueue<Node>, it not causes any misunderstanding.
    Is there any hack to indicates that the type is org.w3c.dom.Element ? This mean, MyQueue<org.w3c.dom.Element> extends PriorityBlockingQueue<org.w3c.dom.Element>...
    Thanks.

    public class MyQueue extends PriorityBlockingQueue<org.w3c.dom.Element>

  • Using Resource type in Netweaver 7.1 for file upload

    Dear All,
    I want to check the file extension and file size before uploading it through a file upload UI element in Web Dynpro 7.1.
    How to go about it? And I am using following code for image upload. Is it correct one?
    IWDResource photoData = wdContext.nodePhotos().getPhotosElementAt(i).getPhotoData();
    FtpURLConnection myConnection = new FtpURLConnection(myUrl);          
    myConnection.connect();                    
    OutputStream out = myConnection.getOutputStream();               
    int temp = 0;
    InputStream text = photoData.read(false);
    while((temp=text.read())!=-1)
            out.write(temp);
    out.flush();
    out.close();
    myConnection.close();               
    Kindly help.
    Regards,
    Amey Mogare

    Did you check [this|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a4d71] one?
    Bala

  • Using MIME type to open file in different window

    Hello, I am popping up a Save File Dialog Box for an Excel file being generated in my system using POI. I am using the MIME type to display this dialog. The problem is that if the user selects 'Open' instead of 'Save', it opens in the same window. Is there any way to set an attribute to tell it to open the file in a new, separate window?

    Nope. The response is sent to wherever the request came from. If you want the response to open in a new window then the HTML that sends the request has to say that.

  • Load form in xml format and resource type of .xml file is set to Embedded

    Getting Error in the Bold statements and again while it throws exception the catch statement is getting error
    oGlobalMain is the object of global class where every object is created and function is defined
    SBO_Application is declared as  Public WithEvents SBO_Application As SAPbouiCOM.Application
    #Region "Load as XML"
        Public Sub LoadAsXml(ByVal FileName As String, Optional ByVal FileType As ResourceType = ResourceType.Content)
            Dim oXmlDoc As Xml.XmlDocument
            Dim oXmlStream As System.IO.Stream
            oXmlDoc = New Xml.XmlDocument
            Try
                If FileType = ResourceType.Content Then
                    oXmlDoc.Load(FileName)
                Else
                    oXmlStream = System.Reflection.Assembly.LoadFrom(System.Windows.Forms.Application.ExecutablePath).GetManifestResourceStream(GetType(modStartUp).Namespace & "." & FileName)
                    oXmlDoc.Load(oXmlStream)
                End If
                oGlobalMain.SBO_Application.LoadBatchActions(oXmlDoc.InnerXml)
            Catch ex As Exception
                oGlobalMain.SBO_Application.MessageBox(ex.Message)
            End Try
        End Sub
    #End Region
    please send me some suggestion, I would be grateful to you.
    Thanks in advance
    regards
    Nandini

    Have you set oCompany.XmlAsString = true?
    Otherwise it is expecting an XML file location and not a string.

  • Uploading files from Elements Plus to Kodak

    Hi, I'm hoping that someone has an answer for this problem..I've made a calendar in Elements Plus and whenever I click the order button and the form comes up, it just keeps asking me for recipient's name and addy over and over. I can't get passed that. I would really appreciate any help anyone might have with this issue. Thanks in advance!

    Unfortunatly it is a bit more complicated than this as it involves sending the correct headers, indicating the boundaries of the multipart/form-data content, etc.
    I am not sure on the exact format of how this should be done in order for CGI to understand what I am sending to it.
    I have tried going through http://www.ietf.org/rfc/rfc1867.txt
    but it's still not working :(

  • Upload file form problem in JSP portlet !!!

    Hi!
    I use "OrdHttpUploadFile" class for upload file in JSP portlet to database!
    Problem is that this class must use FORM ENCTYPE="multipart/form-data" whis I suppose dont work in portlet!?
    Which FORM ENCTYPE should I use in portlet! Or there is some other solution for upload file in JSP portlet!?
    Thanks!
    Kristjan

    Thanks for u r reply Mr.Prasad.
    Sorry for the delay for reply.
    My scenario is in 2 phases
    Phase 1. I am taking input from the front end using jsp and writing the contents in to a file and then downloading that file on to my desktop.(Now let us say this one as file downloading)
    Phase 2. Now I had designed a page,which locates the downloaded file by using the following tag.
                        <td><input type ="file" name ="xmlFileName"></td>
        In the downloaded xml file I am having applicationid. I am checking whether the application id already xists in the database (or)not.
    If already exists in the database , the end user will get one confirmation msg,saying application already exists in the database.
    If the user clicks ok again the request has to go to the servlet.
    Now the actual problems are
    1. When I locate the file on the desktop let us say c:\desktop\krish and click on submit button, it is locating to the file that is present in the server(this is the case for the first time means before checking the application id in the database).
    2. when the end user clicks "ok" on the confirmation box , I am not getting the file name,that has to be submitted to the servlet.
    Can u plz help me how to resolve this issue.
    regards,
    Krish

  • Again JSF upload file problem.

    I am using My Faces to upload files. There is a way to limit the size of uploaded files.
    <filter>
            <filter-name>ExtensionsFilter</filter-name>
            <filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
            <init-param>
                <param-name>uploadMaxFileSize</param-name>
                <param-value>7m</param-value>
            </init-param>
            <init-param>
                <param-name>uploadThresholdSize</param-name>
                <param-value>100k</param-value>
            </init-param>
        </filter>When I try to upload bigger than 7 MB file, I receive the following log.
    2007-05-23 13:58:20,796 [http-8080-Processor24] INFO org.apache.myfaces.component.html.util.MultipartRequestWrapper - user tried to upload a file that exceeded file-size limitations.
    org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because it's size exceeds allowed range
         at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:317)
         at org.apache.myfaces.component.html.util.MultipartRequestWrapper.parseRequest(MultipartRequestWrapper.java:70)
         at org.apache.myfaces.component.html.util.MultipartRequestWrapper.getParameter(MultipartRequestWrapper.java:151)
         at org.apache.myfaces.context.servlet.RequestParameterMap.getAttribute(RequestParameterMap.java:39)
         at org.apache.myfaces.context.servlet.AbstractAttributeMap.get(AbstractAttributeMap.java:87)
         at org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getTreeStructureToRestore(HtmlResponseStateManager.java:181)
         at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreTreeStructure(JspStateManagerImpl.java:142)
         at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(JspStateManagerImpl.java:181)
         at org.apache.myfaces.application.jsp.JspViewHandlerImpl.restoreView(JspViewHandlerImpl.java:255)
         at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:113)
         at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:94)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)
    By now, OK. Here comes the problem: The behavior of application is correct after this, which I can see from the rest of my log, BUT my browser continue to say that the request is being processed and that the page continues to load, which is not true, and I can not find where is the reason.
    Do you have any idea?

    Check this code if it is useful
    REPORT  ZSRK_046                                .
    DATA : FIR_FILE(512) VALUE '
    iltlvp01.t.st.corp\DE_Development\EP 6\Port\dept\Program Office\TEST.json'.
    TYPES: BEGIN OF TP_DATA_TAB,
           TEXT(512),
           END OF TP_DATA_TAB.
    DATA : DATA_TAB TYPE STANDARD TABLE OF TP_DATA_TAB,
           WA_DATA_TAB LIKE LINE OF DATA_TAB .
    DATA : WA(512).
    OPEN DATASET FIR_FILE FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF SY-SUBRC EQ 0.
      DO.
        READ DATASET FIR_FILE INTO WA.
        IF SY-SUBRC NE 0.
          EXIT.
        ENDIF.
        WA_DATA_TAB-TEXT = WA.
        APPEND WA_DATA_TAB TO DATA_TAB.
        CLEAR : WA_DATA_TAB, WA.
      ENDDO.
    ENDIF.
    LOOP AT DATA_TAB INTO WA_DATA_TAB.
      WRITE : / WA_DATA_TAB-TEXT.
    ENDLOOP.

  • Error while uploading files to AWS S3

    Hello Experts
    SAP PI 7.31
    I am working on the following scenario. SAP PI receives a file attachment from SOAP response and the same needs to be uploaded to AWS S3 using REST (Advantco REST Adapter) (PUT Method):
    File --> SAP PI --> REST
                     ||
                   SOAP
    To do this without using BPM, I am using RequestResponseBean and ResponseOnewayBean in Sender_File Adapter. In the module parameters, I have mentioned the details of the REST receiver channel. I am using PUT method in Receiver_REST and have checked option "keep attachments"
    When I run this interface, the message fails while sending the file to Receiver_REST with the following errors:
    Sender_File: ResponseOnewayBean - Attempt to process file failed with com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.af.lib.ra.cci.XIAdapterException
    Receiver_REST Adapter: Error: Broken pipe (Software version: 1.0.11)
    This is the first time we are using REST Adapter to upload files to AWS S3. Could you please provide pointers on the same?
    Thanks
    Jaya

    05/08/17 11:22:31 java.io.IOException: java.io.IOException: sqlldr: not found
    Does the client m/c have sqlldr installed (it will need Oracle client installation)? Does it have the ORACLE_HOME/bin directory in whatever path is appropriate for the client OS?
    Cheers, APC

  • Resource Type

    HI all
    I have created new resource types. Its showing in the upload iView.
    Suppose I have resource types t1,t2,t3,t4.
    I want to show only limited resource types ie t1 and t2 to user group1 and
    t3 and t4 to user group 2.
    So how to hide some of the resource types while uploading?

    Hi Vinod,
    As per definition / configuration possibilities, resource types are not restrictable depending on UME principals, this is not possible by standard means.
    You would have to modify the upload command itself to implement this.
    Hope it helps nevertheless
    Detlev

  • How to upload file located on the network

    I used following API successfully upload file located on
    database machine. I
    got error when upload file located on network. I run this
    as "Portal30" user
    which has DBA priviledges.
    I used code like this.
    result:=wwsbr_api.add_item(p_caid=>53,
    p_folder_id =>4487,
    p_display_name => 'Test',
    p_type_id => wwsbr_api.ITEM_TYPE_FILE,
    p_type_caid => wwsbr_api.SHARED_OBJECTS,
    p_region_id =>5,
    -- these are not working
    p_file_filename=>'//nt2/vol2/common/test.pdf'
    p_file_filename=>'///nt2/vol2/common/test.pdf'
    p_file_filename=>'S:/common/test.pdf'
    -- this works
    p_file_filename=>'c:/test.pdf'
    Errors:
    ORA-29532: Java call terminated by uncaught Java exception:
    java.lang.NullPointer Exception
    ORA-06512: at "PORTAL30.WWSBR_API",line 24
    ORA-06512: at "PORTAL30.WWSBR_API",line 277
    PS: we tries run Oracle as a privileged user other than System
    user. it won't help. Am I missing something here. I am new on
    the network problem. How I can verify the privileged user access
    the network.
    we have portal 3.0.9.8.1 running on Windows 2000

    Thanks for the direction. I can upload same file through Oracle
    Portal "Add Item" user Interface. So I assume file is visible to
    the database. Notice the Portal uses wwv_additem.additem and
    wwv_add_wizard.edititem to upload file. Do they eventually use
    wwsbr_api.add_item and wwsbr_api.add_item_post_upload? What is
    syntax of reference file on remote drive?
    Thanks
    Linda

  • Down-/Upload files via Web Services using a NON-SAP system!?

    Hello,
    is it possible to down-/upload files via web services using a NON-SAP system!?
    Regards,
    Jens

    Hi Jens,
    I am not sure about your requirement here. What i could understand is that you want to check whether service could handle file processing?
    1) Uploading file - You can build a Webservice which has import/export parameters as the file structures and implement the proxy class in such a way that the passed data is written to application server.
    2) Downloading file - Same as uploading file, but the proxy class would have the code to extract data from the application server and pass them as output parameter.
    Functionality of Non SAP system: The system which calls these services should be able to convert the output of proxy data into file in case of downloading the file and it should be able to convert the file data into export parameters in case of uploading file.
    Hope this helps.
    Regards,
    Prasanna

  • Uploading File To MySQL from HTML form via Servlet

    Hello all !
    I hope this is better place to ask.
    I'm working on simple Servlet/Jsp application trying to hold to MVC pattern and got stuck on uploading file to MySQL db.
    Here's what I'm trying to accomplish:
    1) client submits a JPEG image via a simple html form on a webpage.
    2) JPEG is put into a database table, column field of type BLOB.
    3) Servlet processes the request, gets a connection to the db and inserts the image into the table.
    4) after that user is able to retrieve an image from db and display it in JSP page.
    This is pretty much the same task Angela was trying to do here:
    http://forum.java.sun.com/thread.jspa?threadID=667597&messageID=3905449
    I could use her snippets if i knew what is what and decided to figure out this myself. Aftet some investigation i found out that i need to import org.apache.commons.fileupload.*;which i found here: http://jakarta.apache.org/commons/fileupload/
    what am i driving at ?
    -----------------------1-----------------------
    After first line of code
    boolean isPart = FileUpload.isMultipartContent(request);netBeans 5.5 beta2 with bundled Tomcat 5.5.17 underlines this with warning saying that
    org.apache.commons.fileupload.FileUploadBase
    has been depreceted
    is it a reason for concern ?
    -----------------------2-----------------------
    Is it actually good idea to store images in db as blob ?
    what about large ammounts of text ?
    thank you
    -Dominik

    is it a reason for concern ?Yes.
    You should take a look at the method in the documentation and find out exact reason for depricating it.
    If it is depricated becouse they going to remove it in the future you should use the new alternative method becouse if you use the old method your app will not work in the future releases of the API.
    If it is depricated becouse it is not safe to use the method you should clearly understand the risks involved in using the method and see if that can give you any trouble in your project.
    -----------------------2-----------------------
    Is it actually good idea to store images in db as
    blob ?I think that it is ths best option available when you want to store binary data
    what about large ammounts of text ?You can use clob columns.
    By the way when you store files in the database its better you put some extra columns to store the file name and file type(mime) becouse you cant directly detect those things later by just looking at the data of the file.

Maybe you are looking for

  • Where can i buy a case for my ipod touch 5G 16 gb?

    I've looked every where, Walmart, Amazon, Best Buy, Ebay.!

  • Ibook g3 screen getting darker

    Hi, my ibook g3 screen is getting darker and darker. Yesterday I was able to see my wallpaper on the background, but today it's almost completly gone! The HD seem to work fine, I don't think it's a logicboard problem (I had to deal with that about tw

  • Airport express has to constantly be reset

    I just recently bought an airport express n. It works decently on my mac but when i print from my windows computer i have to reboot it after i print a document. Can anyone tell me why this is? WHat should i do?

  • XI Development Standards

    Does anyone know of or could provide standards/best practices for XI development? Including naming: namespaces, message interfaces, message types, etc. Our company is about to begin the implementation phase of our SAP implementation in January of 200

  • Powerbook 1.25 G4 and ilife 08

    Yes I was wondering I have a powerbook G4 1.25 and I see the new iLife 08 has come out and i have a question. Will the new iMove 08 work with a G4 processor or no? It looks like all the other programs will work with a G4 but iMoive will not. Will any