You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/12/07 03:32:00 UTC

[jira] [Work logged] (WW-5093) inconsistent scope for variables created with s:set and s:url

     [ https://issues.apache.org/jira/browse/WW-5093?focusedWorklogId=520880&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-520880 ]

ASF GitHub Bot logged work on WW-5093:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 07/Dec/20 03:30
            Start Date: 07/Dec/20 03:30
    Worklog Time Spent: 10m 
      Work Description: JCgH4164838Gh792C124B5 opened a new pull request #454:
URL: https://github.com/apache/struts/pull/454


   - Minor non-code changes, driven by examination of the issue.
   - Update taglib version from 2.3 to 2.6
   - Apply missing @ Override annotation to methods in several components.
   - ContextBean - tag attribute description updated to mention scope action.
   - ServletUrlRenderer - corrected code comment concerning scope of var
     attribute, corrected spelling mistake, changed URL case.
   - Set - Added JavaDoc and code comment to clarify that with action scope
     the var is also assigned to page scope.  Updated tag descriptions for var
     and scope to further clarify the behaviour.
   - Text - Added JavaDoc comment to clarify that if the var attribute is used
     the result is not written out, but instead saved into the action context.
   - AttributeMap - Whitespace cleanup in get() method, plus added @ Override
     tags to multiple methods.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 520880)
    Remaining Estimate: 0h
            Time Spent: 10m

> inconsistent scope for variables created with s:set and s:url
> -------------------------------------------------------------
>
>                 Key: WW-5093
>                 URL: https://issues.apache.org/jira/browse/WW-5093
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Tags
>    Affects Versions: 2.5.22
>            Reporter: nikos dimitrakas
>            Priority: Major
>              Labels: scope, tag, var
>             Fix For: 2.6
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The implementation of s:set and s:url and s:text is not consistent and not well documented. 
> Creating a variable with s:set puts the variable in a different default scope than creating a variable with s:url or s:text (with the attribute var). It is also not documented what the default scope is. After testing I could conclude that the scope for a variable created by s:url is request, while the default of s:set is not. Furthermore, s:set offers a possibility to specify the scope with an attribute, But s:url and s:text do not. 
> Possible options would be offering the possibility to specify the scope attribute in s:url and s:text, or dropping support for the var attribute for s:url and s:text and only allow s:set to create variables (thus being forced to nest s:url and s:text inside an s:set). That would be symmetric with how s:property does not offer the var attribute. At minimum all three tags should have the same default and their default should be explicitly specified in the documentation (in the tld and the online manual / tag reference)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)