ICEfaces
  1. ICEfaces
  2. ICE-1600

<ice:inputFile/> does not respect the uploadDirectoryAbsolute context-param in web.xml and new "downloadFolder" attribute not documented

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.6DR#5, 1.6
    • Component/s: None
    • Labels:
      None
    • Environment:
      Tomcat 5.5.17 / Liferay 4.3.0 (pre-release)

      Description

      In my web.xml file, I have this:

          <context-param>
              <param-name>com.icesoft.faces.uploadDirectory</param-name>
              <param-value>C:\Uploads</param-value>
          </context-param>
          <context-param>
              <param-name>com.icesoft.faces.uploadDirectoryAbsolute</param-name>
              <param-value>true</param-value>
          </context-param>

      But my file upload was throwing an exception, because I realized that the UploadServlet() constructor was not checking for the com.icesoft.faces.uploadDirectoryAbsolute context param value.

      In addition, the icefaces_component.tld file does not document the new "downloadFolder" attribute of the <ice:inputFile/> component.

      uploadDirectoryAbsolute

        Activity

        Hide
        Mark Collette added a comment -

        I'm not sure if we can actually implement the uploadDirectoryAbsolute functionality, since when you create File object with a path, it's forced to act as a relative path by the application server. Well, at least JBoss does this.

        Show
        Mark Collette added a comment - I'm not sure if we can actually implement the uploadDirectoryAbsolute functionality, since when you create File object with a path, it's forced to act as a relative path by the application server. Well, at least JBoss does this.
        Hide
        Neil Griffin added a comment -

        Mark, the fix is attached in UploadServlet.java (constructor)

        Show
        Neil Griffin added a comment - Mark, the fix is attached in UploadServlet.java (constructor)
        Hide
        Neil Griffin added a comment -

        Although I did not fix the documentation problem with the "downloadFolder" attribute.

        Show
        Neil Griffin added a comment - Although I did not fix the documentation problem with the "downloadFolder" attribute.
        Hide
        Mark Collette added a comment -

        I'm going to test this with JBoss. But, this has brought up a couple of issues.

        • inputFile.downloadFolder should be renamed to inputFile.uploadDirectory
        • Since web.xml : uploadDirectoryAbsolute exists, then inputFile.uploadDirectoryAbsolute should too
        Show
        Mark Collette added a comment - I'm going to test this with JBoss. But, this has brought up a couple of issues. inputFile.downloadFolder should be renamed to inputFile.uploadDirectory Since web.xml : uploadDirectoryAbsolute exists, then inputFile.uploadDirectoryAbsolute should too
        Hide
        Mark Collette added a comment -

        There are now the two sets fields, the context-param, and the InputFile attributes, that both give uploadDirectory and uploadDirectoryAbsolute, with the component attributes taking precedence.

        Subversion 13964
        icefaces\component-metadata\src\main\resources\conf\ice_cust_properties\cust-inputFile-props.xml
        icefaces\component\src\com\icesoft\faces\component\inputfile\InputFile.java
        icefaces\core\src\com\icesoft\faces\webapp\http\servlet\FileUploadComponent.java
        icefaces\core\src\com\icesoft\faces\webapp\http\servlet\UploadServlet.java

        Show
        Mark Collette added a comment - There are now the two sets fields, the context-param, and the InputFile attributes, that both give uploadDirectory and uploadDirectoryAbsolute, with the component attributes taking precedence. Subversion 13964 icefaces\component-metadata\src\main\resources\conf\ice_cust_properties\cust-inputFile-props.xml icefaces\component\src\com\icesoft\faces\component\inputfile\InputFile.java icefaces\core\src\com\icesoft\faces\webapp\http\servlet\FileUploadComponent.java icefaces\core\src\com\icesoft\faces\webapp\http\servlet\UploadServlet.java

          People

          • Assignee:
            Unassigned
            Reporter:
            Neil Griffin
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: