FileUpload component

Hi!
I am using the fileupload component as follows
<hx:fileupload styleClass="fileupload" id="fileupload1" size="100"
    value="#{pc_Infosociete.newsociete.plan_acces}">
     <hx:fileProp name="fileName" />
     <hx:fileProp name="contentType" />
</hx:fileupload>but when I choose a file the value that I get in my property is encoded.
For example if I choose the file c:\log.txt I get the following value "TGUgMjcvMDQvMDUg4CAxMjowNjozO".
How can I do to get the right path? I would like to store this value in a database.
Thanks for your help.
Didi

I have this requirement as well. I need to somehow get the path Name of the file for further use. I see that not so readable data is popping out. Did you guys find this out. Please help.

Similar Messages

  • Using FileUpload component in Internationalized application (Bug?)

    Good part of a day, community.
    Is there bug in the component?
    Page Encoding is UTF-8
    Locale Encoding is Windows-1251
    Browser is Mozilla FireFox 1.5.0.7
    If I have page without FileUpload component everything works ok.
    But when I place on page FileUpload component character encoding become corrupted.
    I have made test page.
    Place on page TextArea, FileUpload, button components.
    Enter into TextArea any text in locale encoding different from English. I have used Cyrilic Windows-1251
    Push the button and you will see text in text will be corrupted.
    Delete FileUpload component. Everything will be ok
    Does anybody deal with tis issue?

    I believe this is bug: 6453360. It has been fixed but only in Netbeans Visual Web Pack version. This fix has not been backported yet.
    Lark

  • FileUpload component for jsf 1.1 RI

    I have a serious problem with finding working component for file upload
    i can't upgrade to jsf 1.2 i must use 1.1 RI
    I tired tomahawk comonent same as here: http://www.onjava.com/pub/a/onjava/2005/07/13/jsfupload.html?page=last
    but i doesn't work because uploaded file is always null because of enctype="multipart/form-data" in form element, same problem as somebody in comments.
    Then I tried ADF faces such as here: http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/installation.html#Dependencies
    and here
    http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/devguide/fileUpload.html
    but i didn't managed to get throught configuration because i can't find adfshare.jar anywhere, it is not included in adf-faces-10_1_3_0_4.zip and I need oracle.adf.view.faces.webapp.AdfFacesFilter whitch is propably in the missing jar. This result as 404 error for all jsf pages :(
    Does anyone managed to get somehow working file upload component with netbeans 5.5, tomcat 5.5 jsf 1.1 RI.
    Pleas help.

    It might be bad form to push your own library, but. :P
    You might check out the RI Sandbox, which has a calendar component. It should work in 1.1, but, if it doesn't, let me know and I'll make sure it does. :)
    http://blogs.steeplesoft.com/2007/02/23/sandbox-demo-and-nightlies-available/

  • How to add file type fiter in FileUpload component in Java Web Dynpro

    Hi All,
      In FileUpload UI, i want to set file type filter, for example as *.PDF, *.JPG, is that possibel in Java WebDynpro?
    Thanks a lot!
    Huang Jia

    hi!
    you can achieve this filter thing of file type by just taking some strings for diffrent types as extension and assign those to the resource type .
    eg.
    String extension = ".doc";
    WDWebResourceType.getWebResourceTypeForFileExtension(extension));

  • Fileupload component loose selected file information.

    I am using a JSF upload component to store images on the server side. Therefore, I add an upload tag and a simple button to my test JSP. The button should only refresh the page by calling the action method with a return value null.
    <snip>
    <ui:upload binding="#{AddProduct.fileUploadSnapshot1}" id="fileUploadSnapshot1"/>
    <ui:button action="#{AddProduct.buttonCalc_action}" binding="#{AddProduct.buttonCalculate}" id="buttonCalculate" immediate="true" text="#{internationalizing.add_product_ButtonCalculateText}"/>
    <snip>
    Note, the button is only used for testing, it should only refresh the page.
    Here the method buttonCalc_action from AddProduct.java:
    <snip>
    public String buttonCalc_action() {
    // NOTE: Process the button click action. Return value is a navigation
    // case name where null will return to the same page.
    System.out.println("buttonCalc_action");
    return null;
    <snip>
    Problem:
    If you choose a file with the JSP upload component the corresponding file location is shown within the component (text field). After trigger the button the page will be rerendered, because the action method returns null as navigation rule.
    The page will be rerendered as expected, but the file location within the upload component is lost.

    This is expected behavior given the security restrictions concerning the type=file input in HTML. It is not a bug or limitation introduced by JSF.

  • UIX: event submission with fileUpload component.

    Hi,
    Is it possible to have some event submission when a file is selected in a UIX file upload component.
    I want to be able to trap the event and update the page to display the file name and a "Update" button.
    I want to implement the ADF upload file functionality in a UIX page.
    Any pointers would be be very helpful.
    Thanks.

    Ahhh, I needed the line
    <code>
    myForm.setEncodingType("multipart/form-data");
    </code>
    I should read more!
    Shame I can't reward myself the points
    Patrick.

  • UIX fileUpload component

    How it works!
    Could anyone help!

    Let me try that again. Here is the bottom:
    String display = fieldRowLeading.getAttribute("DisplayName").toString();
    %>
    <uix:option selected="False" value="<%=field%>" text="<%=display%>" longDesc="<%= desc%>" />
    </jbo:RowsetIterate>
    </uix:contents>
    </uix:list>
    </uix:leading>
    <uix:trailing>
    <uix:list multiple="true">
    <jbo:RowsetIterate datasource="dsUsedDisplayFields" userange="false" >
    <jbo:Row id="fieldRowTrailing" datasource="dsUsedDisplayFields" action="Active"/>
    <% String field = (String)fieldRowTrailing.getAttribute("FieldName");
    String desc = (String)fieldRowTrailing.getAttribute("Description");
    String display = (String)fieldRowTrailing.getAttribute("DisplayName");
    %>
    <uix:option selected="False" value="<%=field%>" text="<%=display%>" longDesc="<%= desc%>" />
    Long postings are being truncated to ~1 kB at this time.

  • Dynamic Error Message from a Bundle Showed in a rich:fileUpload

    Hello.
    There is a way to show a dynamic error message from a bundle (i.e, There is a problem in the word {0} in line {1}.) in a rich:fileUpload after the Managed Bean method in fileUploadListener="#{MyManagedBean.myMethod}" attribute was performed? That's because the error message parameters are discovered only after the MyManagedBean.myMethod execution.
    As far I know, I'm able only to show a static message with transferErrorLabel="#{myBundle.myErrorMessage}" attribute.
    Here is my rich:fileUpload component code:
      <rich:fileUpload id="upload"   
         fileUploadListener="#{PlanilhaManagedBean.importar}"  
         maxFilesQuantity="100" 
         immediateUpload="true" listHeight="130" acceptedTypes="xls"  
         addControlLabel="#{bundle.geralProcurarArquivo}" 
         ontyperejected="alert('#{bundle.geralExtensaoInvalida}')"    
         cancelEntryControlLabel="#{bundle.geralCancelar}" 
         clearAllControlLabel="#{bundle.geralLimparTudo}"     
         clearControlLabel="#{bundle.geralLimpar}" 
         doneLabel="#{bundle.geralArquivoTransferidoComSucesso}"  
         progressLabel="#{bundle.geralTransferindoArquivo}" 
         stopControlLabel="#{bundle.geralParar}"  
         stopEntryControlLabel="#{bundle.geralParar}" 
         transferErrorLabel="#{bundle.geralErroNaTransferenciaDoArquivo}" /> Any idea?
    Thanks in advance.

    Hi, BalusC. Thanks for your reply.
    I already tried that. I put a navigation-rule in faces-config.xml to the same page of the rich:fileUpload, but the rich:fileUpload component doesn't starts a get or a post request. So the navigation-rule is ignored and the page wasn't rendered again.
    I also tried to put the <a4j:support ...> in the rich:fileUpload to re-render the <h:messages ...> component, but didn't work too. The <h:messages ...> wasn't re-render.
    Thanks in advance.
    Edited by: reolca on May 10, 2009 5:40 AM

  • FileUpload problem: InputStream does not contain a serialized object

    Hi All,
    I'm using the FileUpload component in a JSPDynPage and the htmlb component seems to work fine but I cannot read the file (InputStream). I get the following error(IOException): "InputStream does not contain a serialized object".
    Please let me know what is wrong with my code. This is a part of the code I used:
    public FileInputStream sourceFileInput;
    public ObjectInputStream input;
    FileUpload fu;
    fu = (FileUpload) this.getComponentByName("myFileUpload");
    IFileParam fileParam = ((FileUpload) getComponentByName("myFileUpload")).getFile();
    File f       = fileParam.getFile();
    file         = fu.getFile().getFile();
    absolutepath = fu.getFile().getFile().getAbsolutePath();
    this.sourceFileInput = new FileInputStream(file);
    input = new ObjectInputStream(sourceFileInput);
    The last line of code seems to generate te error.

    Hi,
    I have found the answers, thank you both.
    (I included the examle code. Perhaps of some use to someone.)
    FileUpload fu;
    fu = null;
    fu = (FileUpload) this.getComponentByName("myFileUpload");
    //       this is the temporary file
    if (fu != null) {
         IFileParam fileParam = ((FileUpload) getComponentByName("myFileUpload")).getFile();
         if (fileParam != null) {
              // get info about this file and create a FileInputStream
              File f = fileParam.getFile();
              if (f != null) {
                   try {
                        fis = new FileInputStream(f);
                   // process exceptions opening files
                   catch (FileNotFoundException ex) {
                        myBean.setMessage(
                             "1" + f + ex.getLocalizedMessage());
                   isr = new InputStreamReader(fis);
                   br = new BufferedReader(isr);
    String textLine = "";
    do {
         try {
              textLine = (String) br.readLine();
         } catch (IOException e) {
              myBean.setMessage(
                   "1" + e.getLocalizedMessage());
         // Jco append table & put data into the record
         // (I_FILE is the table with txt data that is sent to the RFC)
         I_FILE.appendRow();     
         I_FILE.setValue(textLine, "REC");                              
    } while (textLine != null);

  • File upload component problem

    hi,
    When i use fileupload component in my page, Turkish characters is not renderind and i see them as question mark. Changing page encoding is not working and solving my problem, too.
    any suggestion would be appreciated.
    Regards...

    I got exact the same problem, but with Chinese characters display. Does that means we can only use upload with English characters? Any solutions in the future?
    Thanks,

  • Richfaces fileupload with myfaces 1.1.5. Cant make it work

    Hello ,
    I am a newbie to jsf technologies. I use myfaces 1.1.5 with tomcat 5.5 and richfaces 3.2.0 and trying to use richfaces fileupload component. I use netbeans IDE. When i try to run the project it fails building the project and the error in tomcat log is like below.
    16.Tem.2008 11:11:47 org.apache.catalina.core.StandardContext listenerStart
    SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
    java.lang.NoClassDefFoundError: javax/faces/component/ActionSource2
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
            at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1853)
            at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:875)
            at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1330)
            at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
            at java.lang.Class.getDeclaredConstructors0(Native Method)
            at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
            at java.lang.Class.getConstructor0(Class.java:2699)
            at java.lang.Class.newInstance0(Class.java:326)
            at java.lang.Class.newInstance(Class.java:308)
            at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:896)
            at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:945)
            at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:426)
            at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:348)
            at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
            at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
            at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1116)
            at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1214)
            at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
            at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
            at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1306)
            at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
            at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579)
            at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1559)
            at java.lang.Thread.run(Thread.java:619)I guess it is about the expression language i use in my jsp page. I made it work with jsf 1.2 and tomcat 6.0. But i need to do it with tomcat 5.5 now. Is the expression language different with servlet 2.4 version ? My jsp page is below :
    <%--
        Document   : main
        Created on : 15.Tem.2008, 17:38:00
        Author     : brhn
    --%>
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
    <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>JSP Page</title>
        </head>
        <body>
            <f:view>
                <h:form id="fileUpload" enctype="multipart/form-data">
                    <rich:fileUpload                  
                        acceptedTypes="txt"
                        maxFilesQuantity="2"
                        uploadData="${upload_backing.data}"
                        fileUploadListener="${upload_backing.fileUploadListener}"
                    />
                </h:form>
            </f:view>
        </body>
    </html>and my web.xml is this
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
        <session-config>
            <session-timeout>
                30
            </session-timeout>
        </session-config>
        <welcome-file-list>
            <welcome-file>index.jsp</welcome-file>
            </welcome-file-list>
            <context-param>
            <param-name>org.richfaces.SKIN</param-name>
            <param-value>blueSky</param-value>
        </context-param>
        <filter>
            <display-name>RichFaces Filter</display-name>
            <filter-name>richfaces</filter-name>
            <filter-class>org.ajax4jsf.Filter</filter-class>
        </filter>
        <filter-mapping>
            <filter-name>richfaces</filter-name>
            <servlet-name>Faces Servlet</servlet-name>
            <dispatcher>REQUEST</dispatcher>
            <dispatcher>FORWARD</dispatcher>
            <dispatcher>INCLUDE</dispatcher>
        </filter-mapping>
        </web-app>I cant get what is the problem. Anyone has any idea ? I really need to make this work.

    Yea i solved the problem. I mean at least i know what is the problem :) As you said richfaces 3.2.0 is not working with jsf 1.1. Richfaces 3.1.6 works fine with it. But the funny thing is there is no file upload component in 3.1.6 version :) So, i am using myfaces.

  • FileUpload problem

    Hello all,
    I'm using the FileUpload component in a JSPDynPage but it does not seem to work for me. The problem is a lot like the one Patrick O'Neill asked about. I used the HTMLB example but for some strange reason variable fu remains NULL. Please have a look at my code and explain to me what the problem is. The JSP contains a file upload component and a button to start the upload event.
    This is the java code I used (testprogram):
    import com.sapportals.htmlb.enum.ButtonDesign;
    import com.sapportals.htmlb.event.Event;
    import com.sapportals.htmlb.page.DynPage;
    import com.sapportals.htmlb.page.PageException;
    import com.sapportals.portal.htmlb.page.JSPDynPage;
    import com.sapportals.portal.htmlb.page.PageProcessorComponent;
    import com.sapportals.portal.prt.component.IPortalComponentContext;
    import com.sapportals.portal.prt.component.IPortalComponentProfile;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    // for htmlb upload
    import java.io.File;
    import com.sapportals.htmlb.rendering.IFileParam;
    import com.sapportals.htmlb.FileUpload;
    // for debugging
    import com.sapportals.portal.prt.runtime.PortalRuntime;
    import com.sapportals.portal.prt.logger.ILogger;
    import com.sapportals.portal.prt.logger.Level;
    import bean.FileUploadBean;
    public class FileUploadExample extends PageProcessorComponent {
        public DynPage getPage() {
            return new RealJSPDynPage();
        public class RealJSPDynPage extends JSPDynPage {
              FileUploadBean myBean;
              private ILogger defaultLogger = PortalRuntime.getLogger();
            public RealJSPDynPage() {
            public void doInitialization() {
                   // Get the request, context and profile from portal platform
                    IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
                    IPortalComponentContext myContext = request.getComponentContext();
                    IPortalComponentProfile myProfile = myContext.getProfile();
                   defaultLogger.setActive(true);
                   defaultLogger.setLevel(Level.ALL);
                    // Initialization of bean
                    FileUploadBean myBean = new FileUploadBean();
                    setBeanFromProfile(myProfile, myBean);
                    // Put the bean into the application context
                    myContext.putValue("myBeanName", myBean);
            public void doProcessAfterInput() throws PageException {
                   // Get the request, context and profile from portal platform
                    IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
                    IPortalComponentContext myContext = request.getComponentContext();
                    IPortalComponentProfile myProfile = myContext.getProfile();
                    // Get the bean from application context
                    myBean = (FileUploadBean) myContext.getValue("myBeanName");
                    setBeanFromProfile(myProfile, myBean);
             public void doProcessBeforeOutput() throws PageException {
                        setJspName("fileupload.jsp");
              public void onClick(Event event) throws PageException {
                   myBean.setText("I was clicked");
                 String ivSelectedFileName;
                   FileUpload fu = (FileUpload) this.getComponentByName("myfileupload");
                   // debug info message, other option is: severe
                   defaultLogger.info(this, "Hello this is a test");
                   if (fu == null) {
                        // error
                        defaultLogger.severe(this, "strange error");
    //       this is the temporary file
                   if (fu != null) {
    //       Output to the console to see size and UI.
                      System.out.println(fu.getSize());
                      System.out.println(fu.getUI());
                      defaultLogger.info(this, String.valueOf(fu.getSize()));
                      defaultLogger.info(this, fu.getUI());
    //       Get file parameters and write it to the console
                      IFileParam fileParam = fu.getFile();
                      System.out.println(fileParam);
    //       Get the temporary file name
                      File f = fileParam.getFile();
                      String fileName = fileParam.getFileName();
                      defaultLogger.info(this, fileName);
    //       Get the selected file name and write ti to the console
                      ivSelectedFileName = fu.getFile().getSelectedFileName();
                      System.out.println("selected filename: "+ivSelectedFileName);
                      defaultLogger.info(this, "selected filename: "+ivSelectedFileName);
              private void setBeanFromProfile(IPortalComponentProfile myProfile, FileUploadBean myBean) {
                        // FileUpload properties
                        myBean.setSize(myProfile.getProperty("size"));
                        myBean.setMaxLength(myProfile.getProperty("maxLength"));
                        myBean.setAccept(myProfile.getProperty("accept"));
                        // Button properties
                        myBean.setDisabled(myProfile.getProperty("disabled"));
                         myBean.setDesign(ButtonDesign.getEnumByString(myProfile.getProperty("design")));
                         myBean.setEncode(myProfile.getProperty("encode"));
                         myBean.setText(myProfile.getProperty("text"));
                         myBean.setTooltip(myProfile.getProperty("tooltip"));
                         myBean.setWidth(myProfile.getProperty("width"));
    This is the JSP:
    <%--- FileUpload.jsp --%>
    <%@ taglib uri= "tagLib" prefix="hbj" %>
    <%--- Get the Bean named myBeanName from the application context --%>
    <jsp:useBean id="myBeanName" scope="application" class="bean.FileUploadBean" />
    <hbj:content id="myContext" >
      <hbj:page title="Template for a portal component">
       <hbj:form id="myFormId" encodingType="multipart/form-data">
         <hbj:fileUpload
                      id="myFileUpload"
                      size="<%=myBeanName.getSize() %>"
                      maxLength="<%=myBeanName.getMaxLength() %>"
                      accept="<%=myBeanName.getAccept()%>">
         </hbj:fileUpload>
         <hbj:button
              id="MyButton"
              text="<%=myBeanName.getText() %>"
              width="<%=myBeanName.getWidth() %>"
              tooltip="<%=myBeanName.getTooltip() %>"
              onClick="click"
              design="<%=myBeanName.getDesign().getStringValue() %>"
              disabled="<%=myBeanName.isDisabled() %>"
              encode="<%=myBeanName.isEncode() %>">
         </hbj:button>
       </hbj:form>
      </hbj:page>
    </hbj:content>
    The Bean:
    package bean;
    import com.sapportals.htmlb.enum.ButtonDesign;
    public class FileUploadBean
         // FileUpload
         public String size;
         public String maxLength;
         public String accept;
         public String getSize() {
              return size;
         public void setSize(String size) {
              this.size = size;
         public String getMaxLength() {
              return maxLength;
         public void setMaxLength(String maxLength) {
              this.maxLength = maxLength;
         public String getAccept() {
              return accept;
         public void setAccept(String accept) {
              this.accept = accept;
         // Button
         public String disabled;
         public ButtonDesign design;
         public String encode;
         public String text;
         public String tooltip;
         public String width;
         // constructor
    //     public ButtonBean() {
         public String isDisabled() {
              return disabled;
         public void setDisabled(String disabled) {
              this.disabled = disabled;
         public ButtonDesign getDesign() {
              return design;
         public void setDesign(ButtonDesign design) {
              this.design = design;
         public String isEncode() {
              return encode;
         public void setEncode(String encode) {
              this.encode = encode;
         public String getText() {
              return text;
         public void setText(String text) {
              this.text = text;
         public String getTooltip() {
              return tooltip;
         public void setTooltip(String tooltip) {
              this.tooltip = tooltip;
         public String getWidth() {
              return width;
         public void setWidth(String width) {
              this.width = width;
    and the Portalapp.xml
    <?xml version="1.0" encoding="utf-8"?>
    <application>
      <application-config>
        <property name="startup" value="true"/>
        <property name="SharingReference" value="htmlb"/>
      </application-config>
      <components>
        <component name="FileUpload">
          <component-config>
            <property name="ClassName" value="FileUploadExample"/>
            <property name="SecurityZone" value="com.sap.portal.pdk/low_safety"/>
          </component-config>
          <component-profile>
            <property name="maxLength" value="125000">
              <property name="personalization" value="dialog"/>
            </property>
            <property name="accept" value="Accept">
              <property name="personalization" value="dialog"/>
            </property>
            <property name="size" value="50">
              <property name="personalization" value="dialog"/>
            </property>
            <property name="width" value="250">
              <property name="personalization" value="dialog"/>
              <property name="type" value="number"/>
            </property>
            <property name="disabled" value="FALSE">
              <property name="personalization" value="dialog"/>
              <property name="type" value="boolean"/>
            </property>
            <property name="encode" value="True">
              <property name="personalization" value="dialog"/>
              <property name="type" value="boolean"/>
            </property>
            <property name="tooltip" value="Initial Tooltip">
              <property name="personalization" value="dialog"/>
            </property>
            <property name="text" value="Initial Button Text">
              <property name="personalization" value="dialog"/>
            </property>
            <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
            <property name="design" value="STANDARD">
              <property name="personalization" value="dialog"/>
              <property name="type" value="select[STANDARD,SMALL,EMPHASIZED]"/>
            </property>
          </component-profile>
        </component>
      </components>
      <services/>
    </application>

    Hi Raymond,
    within your JSP, you have given the ID "myFileUpload" whereas within your coding you try to retrieve a component with ID "myfileupload". That's all so far.
    Some additinal hints:
    When referring to another thread, please give the link; in this case, you talked about Problem with FileUpload component
    If you give (non) working examples, please reduce them to an absolute minimum, so that they show what they should show, but nothing more. This does not only hold on SDN but for all bug tracking systems. People get ill from reading 1000 lines of code where 10 would do
    And for formatting on SDN, you can use [ code ] and [/ code ] (without spaces), makes life easier too.
    And don't forget to press the yellow star button on helping answers...
    So far for today
    Hope it helps
    Detlev

  • Changing FileUpload File-Extension preset ?

    Hi Everybody !
    I'm new to WebDynpro for ABAP and looking for a way of replacing the "All files (.)" Setting in the ABAP FileUpload component, since I want only .xml files to be uploadable. Any Ideas ?
    Thanks in Advance,
    Cheers
    Michael
    Edited by: Michael Merzbach on Mar 12, 2008 2:24 PM

    hi michael......
           what you can do is........
           you can give *.xml as a default value for the atttribute that is bound to the fileupload... so that the file name will be displayed as .txt.. but you cannot change the file type.
    ---regards,
       alex b justin

  • Use jakarta fileupload

    Hello!
    I'm using java studio creator 2 update 1, and i'm using fileupload of jakarta, and i need to send a file to a ftp, but i don't undersant how to do this...
    DiskFileUpload upload = new DiskFileUpload();
    upload.setSizeMax(50*1024*1024); //50Mb
    upload.setRepositoryPath("c:/temp");
    i don't know how to continue...
    Someone have an example of this component?

    Did you try the FileUpload component comes bundled with Creator 2U1.
    - Winston
    http://blogs.sun.com/winston

  • Apache FileUpload - what version of Tomcat can run it?

    Hi. I'm trying to use the Apache Commons FileUpload component (http://commons.apache.org/fileupload). It works fine on my local PC (Java 1.5.0_15) but fails on the Unix server running Tomcat 4.1.29 and Java 1.4.2_12-b03. I've got the latest version of the upload component in the WEB-INF/lib folder. It throws this error (included only the top section; there are more, similar errors having to do with each fileupload component call). Do I need an older version of the upload component to work with this version of Tomcat and Java? If so, which version do I need to download? The oldest I could find dated to 2003. Thanks.
    The server encountered an internal error () that prevented it from fulfilling this request.
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 15 in the jsp file: /fpauto/viewPremiums.jsp
    Generated servlet error:
    [javac] Compiling 1 source file
    /usr/local/jakarta-tomcat-4.1.29/work/mywork/fpauto/viewPremiums_jsp.java:12: package org.apache.commons.fileupload does not exist
    import org.apache.commons.fileupload.FileItem;
    ^/usr/local/jakarta-tomcat-4.1.29/work/mywork/fpauto/viewPremiums_jsp.java:14: package org.apache.commons.fileupload.servlet does not exist^
    ^import org.apache.commons.fileupload.servlet.ServletFileUpload;^
    /usr/local/jakarta-tomcat-4.1.29/work/mywork/fpauto/viewPremiums_jsp.java:15: package org.apache.commons.fileupload.disk does not exist
    import org.apache.commons.fileupload.disk.DiskFileItemFactory;
    ^/usr/local/jakarta-tomcat-4.1.29/work/mywork/fpauto/viewPremiums_jsp.java:16: package org.apache.commons.fileupload does not exist^
    ^import org.apache.commons.fileupload.FileUpload;^
    /usr/local/jakarta-tomcat-4.1.29/work/mywork/fpauto/viewPremiums_jsp.java:74: cannot resolve symbol
    symbol : class DiskFileItemFactory
    location: class org.apache.jsp.viewPremiums_jsp
    DiskFileItemFactory factory = new DiskFileItemFactory();
    An error occurred at line: 15 in the jsp file: /fpauto/viewPremiums.jsp
    Generated servlet error:
    /usr/local/jakarta-tomcat-4.1.29/work/mywork/fpauto/viewPremiums_jsp.java:74: cannot resolve symbol
    symbol : class DiskFileItemFactory
    location: class org.apache.jsp.viewPremiums_jsp
    DiskFileItemFactory factory = new DiskFileItemFactory();

    Apache FileUpload - what version of Tomcat can run it?First of all, why don't you ask Apache specific questions at the Apache mailinglist?
    Regarding to your actual problem: those are just ordinary compilation errors which are complaining that the mentioned packages and classes aren't available in the classpath. The solution is obvious: add the mentioned packages and classes (or in this case, the JAR file(s) with it) to the classpath during compile time and you're fine.

Maybe you are looking for

  • Shared review using Sharepoint 2010 Foundation

    Brief description * Sharepoint for Shared review Please describe your issue in as much detail as possible * Shared review using server acrobat.com works fine. However, when using Sharepoint as server the testing fails and it is not possible to finnis

  • Safari loads PDF but doesn't go to page - tried suggested fix

    I'm trying to go to a specific page of a multi page pdf document but Safari just loads the front page of the pdf. Specifically, I have an .html index that connects to a bunch of pdfs (each with multiple pages) but when I try to go to one of the speci

  • How to get a value from file to variable in ODI?

    hi i created a variable and i want to assign the value of the variable from the flatfile...can v do that ? i will be having the value in the flatfile...i want to assign the value to the variable... Edited by: sai praneeth on Feb 15, 2009 10:34 PM

  • PR to PO conversion should not happen in case of expired pricing condition in Info Record

    Hi All, Issue – PR to PO conversion should not happen in case of expired pricing condition in Info Record. In case of creation of PR/ PO, the Price is pulled out from the Info Record of the material. In our case if the Price in the Info Record is exp

  • Reader XI does not diplay PDF-file

    I am unable to view this PDF with Adobe Reader: http://velorooms.com/files/teamgen.pdf It only shows white page page when opened. The result is same with both viewing it on Reader program and on browser. All other PDF files work well with Reader. I a