Struts 2
  1. Struts 2
  2. WW-1266

URL tag - includeParams default is "none", but docs states "get" is the default

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: WW 2.2.2
    • Fix Version/s: 2.0.0
    • Component/s: Plugin - Tags
    • Labels:
      None
    • Environment:

      tested on Apache Tomcat 5.5.15, JDK 6 (build 76)

      Description

      At http://wiki.opensymphony.com/display/WW/url, is stated includeParams attribute is "get" by default, indeed it was on 2.2.1.
      On 2.2.2 the ww url tag stop to work properly, tracking down the issue I found out includeParams attribute needed to be "get" or "all" to work

      See attached the test case.
      1) unzip it and copy the directory "ww-222-url-bug" to $CATALINA_HOME/webapps, restart tomcat
      2) open the browser and points to http://localhost:8080/ww-222-url-bug/encodingTestNew.action
      3) submit anything
      4) click at the link "Correct some fields"
      5) the previous form is not filled

      The scope interceptor is used.

      To make it work
      Edit encoding_test_2.ftl and add the attribute includeParams="get", make the test again.

        Issue Links

          Activity

          Hide
          tm_jee added a comment -

          just check the code, it seems that there's a check (condition) being added such that only if action and value is not null will it used GET ans includeParams.... not sure the reson behind this.

          Show
          tm_jee added a comment - just check the code, it seems that there's a check (condition) being added such that only if action and value is not null will it used GET ans includeParams.... not sure the reson behind this.
          Hide
          Nils-Helge Garli added a comment -

          This is related to this bug I assume: http://jira.opensymphony.com/browse/WW-1236

          Show
          Nils-Helge Garli added a comment - This is related to this bug I assume: http://jira.opensymphony.com/browse/WW-1236
          Hide
          tm_jee added a comment -

          Nils, thx for the explanation,

          If we replace

          String includeParams = null;

          to

          String includeParams = GET;

          would it affect the portal portion of webwork? I think that would fix this issue. Cheers !

          Show
          tm_jee added a comment - Nils, thx for the explanation, If we replace String includeParams = null; to String includeParams = GET; would it affect the portal portion of webwork? I think that would fix this issue. Cheers !
          Hide
          Nils-Helge Garli added a comment -

          That would probably break it for uPortal, yes. It's just with uPortal this is an issue (see http://jira.opensymphony.com/browse/WW-1224). I've added a conditional check in includeGetParameters which should solve the portlet part of the problem. Then you could either roll back the test for action == null, or do the change you described above.

          Show
          Nils-Helge Garli added a comment - That would probably break it for uPortal, yes. It's just with uPortal this is an issue (see http://jira.opensymphony.com/browse/WW-1224 ). I've added a conditional check in includeGetParameters which should solve the portlet part of the problem. Then you could either roll back the test for action == null, or do the change you described above.
          Hide
          tm_jee added a comment -

          fixed. Nils kindly review when you find the time.

          changes are at :-

          Sending action/src/main/java/org/apache/struts/action2/components/URL.java
          Sending action/src/test/java/org/apache/struts/action2/views/jsp/URLTagTest.java

          Show
          tm_jee added a comment - fixed. Nils kindly review when you find the time. changes are at :- Sending action/src/main/java/org/apache/struts/action2/components/URL.java Sending action/src/test/java/org/apache/struts/action2/views/jsp/URLTagTest.java

            People

            • Assignee:
              tm_jee
              Reporter:
              Claudio Miranda
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development