Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-5396

Javatemplates s:file shows server/file location

    XMLWordPrintableJSON

Details

    Description

      After a file upload with the s:file tag it gives details of the webapp location in the value attribute.

      <s:file name="uploadedFiles" multiple="multiple" />

      ......value="/someplace/Tomcat/apache-tomcat-9.0.85/work/Catalina/localhost/ROOT##/upload_52c5bcff_6363_4414_b23e_fe49bb3f3af7_00000462.tmp" .....

      If I look at file.ftl there is no value being set for the s:file tag, so the preset value has been removed. ie

      <#if parameters.nameValue??>
      value="<@s.property value="parameters.nameValue"/>"<#rt/>
      </#if>

      In the javatemplates plugin FileHandler.java it does set the value, and gets it from

      addIfExists("value", params.get("nameValue"))

      which has the server path details.

      Possibly the file.flt was modified at some point, and the java templates version was not.

      I guess we should make these match and remove the value on the javatemplates?
      Update the docs also.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ghuber Greg Huber
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h