[jira] [Updated] (WW-4625) Struts 2 XSS vulnerability with when is used.

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-4625?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-4625:
--
Fix Version/s: 6.2.0
   (was: 6.1.0)

> Struts 2 XSS vulnerability with  when  is used.
> ---
>
> Key: WW-4625
> URL: https://issues.apache.org/jira/browse/WW-4625
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.3.24, 2.3.28
> Environment: Operating System: Windows 7(N/A).
> Application Server: Tomcat 6(any server running on JRE1.6 or before JRE).
> Java: jdk1.5.0.11.
> Developloment Framework: Struts 2.3.28, 2.3.24.1.
> Browser: FireFox 38.0.1.
>Reporter: Naozumi Taromaru
>Priority: Major
>  Labels: struts2, vulnerability, xss
> Fix For: 6.2.0
>
>
>  tag and JspTemplateEngine use
> org.apache.struts2.components.Include#include.
> (I use  tag.)
> The included page is encoded by response character encoding(default is 
> ISO-8859-1(ServletResponse)).
> But encoded result is decoded by 'request' character encoding(default is 
> UTF-8(@Inject(StrutsConstants.STRUTS_I18N_ENCODING))).
> org.apache.struts2.components.Include use wrong character encoding.
> If request and response character encoding are specifically configured to 
> same character encoding,
> there are no problems.
> However, if request and response character encoding are not specifically 
> configured,
> (or <%@ page contentType="text/html; charset=ISO-8859-1" %> is written in JSP 
> only,)
> the included page is encoded by ISO-8859-1 and decoded by UTF-8.
> By using old decoding rule of UTF-8(enable on JRE1.5.0_16 or before and 
> JRE1.6.0_10 or before),
> XSS vulnerability occurs, even if input value is sanitized when output as 
> .
> Please refer to description of WW-4507 for sample attack parameter 
> information.
> Please refer to my comment written in WW-4507 for more analysis information.
> P.S.
> I'm thinking WW-4507(S2-028) has been caused by this.
> (WW-4507(S2-028) is not fixed in 2.3.28.)
> But if it's different, please show the hidden reproduction condition to 
> WW-4507.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-4759) Dedicated struts2-api Maven artefact

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-4759:
--
Fix Version/s: 6.2.0
   (was: 6.1.0)

> Dedicated struts2-api Maven artefact
> 
>
> Key: WW-4759
> URL: https://issues.apache.org/jira/browse/WW-4759
> Project: Struts 2
>  Issue Type: New Feature
>  Components: New API
>Affects Versions: 2.5.10
>Reporter: Lukasz Lenart
>Priority: Major
> Fix For: 6.2.0
>
>
> Create a new Maven artefact {{struts2-api}} and move all the interfaces 
> there, those interfaces are extension points that can be used by users to 
> implement custom behaviour



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-4611) Drop autogenerated IDs

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-4611?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-4611:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> Drop autogenerated IDs
> --
>
> Key: WW-4611
> URL: https://issues.apache.org/jira/browse/WW-4611
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Plugin - Tags
>Reporter: Lukasz Lenart
>Priority: Major
> Fix For: 7.0.0
>
>
> Leaving it here just to track possible options
> See the following discussion
> http://markmail.org/thread/mv7km6qdycfoqzhu



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-4530) The ExceptionMappingInterceptor extends MethodFilterInterceptor

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-4530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-4530:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> The ExceptionMappingInterceptor extends MethodFilterInterceptor
> ---
>
> Key: WW-4530
> URL: https://issues.apache.org/jira/browse/WW-4530
> Project: Struts 2
>  Issue Type: Bug
>Reporter: Alireza Fattahi
>Priority: Major
> Fix For: 7.0.0
>
>
> Is it possible that the ExceptionMappingInterceptor extends 
> MethodFilterInterceptor, this will help to add ExceptionMappingInterceptor  
> to defined methods



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-4395) Make email validator regex comply with RFC 6531

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-4395?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-4395:
--
Fix Version/s: 6.2.0
   (was: 6.1.0)

> Make email validator regex comply with RFC 6531 
> 
>
> Key: WW-4395
> URL: https://issues.apache.org/jira/browse/WW-4395
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Actions
>Affects Versions: 2.3.16.3
>Reporter: Miguel Almeida
>Priority: Major
>  Labels: email, regex, validation
> Fix For: 6.2.0
>
>
> This is the regex for email validation in Struts:
> {noformat}
> \\b^['_a-z0-9-\\+]+(\\.['_a-z0-9-\\+]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)\*
> \.([a-z]{2}|aero|arpa|asia|biz|com|coop|edu|gov|info|int|jobs|mil|mobi|
> museum|name|nato|net|org|pro|tel|travel|xxx)$\\b
> {noformat}
> This doesn't allow special characters (e.g. àéí, äëö,...).
> However, International characters above U+007F are permitted by [RFC 
> 6531|http://tools.ietf.org/html/rfc6531]
> Because some mail servers seem to follow this standard, regex should be 
> improved to allow email addresses valid according to this standard.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-4421) Duplicate @Action value annotation check skipped

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-4421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-4421:
--
Fix Version/s: 6.2.0
   (was: 6.1.0)

> Duplicate @Action value annotation check skipped
> 
>
> Key: WW-4421
> URL: https://issues.apache.org/jira/browse/WW-4421
> Project: Struts 2
>  Issue Type: Bug
>  Components: Annotations, Plugin - Convention
>Affects Versions: 2.3.16.3
>Reporter: Sebastian Haas
>Priority: Major
> Fix For: 6.2.0
>
> Attachments: MethodCheckFailsOnStartup.java, 
> MethodCheckSkippedOnStartup.java
>
>
> {{PackageBasedActionConfigBuilder#buildConfiguration}} checks if there are 
> duplicate action names on method annotations. If {{ActionSupport#execute}} is 
> overridden and annotated with {{@Action}}, the duplicate action name check is 
> skipped.
> The check is disabled due to 
> {code:title=PackageBasedActionConfigBuilder.java:674}if 
> (!map.containsKey(DEFAULT_METHOD){code}
> Having duplicate action names leads to different behavior with Java 7 or Java 
> 8 environment (due to reflection method order).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-4498) Replace excludeParams with additionalExcludeParams in ParametersInterceptor

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-4498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-4498:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> Replace excludeParams with additionalExcludeParams in ParametersInterceptor
> ---
>
> Key: WW-4498
> URL: https://issues.apache.org/jira/browse/WW-4498
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Interceptors
>Affects Versions: 2.3.24
>Reporter: Lukasz Lenart
>Priority: Major
> Fix For: 7.0.0
>
>
> {{excludeParams}} override params defined in 
> {{DefaultExcludedPatternsChecker}} which can be unsafe, it would be better to 
> allow users only add additional params. If they want to replace params they 
> can reimplement {{DefaultExcludedPatternsChecker}} or use dedicated constant.
> This approach should allow override params per stack not only globally.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-4428) Add support for new Java 8 LocalDate and LocalDateTime to the JSON plugin

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-4428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-4428:
--
Fix Version/s: 6.2.0
   (was: 6.1.0)

> Add support for new Java 8 LocalDate and LocalDateTime to the JSON plugin
> -
>
> Key: WW-4428
> URL: https://issues.apache.org/jira/browse/WW-4428
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - JSON
>Affects Versions: 2.3.20
>Reporter: Alessandro Nistico
>Priority: Major
>  Labels: JSON
> Fix For: 6.2.0
>
>
> The JSONWriter and the JSONPopulator do not handle the new LocalDate and 
> LocalDateTime as primitive date values and will handle them through 
> introspection which will create the wrong JSON object.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-4496) better reconciliation of static url mappings

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-4496?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-4496:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> better reconciliation of static url mappings
> 
>
> Key: WW-4496
> URL: https://issues.apache.org/jira/browse/WW-4496
> Project: Struts 2
>  Issue Type: Improvement
>Affects Versions: 2.3.20
>Reporter: adam brin
>Priority: Major
> Fix For: 7.0.0
>
>
> the struts static url mappings are great for simplifying URL paths and 
> including "data" in the URL structures.  We're having collisions that are 
> causing problems though:
> eg.
> {quote}
> class1:
> @Namespace("/dataset/")
> ...
> @Action("\{id\}")
> ...
> class3:
> @Namespace("/dataset")
> ...
> @Action("columns/\{id\}")
> {quote}
> In this case, Class1's mapping seem to "own" everything under /dataset 
> regardless of what other classes like (class2) define.  It'd be nice if 
> struts could, as it scans all of the namespaces and actions, evaluated 
> left-to-right non-programatically specified values ahead of those that are 
> variables. E.g. /dataset/columns/\{id\} would be evaluated prior to matching 
> /dataset/\{id\}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-4366) Action methods should accept arguments like @QueryParam, @FormParam, @PathParam and specific request methods GET, PUT, POST etc

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-4366?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-4366:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> Action methods should accept arguments like  @QueryParam, @FormParam, 
> @PathParam and specific request methods GET, PUT, POST  etc
> -
>
> Key: WW-4366
> URL: https://issues.apache.org/jira/browse/WW-4366
> Project: Struts 2
>  Issue Type: New Feature
>  Components: Core Actions
>Reporter: samarjit samanta
>Priority: Major
>  Labels: features
> Fix For: 7.0.0
>
>
> Struts2 action methods should accept arguments just like JAX-RS specs. Also 
> certain method types should be allowed only like GET, PUT, POST, DELTE. 
> Inspiration might be taken from struts-json plugin @SMDMthod but that is not 
> a real action method. 
> If there are multiple action methods in a Action class then it becomes less 
> obvious which variables are used for a particular action method. 
> Ex.
> {code:java}
> @ActionPath("/books/{id}")
> public String showAction(@PathParam("id") String id,
> @QueryParam("name") String name) {
>   ...
>   return "success";
> }
> {code}
> Also flexible return types as defined in JAX-RS would be great or atleast 
> {code:java}
> Result.json(myObject).includeActionErrors().includeActionMessages().done();
> Result.string(myString).done();
> Result.create("json").from(myObject).param("includeActionErrors,includeActionMessages").done();
> {code}
> The action method return type can be to denote builder like result. The 
> closest in struts I can see is HttpHeaderResult. But this does not allow 
> arbritrary string result and let the end user create the string as json or 
> plain text. 
> {code:java}
>@Action
>public Result showAction(...){}
> {code}
> Inspiration can be taken from struts2-json-plugin#SMDMethod and 
> https://github.com/bastengao/struts2-freeroute



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-4356) Implement new Sitemesh plugin based on Sitemesh3

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-4356?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-4356:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> Implement new Sitemesh plugin based on Sitemesh3
> 
>
> Key: WW-4356
> URL: https://issues.apache.org/jira/browse/WW-4356
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Plugin - SiteMesh
>Reporter: Lukasz Lenart
>Assignee: Lukasz Lenart
>Priority: Major
> Fix For: 7.0.0
>
>
> Sitemesh3 isn't released yet but it should be soon
> https://github.com/sitemesh/sitemesh3/issues/55#issuecomment-44907860



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-4164) Improve support for multiple extensions

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-4164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-4164:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> Improve support for multiple extensions
> ---
>
> Key: WW-4164
> URL: https://issues.apache.org/jira/browse/WW-4164
> Project: Struts 2
>  Issue Type: Improvement
>  Components: XML Configuration
>Affects Versions: 2.3.15.1
>Reporter: Jasper Rosenberg
>Priority: Major
> Fix For: 7.0.0
>
>
> Currently if you support multiple extensions (eg. 
> struts.action.extension=action,html,,) there is no way to tell struts for a 
> particular action which extension you always want to use.  This has two 
> downsides:
> 1. When struts has to generate an url, for example in the form tag, or the 
> "redirectAction" result type, there is no way to specify the extension to 
> use, so it ends up using the current invocation's extension if possible, or 
> otherwise the default, neither of which might be correct.
> 2. You can invoke the action with any of the supported extensions, creating 
> duplicate pages with no clear canonical version.  (Bad for SEO as well)
> What I propose is allowing the user to specify an optional specific extension 
> at the package and action level in the struts xml configuration like so:
> {code:xml}
>   
> 
>   a1.ftl
> 
> 
>   b1.ftl
> 
> 
>   b1.ftl
> 
>   
> {code}
> 1. When selecting an extension when building an URL for an action, it would 
> first see if there was an extension to use at the action level.  If not it 
> would check the package level (including package inheritance).  If still no 
> specific extension, it would behave as it currently does.
> 2. When mapping an incoming URL to an action, the reverse will also hold.  If 
> the action or its package specify a specific extension, then the action can 
> only be matched if the URL has that extension.
> So in the above example, the following urls would be expected to work:
> 1. /a1 (action level no extension)
> 2. /b1.html (action level "html" extension)
> 3. /c1.action (no action level extension, using package level "action" 
> extension)
> However, an url like "/b1.action" will not match any actions because "action" 
> extension doesn't match the action's "html" extension.
> This change would be 100% backwards because if you don't specify any 
> extension attributes on the package or action, it falls back to the current 
> behavior.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3835) use TemplateDirectiveModel instead of TemplateTransformModel in org.apache.struts2.views.freemarker.tags.TagModel.

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3835:
--
Fix Version/s: 6.2.0
   (was: 6.1.0)

> use TemplateDirectiveModel instead of TemplateTransformModel in 
> org.apache.struts2.views.freemarker.tags.TagModel.
> --
>
> Key: WW-3835
> URL: https://issues.apache.org/jira/browse/WW-3835
> Project: Struts 2
>  Issue Type: Improvement
>Reporter: Yanming Zhou
>Priority: Major
> Fix For: 6.2.0
>
>
> http://freemarker.sourceforge.net/docs/api/freemarker/template/TemplateTransformModel.html
> Objects that implement this interface can be used as user-defined directives 
> (much like macros); you should rather use the newer TemplateDirectiveModel 
> instead. Altough implementing output filters is more handy with this 
> interface, this interface will be certainly deprecated as superfluous, 
> starting from FreeMarker 2.4. But as far as the template engine is concerned, 
> you can use both equivalently as a user-defined directive.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3792) s:checkbox (org.apache.struts2.components.Checkbox) generates span instead of div when using labelposition="left"

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3792?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3792:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> s:checkbox (org.apache.struts2.components.Checkbox) generates span instead of 
> div when using labelposition="left"
> -
>
> Key: WW-3792
> URL: https://issues.apache.org/jira/browse/WW-3792
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core Actions
>Affects Versions: 2.3.1.2
> Environment: Tomcat 6 / JDK 1.5
>Reporter: emmanuelg
>Priority: Major
> Fix For: 7.0.0
>
>
> When using theme="css_xhtml", most of components 
> (s:textfield,s:textarea,s:radio,s:select) generate code like that :
>
>
>
>   
>   
>  
> 
>   
> 
> Wheras if you use s:checkbox with labelposition="left" it generates something 
> like that (span instead of div) :
> 
> generates :
>
>   
>
>   
>   
>  
> 
>   
> 
> When you use css_xhtml and a css to display a form, this is a real problem.
> As a workaround, you have to display checkbox using parentThem=simple, and 
> generate div by yourself.
> Maybe this problem is due to the fact that by default, all component have :
> - label at left
> - value at right 
> Expect for checkbox that has :
> - label at right
> - value at left



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3717) Http Method as part of action mapping

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3717:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> Http Method as part of action mapping
> -
>
> Key: WW-3717
> URL: https://issues.apache.org/jira/browse/WW-3717
> Project: Struts 2
>  Issue Type: New Feature
>  Components: Dispatch Filter, XML Configuration
> Environment: All
>Reporter: Jeremy Norman
>Priority: Major
>  Labels: restful
> Fix For: 7.0.0
>
>
> Struts action configuration (and dispatcher) should allow discrimination of 
> actions based on the HTTP method. This would allow generic REST style 
> interfaces (in excess of the rest plugin).
> e.g. 
> {code:xml}
>  ...
>  ...
> {code}
> This is helpful when combined with regex patternmatcher for custom restful 
> urls
> e.g. 
> {code:xml}
> 
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3784) Greedy and non-greedy matching behaviour should work in action methods using annotated wildcards

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3784:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> Greedy and non-greedy matching behaviour should work in action methods using 
> annotated wildcards 
> -
>
> Key: WW-3784
> URL: https://issues.apache.org/jira/browse/WW-3784
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core Actions
>Affects Versions: 2.3.1.2
> Environment: Win XP, Linux / JDK 7 (Oracle)
>Reporter: Mo Be
>Priority: Major
> Fix For: 7.0.0
>
>
> {code:java}
> @Namespace("/do")
> public class CRUDAction {
> /* [1] specific wildcard */
> @Override @Action(value="some/usefull/{stuff}",results={@Result(location 
> = "result.jsp")})
> public String execute() throws Exception {...}
> /* [2] less specific wildcard */
> @Override @Action(value="some/{stuff}", results={@Result(location 
> ="result.jsp")})
> public String input() throws Exception {...} 
> }
> {code}
> Currently pattern [2] due to greedy natching catches every 
> "/do/some/\{stuff}" AND "/do/some/usefull/\{stuff}" event.
> For instance while calling /do/some/eating or /do/some/usefull/sleeping will 
> both end in [2] where stuff becomes "eating" or "usefull/sleep" respectively, 
> [1] is left behind with nothing to do.
> The expected matching behaviour should always be from more specific to less 
> specific.
> I.e. [2] should never fire before [1]. So that /do/some/usefull/sleeping 
> would correctly map to [1] with stuff==sleeping and /do/some/eating correctly 
> maps to [2] with stuff==eating.
> Using xml one can achieve the correct matching order by re-ordering the 
> action definitions (most specific action mapping comes first) 
>



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3680) recursive iterator options

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3680?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3680:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> recursive iterator options
> --
>
> Key: WW-3680
> URL: https://issues.apache.org/jira/browse/WW-3680
> Project: Struts 2
>  Issue Type: New Feature
>  Components: Core Actions
>Affects Versions: 2.2.3.1
>Reporter: Jason Pyeron
>Priority: Major
> Fix For: 7.0.0
>
> Attachments: Test.java, WW-3680-v01.patch
>
>
> work in progress



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3655) Freemarker result loads request uri as template

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3655?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3655:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> Freemarker result loads request uri as template
> ---
>
> Key: WW-3655
> URL: https://issues.apache.org/jira/browse/WW-3655
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.2.3
>Reporter: Johno Crawford
>Assignee: Maurizio Cucchiara
>Priority: Major
> Fix For: 7.0.0
>
>
> If the template location is either null or an empty string "" 
> FreemarkerResult will take the request uri 
> org.apache.struts2.views.freemarker.FreemarkerResult#doExecute and load it as 
> a template.
> Example url, http://localhost:8080/com/acme/actions/Action.class/ would load 
> /com/acme/actions/Action.class/ as a template and dump the bytecode in the 
> response.
> The "feature" / culprit below seems a little exotic, however someone may be 
> relying on it.. (same actions handling stuff in different directories?)
> {code}
> if (!locationArg.startsWith("/")) {
> String base = ResourceUtil.getResourceBase(req);
> locationArg = base + "/" + locationArg;
> }
> {code}
> To mitigate the problem and maintain previous functionality we could throw an 
> exception if the template location is empty, I have created a pull request 
> with my proposed fix https://github.com/apache/struts2/pull/1



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3647) Adding a jndi-lookup Spring bean breaks ServletActionRedirectResult

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3647?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3647:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> Adding a jndi-lookup Spring bean breaks ServletActionRedirectResult
> ---
>
> Key: WW-3647
> URL: https://issues.apache.org/jira/browse/WW-3647
> Project: Struts 2
>  Issue Type: Bug
>  Components: Dispatch Filter, Plugin - Spring
>Affects Versions: 2.2.3
>Reporter: Miguel Almeida
>Assignee: Lukasz Lenart
>Priority: Major
>  Labels: injection, redirectAction, spring, struts2
> Fix For: 7.0.0
>
> Attachments: redirectActionErrorTest.zip, 
> redirectActionErrorWithJunitTest.zip
>
>
> When you add the following bean to a Spring-Struts application:
>  default-value=""  />
> Whenever you have an action with a redirectAction type, Struts will try to 
> redirect you to:
> http://localhost:8080//index!.action#
> This happens because the 3 String argument constructor for 
> ServletActionRedirectResult will set action, method and namespace to whatever 
> value is defined for that bean ( in the example, if you don't have a 
> someName JDNI property).
> This only happens when you let struts manage ServletActionRedirectResult. If 
> you add the following Spring bean:
>class="org.apache.struts2.dispatcher.ServletActionRedirectResult"
>   scope="prototype" autowire="byName">
>   
> and add a  class="myRedirect" /> result type, the problem doesn't appear.
> I've added a testCase for you to confirm.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3630) Add global Failure result

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3630?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3630:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> Add global Failure result
> -
>
> Key: WW-3630
> URL: https://issues.apache.org/jira/browse/WW-3630
> Project: Struts 2
>  Issue Type: Improvement
>Reporter: Lukasz Lenart
>Priority: Major
> Fix For: 7.0.0
>
>
> Jan Fröhlich: As I am to lazy to register for commenting on the linked page I 
> just do it here - another option than to repeat the result would be, to just 
> add a global result "failure" to struts.xml. Would make the code even more 
> simple - at least in my oppinion.
> http://www.facebook.com/struts2/posts/223061464386822



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Closed] (WW-3641) Update Raw Types to Generic Types

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3641?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart closed WW-3641.
-
Fix Version/s: (was: 6.1.0)
   Resolution: Resolved

Code is updated step by step

> Update Raw Types to Generic Types
> -
>
> Key: WW-3641
> URL: https://issues.apache.org/jira/browse/WW-3641
> Project: Struts 2
>  Issue Type: Improvement
>Reporter: Steven Benitez
>Priority: Major
>  Labels: generics
> Attachments: WW-3641-1.patch
>
>
> This ticket is for refactoring the places in the code that still use raw 
> types to instead use generic types.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3624) allow regex matching on fielderror tag

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3624?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3624:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> allow regex matching on fielderror tag
> --
>
> Key: WW-3624
> URL: https://issues.apache.org/jira/browse/WW-3624
> Project: Struts 2
>  Issue Type: New Feature
>  Components: Core Actions
>Affects Versions: 2.2.3
> Environment: n/a
>Reporter: Jason Pyeron
>Priority: Major
> Fix For: 7.0.0
>
> Attachments: 
> struts2-trunk-WW-3624-baselined-without-WW-3622-or-WW-3623.patch, 
> struts2-trunk-WW-3624-depends-on-WW-3622-and-WW-3623.patch, 
> struts2-trunk-WW-3624-site-artifacts-from-maven.patch
>
>
> Very happy with the iterator and complicated sub fields...
> {code:xml}
> 
> ^ledger\.records\[\].*
> 
> {code}
> the patch attached is baseline against the trunk, it assumes WW-3622 and 
> WW-3623 have not been commited yet.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Closed] (WW-3578) replace function is called multiple times, which can be done in one run

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart closed WW-3578.
-
Fix Version/s: (was: 6.1.0)
   Resolution: Won't Fix

The  Embedded JSP plugin is deprecated and will be removed with the next major 
release

> replace function is called multiple times, which can be done in one run
> ---
>
> Key: WW-3578
> URL: https://issues.apache.org/jira/browse/WW-3578
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - JasperReports
>Affects Versions: 2.2.1.1
>Reporter: Xiaoming Shi
>Priority: Major
>
> In the function "makeXmlJavaIdentifier" 
> (./struts-2.2.1/src/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/JspUtil.java
>  line: 1059) 
> The replace function is called 3 times, which can be done in one run with a 
> for loop. 
>StringBuilder sb = new StringBuilder(name.length()); 
> for(int i = 0; i < name.length(); i++) 
> { 
> char c = name.charAt(i); 
> if (c == '-') 
> sb.append("$1"); 
> else if (c == '.') 
> sb.append("$2"); 
> else if (c == ':') 
> sb.append("$3"); 
> else 
> sb.append(c); 
> } 
> return sb.toString(); 
> The second method can be much faster. 
> (Similar to the MySQL bug http://bugs.mysql.com/bug.php?id=45699)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3576) SessionMap is not thread-safe

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3576?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3576:
--
Fix Version/s: 6.2.0
   (was: 6.1.0)

> SessionMap is not thread-safe
> -
>
> Key: WW-3576
> URL: https://issues.apache.org/jira/browse/WW-3576
> Project: Struts 2
>  Issue Type: Bug
>  Components: Other
>Affects Versions: 2.2.1
>Reporter: Sylvain Veyrié
>Assignee: Lukasz Lenart
>Priority: Major
> Fix For: 6.2.0
>
>
> Searching for a bug after some stress test (Exception on "getAttribute": 
> already invalidated session), I reviewed SessionMap.java.
> Following WW-239, SessionMap has been made thread-safe.
> All methods are like this :
> public void doSomething() {
>   if (session == null) {
>   return;
>   }
>   
>   synchronized (session) {
>   session.doSometing();
>   }
> }
> For example:
> public void invalidate() {
>   if (session == null) {
>   return;
>   }
>   
>   synchronized (session) {
>   session.invalidate();
>   session = null;
>   entries = null;
>   }
> } 
> IMHO this is not thread-safe. With the example of invalidate(), if there is a 
> context switch just before the synchronized, the nullity is no more checked. 
> If another invalidate() is called at least a NPE can be thrown. There are 
> probably other side-effects like my exception problem.
> As now Struts 2 only supports Java 5+, there is two ways to fix it :
> * use a double-check-locking (DCL) and set session "volatile" (easy way)
> * use java.util.concurrent instead of synchronized keyword
> If you agree and choose one of those fixes, I can provide a patch.
> For the moment, I don't know if my bug is resolved if we directly use javax 
> session, without this wrapper.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3541) Request Parameter to Action Object Mapping Plugin for Insecure Direct Object References

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3541:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> Request Parameter to Action Object Mapping Plugin for Insecure Direct Object 
> References
> ---
>
> Key: WW-3541
> URL: https://issues.apache.org/jira/browse/WW-3541
> Project: Struts 2
>  Issue Type: New Feature
>  Components: Core Interceptors
>Affects Versions: 2.2.1.1
> Environment: All OS
>Reporter: datta kudale
>Priority: Major
> Fix For: 7.0.0
>
>   Original Estimate: 96h
>  Remaining Estimate: 96h
>
> JSP Parameter to Action Object Mapping (Security) Plugin does this great 
> thing. Here is also a short overview of what it does and why a developer 
> would want to use it.
> Many applications expose their internal object references to users. Attackers 
> use parameter tampering to change references and violate the intended but 
> unenforced access control policy. Frequently, these references point to file 
> systems and databases, but any exposed application construct could be 
> vulnerable.
> The best protection is to avoid exposing direct object references to users by 
> using an index, indirect reference map, or other indirect method that is easy 
> to validate. If a direct object reference must be used, ensure that the user 
> is authorized before using it.
> * Avoid exposing your private object references to users whenever 
> possible, such as primary keys or filenames
> * Validate any private object references extensively with an "accept 
> known good" approach
> * Verify authorization to all referenced objects
> So to avoid internal object implementation to end user, this plugin can be 
> used. 
> Please refer following link for Plugin
> https://cwiki.apache.org/confluence/display/S2PLUGINS/Request+Parameter+to+Action+Object+Mapping+Plugin+for+Insecure+Direct+Object+References



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3571) Anchor tag is providing a default value for href attribute when it should not

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3571:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> Anchor tag is providing a default value for href attribute when it should not
> -
>
> Key: WW-3571
> URL: https://issues.apache.org/jira/browse/WW-3571
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.1.8, 2.2.1.1
>Reporter: James House
>Assignee: Maurizio Cucchiara
>Priority: Major
> Fix For: 7.0.0
>
>
> The Anchor tag is providing a default value for href attribute when it should 
> not.
> Previous versions of Struts2 did not do this, and in fact the documentation 
> for the tag also says there is no default value.
> However it is placing a default value of the current URL, rather than leaving 
> the href attribute off altogether.  (it is legal per HTML to not have an href 
> attribute, and in fact we had existing code that was trying to purposely 
> leave it off, but now instead of being left off, it is rendered with the 
> current URL).
> I believe the problem was introduced with the changes related to WW-3037.   
> This block of code (from Anchor.java) precisely:
> {code}
> @Override
> protected void evaluateExtraParams() {
> super.evaluateExtraParams();
> if (href != null)
> addParameter("href", 
> ensureAttributeSafelyNotEscaped(findString(href)));
> else {
> //no href, build it from URL attributes
> StringWriter sw = new StringWriter();
> urlRenderer.beforeRenderUrl(urlProvider);
> urlRenderer.renderUrl(sw, urlProvider);
> String builtHref = sw.toString();
> if (StringUtils.isNotEmpty(builtHref))
> addParameter("href", 
> ensureAttributeSafelyNotEscaped(builtHref));
> }
> }
> {code}
> To preserve documented and previous functionality of allowing href to not be 
> rendered in the tag, the entire "else" block should be removed (of course 
> that significantly negates WW-3037 - which apparently didn't think about the 
> fact that it is legit to not have an href for the anchor).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3530) Invalid cache key in AnnotationActionValidationManager.buildValidatorKey when using visitor field validators

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3530:
--
Fix Version/s: 6.2.0
   (was: 6.1.0)

> Invalid cache key in AnnotationActionValidationManager.buildValidatorKey  
> when using visitor field validators
> -
>
> Key: WW-3530
> URL: https://issues.apache.org/jira/browse/WW-3530
> Project: Struts 2
>  Issue Type: Bug
>  Components: XML Validators
>Affects Versions: 2.2.1
>Reporter: Johnny Yu
>Priority: Major
> Fix For: 6.2.0
>
>
> Error scenerio:
> MyAction-validation.xml:
> 
>
>   
>   basic
>   true
>   
>   
>   
>   
>   
>   additional
>   true
>   
>   
>   
> 
> In this case, validators in MyClass-basic-validation.xml will be executed two 
> times, but validators in MyClass-additional-validation.xml will just ignored.
> The problem is caused by 
> AnnotationActionValidationManager.buildValidatorKey(Class) which returns the 
> same cache key for the validator cache.
> The current cache key is created by:
> StringBuilder sb = new StringBuilder(clazz.getName());
> sb.append("/");
> sb.append(proxy.getConfig().getName());
> sb.append("|");
> sb.append(proxy.getMethod());
> The context is not a part of the cache key. Therefore, the two visitor 
> validator will just get the same cache key. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3516) Add tag to UI Tag

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3516:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> Add  tag to  UI Tag
> 
>
> Key: WW-3516
> URL: https://issues.apache.org/jira/browse/WW-3516
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Plugin - Tags
>Affects Versions: 2.2.1
> Environment: n/a
>Reporter: Burton Rhodes
>Assignee: Maurizio Cucchiara
>Priority: Major
> Fix For: 7.0.0
>
> Attachments: checkboxlist.ftl
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Currently the checkboxlist UI Tag does not implement the cssClass or cssStyle 
> attributes in checkboxlist.ftl file (for both simple and xhtml themes).  The 
> file should be modified using a  tag so that css attibutes can be used 
> around both the checkbox and label.  This will allow user full flexibility 
> with the layout of the checkboxlist.  The layout capabilities for this tag 
> "out of the box" are not adequate for almost any UI.  Almost without fail 
> users want a one column list or fixed width list so that the  type=checkbox> and  tags do not break on a line.  This fix could also 
> be implemented on radio an option tags as well.  Fully functional code 
> snippet below and examples.
> // *** Modified Code: /template/simple/checkboxlist.ftl 
>   <#-- ***Added div tag to use cssClass and/or 
> cssStyle, etc -->
>  <#include "/${parameters.templateDir}/simple/css.ftl" />
>   >
>   
>value="${itemKeyStr?html}" id="${parameters.name?html}-${itemCount}"<#rt/>
>   <#if tag.contains(parameters.nameValue, itemKey)>
>checked="checked"<#rt/>
>   
>   <#if parameters.disabled?default(false)>
>disabled="disabled"<#rt/>
>   
>   <#if parameters.title??>
>title="${parameters.title?html}"<#rt/>
>   
>   <#include 
> "/${parameters.templateDir}/simple/scripting-events.ftl" />
>   <#include 
> "/${parameters.templateDir}/simple/common-attributes.ftl" />
>   />
>   
>class="checkboxLabel">${itemValue?html}
>   
>   <#-- ** End div -->
>   
> // *  Will produce multi-column (fixed width for each item), preserving 
> checkbox and label on the same line, and carry over to next line
>name="customers" 
>   list="%{customerList}"  
>   cssClass="AnyClass"
>   cssStyle="float: left; width:150px"
> />
> // *  Will produce fixed width one column list, 150px wide
>name="customers" 
>   list="%{customerList}"  
>   cssClass="AnyClass"
>   cssStyle="width:150px"
> />



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3499) AnnotationParameterFilterIntereptor should support deep OGNL

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3499:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> AnnotationParameterFilterIntereptor should support deep OGNL
> 
>
> Key: WW-3499
> URL: https://issues.apache.org/jira/browse/WW-3499
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Interceptors
>Affects Versions: 2.2.1
>Reporter: John Lindal
>Priority: Major
> Fix For: 7.0.0
>
>
> The code already has a comment about enhancing the interceptor to match the 
> start of an OGNL expression instead of only an exact parameter name.  What it 
> really needs, however, is to enhance the Allowed annotation to store a list 
> of white-listed ONGL prefix expressions.  This allows control over what parts 
> of a bean may be modified, not just whether or not the entire bean can be 
> modified.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3464) Wildcard Mappings, Last one loses.

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3464:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> Wildcard Mappings, Last one loses.
> --
>
> Key: WW-3464
> URL: https://issues.apache.org/jira/browse/WW-3464
> Project: Struts 2
>  Issue Type: Bug
>  Components: XML Configuration
>Affects Versions: 2.1.8.1
> Environment: OS X 10.6.4, Java 5, Running from inside Netbeans using 
> embedded tomcat
>Reporter: Robert M. Zigweid
>Priority: Major
> Fix For: 7.0.0
>
>
> Given the struts.xml snippet: 
>
>Welcome
>test
>
>
>NoProject
>
> I generate the log results as follows:
> 20676 [http-8084-2] DEBUG 
> com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler
>  - Entering nullPropertyValue 
> [target=[com.opensymphony.xwork2.DefaultTextProvider@61b59919],
> property=struts]
> 20682 [http-8084-2] DEBUG 
> com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler
>  - Entering nullPropertyValue 
> [target=[com.opensymphony.xwork2.DefaultTextProvider@61b59919],
> property=struts]
> 20689 [http-8084-2] DEBUG com.opensymphony.xwork2.DefaultActionProxy  - 
> Creating an DefaultActionProxy
> for namespace / and action name ProjectStatus
> 20689 [http-8084-2] DEBUG com.opensymphony.xwork2.config.impl.AbstractMatcher 
>  - Attempting
> to match 'ProjectStatus' to a wildcard pattern, 3 available
> 20689 [http-8084-2] DEBUG com.opensymphony.xwork2.config.impl.AbstractMatcher 
>  - Value matches
> pattern '*'
> 20703 [http-8084-2] DEBUG com.opensymphony.xwork2.interceptor.I18nInterceptor 
>  - intercept
> '//ProjectStatus' { 
> 20704 [http-8084-2] DEBUG com.opensymphony.xwork2.interceptor.I18nInterceptor 
>  - applied invocation
> context locale=en
> 20704 [http-8084-2] DEBUG com.opensymphony.xwork2.interceptor.I18nInterceptor 
>  - before Locale=en
> 20735 [http-8084-2] DEBUG 
> com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler
>  - Entering nullPropertyValue [target=[web.BaseView@55d7fc31, 
> com.opensymphony.xwork2.DefaultTextProvider@61b59919],
> property=struts]
> 20765 [http-8084-2] DEBUG 
> org.apache.struts2.interceptor.FileUploadInterceptor  - Bypassing
> //ProjectStatus
> 20765 [http-8084-2] DEBUG 
> com.opensymphony.xwork2.interceptor.StaticParametersInterceptor
>  - Setting static parameters {}
> 20767 [http-8084-2] DEBUG 
> com.opensymphony.xwork2.interceptor.ParametersInterceptor  - Setting
> params NONE
> 20767 [http-8084-2] DEBUG 
> com.opensymphony.xwork2.interceptor.ParametersInterceptor  - Setting
> params 
> As you can see the "*" is matched as opposed to "Project*", which seems to go 
> against the
> 'last one wins' as is described by the struts documentation on 
> http://struts.apache.org/2.1.8.1/docs/wildcard-mappings.html
> Now, if I reverse the order of the actions in struts.xml I get the following 
> result: 
> 13176 [http-8084-1] DEBUG 
> com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler
>  - Entering nullPropertyValue 
> [target=[com.opensymphony.xwork2.DefaultTextProvider@18a4edc4],
> property=struts]
> 13176 [http-8084-1] DEBUG 
> com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler
>  - Entering nullPropertyValue 
> [target=[com.opensymphony.xwork2.DefaultTextProvider@18a4edc4],
> property=struts]
> 13176 [http-8084-1] DEBUG com.opensymphony.xwork2.DefaultActionProxy  - 
> Creating an DefaultActionProxy
> for namespace / and action name ProjectStatus
> 13176 [http-8084-1] DEBUG com.opensymphony.xwork2.config.impl.AbstractMatcher 
>  - Attempting
> to match 'ProjectStatus' to a wildcard pattern, 3 available
> 13176 [http-8084-1] DEBUG com.opensymphony.xwork2.config.impl.AbstractMatcher 
>  - Value matches
> pattern 'Project*'
> 13177 [http-8084-1] DEBUG com.opensymphony.xwork2.interceptor.I18nInterceptor 
>  - intercept
> '//ProjectStatus' { 
> 13177 [http-8084-1] DEBUG com.opensymphony.xwork2.interceptor.I18nInterceptor 
>  - applied invocation
> context locale=en
> 13177 [http-8084-1] DEBUG 
> com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler
>  - Entering nullPropertyValue [target=[web.ProjectView@63ad6884, 
> com.opensymphony.xwork2.DefaultTextProvider@18a4edc4],
> property=locale]
> 13177 [http-8084-1] DEBUG com.opensymphony.xwork2.interceptor.I18nInterceptor 
>  - before Locale=null
> 13177 [http-8084-1] DEBUG 
> com.opensymphony.xwork2.conversion.impl.InstantiatingNullHandler
>  - Entering nullPropertyValue [target=[web.ProjectView@63ad6884, 
> com.opensymphony.xwork2.DefaultTextProvider@18a4edc4],
> property=struts]
> 13178 [http-8084-1] DEBUG 
> org.apache.struts2.interceptor.FileUploadInterceptor  - Bypassing
> //ProjectStatus
> 13178 [http-8084-1] DEBUG 
> 

[jira] [Updated] (WW-3452) let struts.custom.i18n.resources supports wildcard

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3452?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3452:
--
Description: 
{code:xml}

{code}

following code is my uncompleted patch,I want to know how to scan wildcard 
resources using xwork/struts2 util class.

org.apache.struts2.config.BeanSelectionProvider  line:245

{code:java}

LocalizedTextUtil.addDefaultResourceBundle("org/apache/struts2/struts-messages");

String bundles = 
props.getProperty(StrutsConstants.STRUTS_CUSTOM_I18N_RESOURCES);
if (bundles != null && bundles.length() > 0) {
StringTokenizer customBundles = new 
StringTokenizer(props.getProperty(StrutsConstants.STRUTS_CUSTOM_I18N_RESOURCES),
 ", ");

while (customBundles.hasMoreTokens()) {
String name = customBundles.nextToken();
// add start
if(name.contains("*")){
Collection resources = new HashSet(); 
//TODO scan resources from classpath
for(String res : resources)
try {
LOG.info("Loading global messages from " + res);
LocalizedTextUtil.addDefaultResourceBundle(res);
} catch (Exception e) {
LOG.error("Could not find messages file " + res + 
".properties. Skipping");
}
continue;
}
// add end
try {
LOG.info("Loading global messages from " + name);
LocalizedTextUtil.addDefaultResourceBundle(name);
} catch (Exception e) {
LOG.error("Could not find messages file " + name + 
".properties. Skipping");
}
}
}
{code}

  was:


following code is my uncompleted patch,I want to know how to scan wildcard 
resources using xwork/struts2 util class.

org.apache.struts2.config.BeanSelectionProvider  line:245

{code:java}

LocalizedTextUtil.addDefaultResourceBundle("org/apache/struts2/struts-messages");

String bundles = 
props.getProperty(StrutsConstants.STRUTS_CUSTOM_I18N_RESOURCES);
if (bundles != null && bundles.length() > 0) {
StringTokenizer customBundles = new 
StringTokenizer(props.getProperty(StrutsConstants.STRUTS_CUSTOM_I18N_RESOURCES),
 ", ");

while (customBundles.hasMoreTokens()) {
String name = customBundles.nextToken();
// add start
if(name.contains("*")){
Collection resources = new HashSet(); 
//TODO scan resources from classpath
for(String res : resources)
try {
LOG.info("Loading global messages from " + res);
LocalizedTextUtil.addDefaultResourceBundle(res);
} catch (Exception e) {
LOG.error("Could not find messages file " + res + 
".properties. Skipping");
}
continue;
}
// add end
try {
LOG.info("Loading global messages from " + name);
LocalizedTextUtil.addDefaultResourceBundle(name);
} catch (Exception e) {
LOG.error("Could not find messages file " + name + 
".properties. Skipping");
}
}
}
{code}


> let struts.custom.i18n.resources supports wildcard
> --
>
> Key: WW-3452
> URL: https://issues.apache.org/jira/browse/WW-3452
> Project: Struts 2
>  Issue Type: Improvement
>Reporter: Yanming Zhou
>Priority: Major
>  Labels: message, resource
> Fix For: 6.1.0
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> {code:xml}
>  value="resources.i18n.messages,com.acme.messages.*" />
> {code}
> following code is my uncompleted patch,I want to know how to scan wildcard 
> resources using xwork/struts2 util class.
> org.apache.struts2.config.BeanSelectionProvider  line:245
> {code:java}
> 
> LocalizedTextUtil.addDefaultResourceBundle("org/apache/struts2/struts-messages");
> String bundles = 
> props.getProperty(StrutsConstants.STRUTS_CUSTOM_I18N_RESOURCES);
> if (bundles != null && bundles.length() > 0) {
> StringTokenizer customBundles = new 
> StringTokenizer(props.getProperty(StrutsConstants.STRUTS_CUSTOM_I18N_RESOURCES),
>  ", ");
> while (customBundles.hasMoreTokens()) {
> String name = customBundles.nextToken();
> // add start
> if(name.contains("*")){
>   Collection resources = 

[jira] [Updated] (WW-3452) let struts.custom.i18n.resources supports wildcard

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3452?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3452:
--
Fix Version/s: 6.2.0
   (was: 6.1.0)

> let struts.custom.i18n.resources supports wildcard
> --
>
> Key: WW-3452
> URL: https://issues.apache.org/jira/browse/WW-3452
> Project: Struts 2
>  Issue Type: Improvement
>Reporter: Yanming Zhou
>Priority: Major
>  Labels: message, resource
> Fix For: 6.2.0
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> {code:xml}
>  value="resources.i18n.messages,com.acme.messages.*" />
> {code}
> following code is my uncompleted patch,I want to know how to scan wildcard 
> resources using xwork/struts2 util class.
> org.apache.struts2.config.BeanSelectionProvider  line:245
> {code:java}
> 
> LocalizedTextUtil.addDefaultResourceBundle("org/apache/struts2/struts-messages");
> String bundles = 
> props.getProperty(StrutsConstants.STRUTS_CUSTOM_I18N_RESOURCES);
> if (bundles != null && bundles.length() > 0) {
> StringTokenizer customBundles = new 
> StringTokenizer(props.getProperty(StrutsConstants.STRUTS_CUSTOM_I18N_RESOURCES),
>  ", ");
> while (customBundles.hasMoreTokens()) {
> String name = customBundles.nextToken();
> // add start
> if(name.contains("*")){
>   Collection resources = new HashSet(); 
> //TODO scan resources from classpath
>   for(String res : resources)
>   try {
> LOG.info("Loading global messages from " + res);
> LocalizedTextUtil.addDefaultResourceBundle(res);
> } catch (Exception e) {
> LOG.error("Could not find messages file " + res + 
> ".properties. Skipping");
> }
> continue;
> }
> // add end
> try {
> LOG.info("Loading global messages from " + name);
> LocalizedTextUtil.addDefaultResourceBundle(name);
> } catch (Exception e) {
> LOG.error("Could not find messages file " + name + 
> ".properties. Skipping");
> }
> }
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3476) Allow overwriting of constants for each package

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3476:
--
Fix Version/s: 6.2.0
   (was: 6.1.0)

> Allow overwriting of constants for each package
> ---
>
> Key: WW-3476
> URL: https://issues.apache.org/jira/browse/WW-3476
> Project: Struts 2
>  Issue Type: New Feature
>  Components: XML Configuration
>Affects Versions: 2.2.1
>Reporter: Johannes Geppert
>Priority: Major
> Fix For: 6.2.0
>
>
> Allow to overwriting of constants for each package.
> So I can specify as example for each package an other ActionMapper, Local or 
> other location for the JSP Files.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3452) let struts.custom.i18n.resources supports wildcard

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3452?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3452:
--
Description: 


following code is my uncompleted patch,I want to know how to scan wildcard 
resources using xwork/struts2 util class.

org.apache.struts2.config.BeanSelectionProvider  line:245

{code:java}

LocalizedTextUtil.addDefaultResourceBundle("org/apache/struts2/struts-messages");

String bundles = 
props.getProperty(StrutsConstants.STRUTS_CUSTOM_I18N_RESOURCES);
if (bundles != null && bundles.length() > 0) {
StringTokenizer customBundles = new 
StringTokenizer(props.getProperty(StrutsConstants.STRUTS_CUSTOM_I18N_RESOURCES),
 ", ");

while (customBundles.hasMoreTokens()) {
String name = customBundles.nextToken();
// add start
if(name.contains("*")){
Collection resources = new HashSet(); 
//TODO scan resources from classpath
for(String res : resources)
try {
LOG.info("Loading global messages from " + res);
LocalizedTextUtil.addDefaultResourceBundle(res);
} catch (Exception e) {
LOG.error("Could not find messages file " + res + 
".properties. Skipping");
}
continue;
}
// add end
try {
LOG.info("Loading global messages from " + name);
LocalizedTextUtil.addDefaultResourceBundle(name);
} catch (Exception e) {
LOG.error("Could not find messages file " + name + 
".properties. Skipping");
}
}
}
{code}

  was:


following code is my uncompleted patch,I want to know how to scan wildcard 
resources using xwork/struts2 util class.

org.apache.struts2.config.BeanSelectionProvider  line:245



LocalizedTextUtil.addDefaultResourceBundle("org/apache/struts2/struts-messages");

String bundles = 
props.getProperty(StrutsConstants.STRUTS_CUSTOM_I18N_RESOURCES);
if (bundles != null && bundles.length() > 0) {
StringTokenizer customBundles = new 
StringTokenizer(props.getProperty(StrutsConstants.STRUTS_CUSTOM_I18N_RESOURCES),
 ", ");

while (customBundles.hasMoreTokens()) {
String name = customBundles.nextToken();
// add start
if(name.contains("*")){
Collection resources = new HashSet(); 
//TODO scan resources from classpath
for(String res : resources)
try {
LOG.info("Loading global messages from " + res);
LocalizedTextUtil.addDefaultResourceBundle(res);
} catch (Exception e) {
LOG.error("Could not find messages file " + res + 
".properties. Skipping");
}
continue;
}
// add end
try {
LOG.info("Loading global messages from " + name);
LocalizedTextUtil.addDefaultResourceBundle(name);
} catch (Exception e) {
LOG.error("Could not find messages file " + name + 
".properties. Skipping");
}
}
}


> let struts.custom.i18n.resources supports wildcard
> --
>
> Key: WW-3452
> URL: https://issues.apache.org/jira/browse/WW-3452
> Project: Struts 2
>  Issue Type: Improvement
>Reporter: Yanming Zhou
>Priority: Major
>  Labels: message, resource
> Fix For: 6.1.0
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
>  value="resources.i18n.messages,com.acme.messages.*" />
> following code is my uncompleted patch,I want to know how to scan wildcard 
> resources using xwork/struts2 util class.
> org.apache.struts2.config.BeanSelectionProvider  line:245
> {code:java}
> 
> LocalizedTextUtil.addDefaultResourceBundle("org/apache/struts2/struts-messages");
> String bundles = 
> props.getProperty(StrutsConstants.STRUTS_CUSTOM_I18N_RESOURCES);
> if (bundles != null && bundles.length() > 0) {
> StringTokenizer customBundles = new 
> StringTokenizer(props.getProperty(StrutsConstants.STRUTS_CUSTOM_I18N_RESOURCES),
>  ", ");
> while (customBundles.hasMoreTokens()) {
> String name = customBundles.nextToken();
> // add start
> if(name.contains("*")){
>   Collection resources = new HashSet(); 
> //TODO scan resources from classpath
> 

[jira] [Updated] (WW-3447) convention plugin has no testcases

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3447:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> convention plugin has no testcases
> --
>
> Key: WW-3447
> URL: https://issues.apache.org/jira/browse/WW-3447
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - Convention
>Affects Versions: 2.1.8
> Environment: All
>Reporter: Martin Gainty
>Priority: Major
> Fix For: 7.0.0
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> There are currently no testcases for convention plugin there is no way to 
> verify if convention-plugin actually works ..we need pass/fail testcases for 
> all of constant parameters from struts-plugin.xml
>   
>   
>   
>value="convention"/>
>   
>   
>   
>   
>   
>   
>value="true"/>
>value="convention-default"/>
>   
>   
>value="action,actions,struts,struts2"/>
>   
>   
>value="org.apache.struts.*,org.apache.struts2.*,org.springframework.web.struts.*,org.springframework.web.struts2.*,org.hibernate.*"/>
>value="dispatcher,velocity,freemarker"/>
>   
>   
>   
>   
>   
>   
>   



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3427) If you alias a property that uses a custom TypeConverter and it throws TypeConversionException the error is never caught

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3427?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3427:
--
Description: 
If you define an alias to a property like so:

{code:java}
@Actions({
  @Action(
value="/icc/saveScan",
interceptorRefs=@InterceptorRef("ptiDefault"),
results={
  @Result(name="input", location="/error.jsp"), 
  @Result(name="success", location="/success.jsp")
},
params={"aliases", 
  "#{\"plateId\" : \"plate\", " +
"\"machineAbbr\" : \"machine\", "+
"\"imageFiles\" : \"scanData\"}"
}
*/
  )
})
{code}

and the property (say imageFiles/scanData) has a custom TypeConverter 
configured like so:

{code:java}
@ConversionErrorFieldValidator(type = ValidatorType.FIELD, 
key="invalid.fieldvalue.xxx",
message = "well not found or imageFiles not in format: 
file,wellId|file,wellId|...",
shortCircuit=true)
@TypeConversion(rule = ConversionRule.COLLECTION, 
converter = "com.ptilabs.icc.action.ScanData")
public void setScanData(List imageFiles) {
this.imageFiles = imageFiles;
}
{code}{

If the {{TypeConverter}} throws a {{TypeConversionException}} the exception is 
never caught by the {{ConversionErrorInterceptor}} or 
{{ConversionErrorFieldValidator}}.

If I disable the aliasing and rename the method {{setImageFiles}} everything 
works correctly.

I'm trying to debug on my own but I can't find the class responsible for 
catching the {{TypeConversionException}} and placing it in the 
{{invocationContext.getConversionErrors()}}


  was:
If you define an alias to a property like so:
@Actions({
@Action(value="/icc/saveScan",
interceptorRefs=@InterceptorRef("ptiDefault"),
results={
@Result(name="input", location="/error.jsp"), 
@Result(name="success", location="/success.jsp")
},
 params={"aliases", 
"#{\"plateId\" : \"plate\", " +
"\"machineAbbr\" : \"machine\", "+
"\"imageFiles\" : \"scanData\"}"}
 */
)
})


and the property (say imageFiles/scanData) has a custom TypeConverter 
configured like so:
@ConversionErrorFieldValidator(type = ValidatorType.FIELD, 
key="invalid.fieldvalue.xxx",
message = "well not found or imageFiles not in format: 
file,wellId|file,wellId|...",
shortCircuit=true)
@TypeConversion(rule = ConversionRule.COLLECTION, 
converter = "com.ptilabs.icc.action.ScanData")
public void setScanData(List imageFiles) {
this.imageFiles = imageFiles;
}

If the TypeConverter throws a TypeConversionException the exception is never 
caught by the ConversionErrorInterceptor or ConversionErrorFieldValidator.

If I disable the aliasing and rename the method setImageFiles everything works 
correctly.

I'm trying to debug on my own but I can't find the class responsible for 
catching the TypeConversionException and placing it in the 
invocationContext.getConversionErrors()



> If you alias a property that uses a custom TypeConverter and it throws 
> TypeConversionException the error is never caught
> 
>
> Key: WW-3427
> URL: https://issues.apache.org/jira/browse/WW-3427
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core Interceptors
>Affects Versions: 2.1.8.1
> Environment: Windows
>Reporter: Sloan Seaman
>Priority: Major
>  Labels: conversion, struts, type
> Fix For: 6.1.0
>
>
> If you define an alias to a property like so:
> {code:java}
> @Actions({
>   @Action(
> value="/icc/saveScan",
> interceptorRefs=@InterceptorRef("ptiDefault"),
> results={
>   @Result(name="input", location="/error.jsp"), 
>   @Result(name="success", location="/success.jsp")
> },
> params={"aliases", 
>   "#{\"plateId\" : \"plate\", " +
> "\"machineAbbr\" : \"machine\", "+
> "\"imageFiles\" : \"scanData\"}"
> }
> */
>   )
> })
> {code}
> and the property (say imageFiles/scanData) has a custom TypeConverter 
> configured like so:
> {code:java}
>   @ConversionErrorFieldValidator(type = ValidatorType.FIELD, 
>   key="invalid.fieldvalue.xxx",
>   message = "well not found or imageFiles not in format: 
> file,wellId|file,wellId|...",
>   shortCircuit=true)
>

[jira] [Updated] (WW-3427) If you alias a property that uses a custom TypeConverter and it throws TypeConversionException the error is never caught

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3427?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3427:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> If you alias a property that uses a custom TypeConverter and it throws 
> TypeConversionException the error is never caught
> 
>
> Key: WW-3427
> URL: https://issues.apache.org/jira/browse/WW-3427
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core Interceptors
>Affects Versions: 2.1.8.1
> Environment: Windows
>Reporter: Sloan Seaman
>Priority: Major
>  Labels: conversion, struts, type
> Fix For: 7.0.0
>
>
> If you define an alias to a property like so:
> {code:java}
> @Actions({
>   @Action(
> value="/icc/saveScan",
> interceptorRefs=@InterceptorRef("ptiDefault"),
> results={
>   @Result(name="input", location="/error.jsp"), 
>   @Result(name="success", location="/success.jsp")
> },
> params={"aliases", 
>   "#{\"plateId\" : \"plate\", " +
> "\"machineAbbr\" : \"machine\", "+
> "\"imageFiles\" : \"scanData\"}"
> }
> */
>   )
> })
> {code}
> and the property (say imageFiles/scanData) has a custom TypeConverter 
> configured like so:
> {code:java}
>   @ConversionErrorFieldValidator(type = ValidatorType.FIELD, 
>   key="invalid.fieldvalue.xxx",
>   message = "well not found or imageFiles not in format: 
> file,wellId|file,wellId|...",
>   shortCircuit=true)
>   @TypeConversion(rule = ConversionRule.COLLECTION, 
>   converter = "com.ptilabs.icc.action.ScanData")
>   public void setScanData(List imageFiles) {
>   this.imageFiles = imageFiles;
>   }
> {code}{
> If the {{TypeConverter}} throws a {{TypeConversionException}} the exception 
> is never caught by the {{ConversionErrorInterceptor}} or 
> {{ConversionErrorFieldValidator}}.
> If I disable the aliasing and rename the method {{setImageFiles}} everything 
> works correctly.
> I'm trying to debug on my own but I can't find the class responsible for 
> catching the {{TypeConversionException}} and placing it in the 
> {{invocationContext.getConversionErrors()}}
>   



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (WW-3364) Using convertors in JSON serialization

2022-10-22 Thread Lukasz Lenart (Jira)


[ 
https://issues.apache.org/jira/browse/WW-3364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17622621#comment-17622621
 ] 

Lukasz Lenart commented on WW-3364:
---

Maybe implementing a new JSON plugin and marking the current as deprecated is 
better idea.

> Using convertors in JSON serialization
> --
>
> Key: WW-3364
> URL: https://issues.apache.org/jira/browse/WW-3364
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Plugin - JSON
>Affects Versions: 2.1.8
>Reporter: Rahul Mohan
>Priority: Major
>  Labels: JSON
> Fix For: 6.2.0
>
>
> The bundled JSON plugin does not use registered convertors for data 
> conversion. This seriously affects the implementation of gracefully degrading 
> ajax apps.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3364) Using convertors in JSON serialization

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3364?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3364:
--
Fix Version/s: 6.2.0
   (was: 6.1.0)

> Using convertors in JSON serialization
> --
>
> Key: WW-3364
> URL: https://issues.apache.org/jira/browse/WW-3364
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Plugin - JSON
>Affects Versions: 2.1.8
>Reporter: Rahul Mohan
>Priority: Major
>  Labels: JSON
> Fix For: 6.2.0
>
>
> The bundled JSON plugin does not use registered convertors for data 
> conversion. This seriously affects the implementation of gracefully degrading 
> ajax apps.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3353) StrutsTestCase doesn't work with rest-plugin

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3353:
--
Fix Version/s: 6.2.0
   (was: 6.1.0)

> StrutsTestCase doesn't work with rest-plugin
> 
>
> Key: WW-3353
> URL: https://issues.apache.org/jira/browse/WW-3353
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - REST
>Affects Versions: 2.1.8
>Reporter: Bill Stilwell
>Priority: Major
> Fix For: 6.2.0
>
> Attachments: GetOrdersStrutsTest.java, pom.xml
>
>
> StrutsTestCase doesn't seem to work with rest-plugin. I can create action 
> mapping/action proxies, but they don't work - for e.g., a request for 
> /orders/3 against the rest-showcase controller doesn't call setId. 
> I will attach a sample unit test that demonstrates the issue.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-4382) Enhance Single Character Test

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-4382:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> Enhance Single Character Test
> -
>
> Key: WW-4382
> URL: https://issues.apache.org/jira/browse/WW-4382
> Project: Struts 2
>  Issue Type: Improvement
>Affects Versions: 2.3.16.3
> Environment: Any
>Reporter: Larry D. Wilson
>Priority: Minor
>  Labels: easyfix, test
> Fix For: 7.0.0
>
>
> When testing for a single character, Struts2 requires a very specific format 
> that is not required for strings longer than 1 character:
> 1 - Doesn't display anything
> {code:xml}
> 
> 
>   
> 
> {code}
> 2 - Displays checkmark
> {code:xml}
> 
>   
> 
> {code}
> While single quotes works comparing strings longer than 1 character, it does 
> not work with 1 character strings. This is inconsistent behavior.
> For example, this test code matches because the string is longer than 1 
> character:
> {code:xml}
> 
>   Matches
> 
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-4463) Support propagating ognl errors other than NoSuchPropertyException

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-4463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-4463:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> Support propagating ognl errors other than NoSuchPropertyException
> --
>
> Key: WW-4463
> URL: https://issues.apache.org/jira/browse/WW-4463
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Actions
>Affects Versions: 2.3.20
>Reporter: Jasper Rosenberg
>Priority: Minor
>  Labels: ognl
> Fix For: 7.0.0
>
>
> So, if you have a getter on an action that does some real work (say lazy load 
> a list of cars from the database), and therefore might fail, it would be nice 
> to have the option to have that propagate the exception, rather than be 
> interpreted as if the property was not defined.
> The place that looks like this should be done is OgnlValueStack.setValue().  
> It takes throwExceptionOnFailure, but that is all or nothing.  That ends up 
> including XWorkExceptions with a root issue of ognl NoSuchPropertyException.  
> These are frequent and not something we care about, at least in our code 
> base.  What I'd like to do is have some kind of parameterization that would 
> let me turn on error propagation for not ognl property missing error.  I did 
> this locally, but it had to be super hacky because OgnlValueStack.setValue() 
> is private.  I basically installed my own ValueStackFactory that returned a 
> copy of OgnlValueStack with the function changed to be like:
> {code:java}
> /**
>  * @see 
> com.opensymphony.xwork2.util.ValueStack#findValue(java.lang.String)
>  */
> public Object findValue(String expr, boolean throwExceptionOnFailure) {
> try {
> setupExceptionOnFailure(throwExceptionOnFailure);
> return tryFindValueWhenExpressionIsNotNull(expr);
> } catch (OgnlException e) {
> return handleOgnlException(expr, throwExceptionOnFailure, e);
> } catch (XWorkException e) {
> Throwable cause = e.getCause();
> if (cause instanceof NoSuchPropertyException) {
> return handleOtherException(expr, throwExceptionOnFailure, e);
> }
> return handleOtherException(expr, true, e);
> } catch (Exception e) {
> return handleOtherException(expr, throwExceptionOnFailure, e);
> } finally {
> ReflectionContextState.clear(context);
> }
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-4478) Can't install own ValidatorFileParser

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-4478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-4478:
--
Fix Version/s: 6.2.0
   (was: 6.1.0)

> Can't install own ValidatorFileParser
> -
>
> Key: WW-4478
> URL: https://issues.apache.org/jira/browse/WW-4478
> Project: Struts 2
>  Issue Type: Improvement
>  Components: XML Validators
>Affects Versions: 2.3.20
>Reporter: Jasper Rosenberg
>Priority: Minor
> Fix For: 6.2.0
>
>
> I'd like to install my own implementation of 
> com.opensymphony.xwork2.validator.ValidatorFileParser, but I can't w/o 
> overwriting the whole default struts xml because it uses "default" as the 
> name, and there is no property with which to set it.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3338) tag should interpret its value attribute same as the other tags do.

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3338:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

>  tag should interpret its value attribute same as the other tags do.
> --
>
> Key: WW-3338
> URL: https://issues.apache.org/jira/browse/WW-3338
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Plugin - Tags
>Affects Versions: 2.1.8
>Reporter: Andreas Krüger
>Priority: Major
> Fix For: 7.0.0
>
>
> According to http://struts.apache.org/2.1.8.1/docs/tag-syntax.html , any 
> attribute value="" is interpreted for OGNL.
> This is not true for {{}} , which will use the 
> literal string "myprop".
> To get it to call my bean's getMyprop(), I need to say {{ value="%\{myprop}" />}}
> Would be nice if this could be streamlined, so s:hidden conforms to the 
> general principle.
> As that change might break existing code, it might be more easily asked for 
> than done.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-4520) Add prefix for CSS classes

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-4520?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-4520:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> Add prefix for CSS classes
> --
>
> Key: WW-4520
> URL: https://issues.apache.org/jira/browse/WW-4520
> Project: Struts 2
>  Issue Type: Improvement
>Reporter: Aleksandr Mashchenko
>Priority: Minor
> Fix For: 7.0.0
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Add prefix for CSS classes used in Struts to minimize collisions with other 
> frameworks/user defined CSS classes.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3262) improve wildcard to support regular expressions

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3262:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> improve wildcard to support regular expressions
> ---
>
> Key: WW-3262
> URL: https://issues.apache.org/jira/browse/WW-3262
> Project: Struts 2
>  Issue Type: Improvement
>Affects Versions: 2.1.8
>Reporter: Musachy Barroso
>Priority: Major
> Fix For: 7.0.0
>
>
> The regular expressions will follow the syntax of JAX-RS. They can be like 
> {{\{PARAM_NAME\}}} or {{\{PARAM_NAME:REGEX\}}}. For example:
> {code:xml}
>
>class="org.apache.struts2.showcase.UITagExample">
>   /tags/ui/example.jsp
>   
>   
>   
>   
>class="org.apache.struts2.showcase.UITagExample">
>   /tags/ui/example.jsp
>   
>class="org.apache.struts2.showcase.UITagExample">
>   /tags/ui/{1}.jsp
>   
>   
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3095) URL has no setEncoding

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3095?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3095:
--
Fix Version/s: 6.2.0
   (was: 6.1.0)

> URL has no setEncoding
> --
>
> Key: WW-3095
> URL: https://issues.apache.org/jira/browse/WW-3095
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - Tags
>Affects Versions: 2.1.6
> Environment: Struts 2.1.6
> TC 6.0.14
> JDK 1.6.0.10
>Reporter: Martin Gainty
>Priority: Major
> Fix For: 6.2.0
>
>
> If I set encoding the encoding to UTF-8 in struts.properties as 
>  struts.i18n.encoding=UTF-8
> //If I implement the include tag I see all appropriate annotations e.g.
> @StrutsTag(name="include", 
> tldTagClass="org.apache.struts2.views.jsp.IncludeTag", description="Include a 
> servlet's output " +
>  "(result of servlet or a JSP page)")
> public class Include extends Component {
>
> //more importantly the include will support the STRUTS_I18N_ENCODING 
> DefaultEncoding with this inject //annotation
> @Inject(StrutsConstants.STRUTS_I18N_ENCODING)
>  public void setDefaultEncoding(String encoding) {
>  defaultEncoding = encoding;
>  }
> //but viewing the URL code I see
> @StrutsTag(name="url", tldTagClass="org.apache.struts2.views.jsp.URLTag", 
> description="This tag is used to create a URL")
> public class URL extends ContextBean
> //there is no setDefaultEncoding which means any new encodings in 
> struts.properties will not be reflected here
> MCG 22 April 09



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-2975) client side validation and components with forms

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-2975?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-2975:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> client side validation and components with forms
> 
>
> Key: WW-2975
> URL: https://issues.apache.org/jira/browse/WW-2975
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Other
>Affects Versions: 2.1.6
>Reporter: Miguel Diaz
>Priority: Major
> Fix For: 7.0.0
>
>
> When form-close-validate.ftl generates the JavaScript validation code, it 
> only takes into account the fields that are present in the  when it's 
> processed (via parameters.tagNames).
> There are two problems with this:
> - if for some reason a field is missing, the validation will fail but no 
> message will be displayed
> - if one creates a  that builds a form and gets some fields 
> passed to it in a parameter (i.e. receives the HTML generated by some fields) 
> then the form doesn't know about the fields so they aren't included in the 
> "tagNames" parameter, thus not taken into account for the JavaScript 
> validation



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-2934) conversion error should short-circuit all validators

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-2934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-2934:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> conversion error should short-circuit all validators 
> -
>
> Key: WW-2934
> URL: https://issues.apache.org/jira/browse/WW-2934
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Interceptors
>Affects Versions: 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 
> 2.0.8, 2.0.9, 2.0.10, 2.0.11, 2.0.11.1, 2.0.11.2, 2.0.12, 2.0.13, 2.0.14, 
> 2.1.0, 2.1.1, 2.1.2
>Reporter: Noel Hernández
>Priority: Major
> Fix For: 7.0.0
>
>
> If there is an error converting a field, the validators for that field should 
> be skipped. For example, let's say I have an action with an "age" field 
> declared as an Integer, and the field is required. If the user enters "one", 
> the user will see two errors: one from the conversion process, and one from 
> the required validator (since the field was never assigned).
> In general, a conversion error should short-circuit all validators for that 
> field, since validators depend on the field being set, which never happens if 
> there was a conversion error.
> Validators are essential for real world projects, this is a big issue with 
> struts2.
> look at stripes framework for a good designed validator framework.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-1522) Automatic Alias ActionConfigs

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-1522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-1522:
--
Fix Version/s: 6.2.0
   (was: 6.1.0)

> Automatic Alias ActionConfigs
> -
>
> Key: WW-1522
> URL: https://issues.apache.org/jira/browse/WW-1522
> Project: Struts 2
>  Issue Type: Improvement
>Reporter: Ted Husted
>Priority: Major
> Fix For: 6.2.0
>
>
> Create ActionConfigs for Action class methods that do not already have aliases
> The initial "dynamic method invocation" implementation does not create an 
> ActionConfig, but scans for a "!" and invokes the method directly. The 
> implementation doesn't allow these alias methods to be browsed, overrridden 
> with static actions, nor can they have their own validators, type convertors 
> or resources. 
> Rather than scan for dynamic method references at run time, an alternate 
> approach would be to scan the configuration when it is first loaded and 
> create ActionConfigs for all potential alias methods. 
> See also http://www.mail-archive.com/dev%40struts.apache.org/msg25916.html



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-2635) Flash scope

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-2635?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-2635:
--
Fix Version/s: 6.2.0
   (was: 6.1.0)

> Flash scope
> ---
>
> Key: WW-2635
> URL: https://issues.apache.org/jira/browse/WW-2635
> Project: Struts 2
>  Issue Type: New Feature
>  Components: New API
>Reporter: Guillaume Bilodeau
>Priority: Major
> Fix For: 6.2.0
>
> Attachments: FlashInterceptor.java, FlashInterceptorTest.java, 
> FlashResult.java, FlashResultTest.java
>
>
> I have developed a FlashResult / FlashInterceptor pair to implement "flash" 
> scope in a way that follows the usual Struts2 principles and respects its 
> "feel".
> It basically works like the ServletActionRedirectResult except that instead 
> of converting all extra parameters to strings and adding them as HTTP 
> parameters in the redirect URL, it creates a HashMap using these parameter 
> key/value pairs with no conversion and stores it in the user session.  On the 
> next HTTP request the FlashInterceptor, if properly added to the interceptor 
> stack, will retrieve this map and copy the map entries to the target action 
> using the parameter keys.  It should work for all data types.
> To function correctly this approach assumes that bug WW-2170 is fixed.  The 
> implementation also borrows a lot from the ServletActionRedirectResult and 
> some refactoring should 
> be done.
> While there may be issues with flash scope in general with regards to 
> repeated GETs being inconsistent, there are some valid use cases such as when 
> saving messages to be displayed after a redirect.  I think it's good for the 
> developer to have this tool and it could make a nice addition to the Struts2 
> code base.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-2820) REST Plugin Issues/Improvements

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-2820?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-2820:
--
Fix Version/s: 6.2.0
   (was: 6.1.0)

> REST Plugin Issues/Improvements
> ---
>
> Key: WW-2820
> URL: https://issues.apache.org/jira/browse/WW-2820
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Plugin - REST
>Affects Versions: 2.1.2
>Reporter: Alvin Singh
>Priority: Major
> Fix For: 6.2.0
>
>
> I didn't know whether I should create separate issues for each (some are not 
> issues but just require some doco). Issues described here - 
> http://www.nabble.com/forum/ViewPost.jtp?post=19230238=y -
> - If you want a blank namespace - do not use "/" as your namespace in your 
> struts xml's or in namespace notation. Inconsistent behavior starts to occur. 
> - If you want a specific namespace - e.g. /v1 - you must ensure your 
> namespace has prefixed slash i.e. "/v1" otherwise it will not work
> - If you are using tiles or even jsp (I think) and have the same name folder 
> as a namespace your rest urls will not execute the action 
> - Your actions/controllers must be suffixed with 'Controller' or the action 
> mapper will not pick them up (wiki says it is optional) 
> - If you have a action/controller name the same as the package name its in - 
> strange things happen (can't find action mapping etc.). e.g package name is 
> au.com.test.rest.space, class in this package with name SpaceController will 
> not work correctly - SpacesController will.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-5209) Upgrade to Jakarta Bean Validation 3.0

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-5209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-5209:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> Upgrade to Jakarta Bean Validation 3.0
> --
>
> Key: WW-5209
> URL: https://issues.apache.org/jira/browse/WW-5209
> Project: Struts 2
>  Issue Type: Dependency
>  Components: Plugin - Bean Validation
>Reporter: Lukasz Lenart
>Priority: Major
> Fix For: 7.0.0
>
>
> https://beanvalidation.org/3.0/



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-5199) StrutsPrepareFilter and StrutsExecuteFilter do not support forwarding to another action

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-5199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-5199:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> StrutsPrepareFilter and StrutsExecuteFilter do not support forwarding to 
> another action
> ---
>
> Key: WW-5199
> URL: https://issues.apache.org/jira/browse/WW-5199
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 6.0.0
>Reporter: Lukasz Lenart
>Priority: Major
> Fix For: 7.0.0
>
>
> Ween using {{StrutsPrepareFilter}}/{{StrutsExecuteFilter}} combination it 
> isn't possible to use {{DispatcherResult}} with forwarding to another actions 
> - it's do to the cleanup counter implemented in those filters.
> The same application using {{StrutsPrepareAndExecuteFilter}} works perfectly 
> fine, this is covered by 
> {{apps/showcase/src/test/java/it/org/apache/struts2/showcase/DispatcherResultTest.java}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-4062) Invalid OGNL expressions are not cached

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-4062?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-4062:
--
Fix Version/s: 6.2.0
   (was: 6.1.0)

> Invalid OGNL expressions are not cached
> ---
>
> Key: WW-4062
> URL: https://issues.apache.org/jira/browse/WW-4062
> Project: Struts 2
>  Issue Type: Bug
>  Components: Value Stack
>Affects Versions: 2.3.14
>Reporter: Saulius Tvarijonas
>Priority: Major
> Fix For: 6.2.0
>
> Attachments: WW-4062.PNG
>
>
> I am using velocity to render results page. During performance optimizations 
> I noticed significant memory usage from 
> *com.opensymphony.xwork2.ognl.OgnlUtil#compile*. There is caching implemented 
> in OgnlUtil, but if expression compilation fails, it is not cached.
> I am not really sure if this problem is in struts or velocity engine. But 
> situation is following:
> # In velocity template trying to render string *$!foo*
> # If value is null, velocity calls 
> *org.apache.velocity.runtime.parser.node.ASTReference#getNullString*
> # Internally there is call to *context.get(".literal." + nullString)*
> # And this ".literal." expression always reaches *OgnlUtil#compile* and 
> compilation fails.
> Below is stacktrace for more details:
> {code}
> at com.opensymphony.xwork2.ognl.OgnlUtil.compile(OgnlUtil.java:248)
> at com.opensymphony.xwork2.ognl.OgnlUtil.getValue(OgnlUtil.java:236)
> at 
> com.opensymphony.xwork2.ognl.OgnlValueStack.getValueUsingOgnl(OgnlValueStack.java:291)
> at 
> com.opensymphony.xwork2.ognl.OgnlValueStack.tryFindValue(OgnlValueStack.java:274)
> at 
> com.opensymphony.xwork2.ognl.OgnlValueStack.tryFindValueWhenExpressionIsNotNull(OgnlValueStack.java:256)
> at 
> com.opensymphony.xwork2.ognl.OgnlValueStack.findValue(OgnlValueStack.java:236)
> at 
> com.opensymphony.xwork2.ognl.OgnlValueStack.findValue(OgnlValueStack.java:298)
> at 
> org.apache.struts2.dispatcher.StrutsRequestWrapper.getAttribute(StrutsRequestWrapper.java:82)
> at org.apache.velocity.tools.view.context.ChainedContext.getAttribute(Unknown 
> Source:-1)
> at org.apache.velocity.tools.view.context.ChainedContext.internalGet(Unknown 
> Source:-1)
> at org.apache.velocity.context.AbstractContext.get(AbstractContext.java:193)
> at 
> org.apache.velocity.context.InternalContextAdapterImpl.get(InternalContextAdapterImpl.java:267)
> at 
> org.apache.velocity.runtime.parser.node.ASTReference.getNullString(ASTReference.java:510)
> at 
> org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:465)
> at 
> org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
> at 
> org.apache.velocity.runtime.parser.node.ASTStringLiteral.value(ASTStringLiteral.java:330)
> at 
> org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71)
> at 
> org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142)
> at 
> org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
> at org.apache.velocity.runtime.directive.Parse.render(Parse.java:260)
> at 
> org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:207)
> at 
> org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
> at org.apache.velocity.Template.merge(Template.java:356)
> at org.apache.velocity.Template.merge(Template.java:260)
> at 
> org.apache.struts2.dispatcher.VelocityResult.doExecute(VelocityResult.java:156)
> at 
> org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-4393) Move FreeMarker support into dedicated plugin

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-4393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-4393:
--
Fix Version/s: 6.2.0
   (was: 6.1.0)

> Move FreeMarker support into dedicated plugin
> -
>
> Key: WW-4393
> URL: https://issues.apache.org/jira/browse/WW-4393
> Project: Struts 2
>  Issue Type: Improvement
>Reporter: Lukasz Lenart
>Priority: Major
> Fix For: 6.2.0
>
>
> The same as WW-4243



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-4394) Move JSP support into dedicated plugin

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-4394?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-4394:
--
Fix Version/s: 6.2.0
   (was: 6.1.0)

> Move JSP support into dedicated plugin
> --
>
> Key: WW-4394
> URL: https://issues.apache.org/jira/browse/WW-4394
> Project: Struts 2
>  Issue Type: Improvement
>Reporter: Lukasz Lenart
>Priority: Major
> Fix For: 6.2.0
>
>
> The same as WW-4243



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Closed] (WW-3392) Submit Template pushId existence.

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart closed WW-3392.
-
Resolution: Won't Fix

DOJO plugin has been removed

> Submit Template pushId existence.
> -
>
> Key: WW-3392
> URL: https://issues.apache.org/jira/browse/WW-3392
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - Dojo Tags
>Affects Versions: 2.1.8.1
>Reporter: Ken Hoying
>Assignee: Lukasz Lenart
>Priority: Major
>
> There is bug in the submit.ftl ajax template.  At the bottom of the template 
> it is not properly checking for the existence of the paramers.pushId.  
> NOTE:  I have not checked, but I suspect that the same problem occurs in 
> other tags.
> Current code:
> <#if parameters.pushId>
>  type="text/javascript">djConfig.searchIds.push("${parameters.id?html}");
>  
> Suggested Fix:
> <#if parameters.validate?exists>
>   <#if parameters.pushId>
>  type="text/javascript">djConfig.searchIds.push("${parameters.id?html}");
>   
> 
> The result that led me to find this was that if I made an Ajax call to update 
> a DIV and that Ajax call returned content that included additional JavaScript 
> to be run as well as an Ajax submit tag, then my additional JavaScript code 
> was not being executed.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3392) Submit Template pushId existence.

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3392:
--
Fix Version/s: (was: 6.1.0)

> Submit Template pushId existence.
> -
>
> Key: WW-3392
> URL: https://issues.apache.org/jira/browse/WW-3392
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - Dojo Tags
>Affects Versions: 2.1.8.1
>Reporter: Ken Hoying
>Assignee: Lukasz Lenart
>Priority: Major
>
> There is bug in the submit.ftl ajax template.  At the bottom of the template 
> it is not properly checking for the existence of the paramers.pushId.  
> NOTE:  I have not checked, but I suspect that the same problem occurs in 
> other tags.
> Current code:
> <#if parameters.pushId>
>  type="text/javascript">djConfig.searchIds.push("${parameters.id?html}");
>  
> Suggested Fix:
> <#if parameters.validate?exists>
>   <#if parameters.pushId>
>  type="text/javascript">djConfig.searchIds.push("${parameters.id?html}");
>   
> 
> The result that led me to find this was that if I made an Ajax call to update 
> a DIV and that Ajax call returned content that included additional JavaScript 
> to be run as well as an Ajax submit tag, then my additional JavaScript code 
> was not being executed.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3871) TypeConversion annotation support improvement

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3871:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> TypeConversion annotation support improvement
> -
>
> Key: WW-3871
> URL: https://issues.apache.org/jira/browse/WW-3871
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Plugin - Convention
>Affects Versions: 2.3.4.1
>Reporter: Pavan Ananth
>Priority: Major
> Fix For: 7.0.0
>
>
> The annotation support for TypeConversion in Struts 2 is too literal an 
> interpretation of the XML support. For instance, I am required to supply this 
> if I have choose the CreateIfNull feature at a property level :
> @TypeConversion(key="CreateIfNull_users", rule=ConversionRule.CreateIfNull, 
> value="true")
> List users;
> Given that the rule is CreateIfNull, the key can be constructed implicitly 
> using property name - why is it asked of an user to type in the full key. 
> This holds good for the other supported ConversionRules as well



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-2278) Move S2 Tags into a plugin

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-2278?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-2278:
--
Fix Version/s: 6.2.0
   (was: 6.1.0)

> Move S2 Tags into a plugin
> --
>
> Key: WW-2278
> URL: https://issues.apache.org/jira/browse/WW-2278
> Project: Struts 2
>  Issue Type: Task
>  Components: Plugin - Tags
>Affects Versions: 2.1.0
>Reporter: Ted Husted
>Priority: Major
> Fix For: 6.2.0
>
>
> See tread on list "Should tags be their own plugin?" beginning 5 Oct 2007. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-5141) Support for JEE 9+

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-5141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-5141:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> Support for JEE 9+ 
> ---
>
> Key: WW-5141
> URL: https://issues.apache.org/jira/browse/WW-5141
> Project: Struts 2
>  Issue Type: New Feature
>  Components: Core
>Reporter: Daniel Le Berre
>Priority: Major
> Fix For: 7.0.0
>
> Attachments: pom.xml
>
>
> JEE 9 breaks the JEE API by replacing javax domain by jakarta.
> Tomcat 10 implements some specifications of JEE 9.
> Struts 2.5 has some dependencies with the javax servlet API.
> Struts would require some changes to run on Tomcat 10+.
> Is there any plan to support JEE 9+ in the future?
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-4323) Ability to accept params purely by implementing ParamNameAware is broken

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-4323?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-4323:
--
Fix Version/s: (was: 6.2.0)
   7.0.0

> Ability to accept params purely by implementing ParamNameAware is broken
> 
>
> Key: WW-4323
> URL: https://issues.apache.org/jira/browse/WW-4323
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.3.16.1
> Environment: struts2 version 2.3.16.1
>Reporter: Kyle Braak
>Priority: Major
> Fix For: 7.0.0
>
>
> The ability to accept params purely by implementing ParamNameAware is broken.
> Relates to WW-3866 which is when this feature was added for version 2.3.5
> The commit that breaks this feature is: 
> https://github.com/apache/struts/commit/4e981b08cc37374d06e77cf78000d98c5ff0
> Description:
> Prior to this change/2.3.16.1 it was quite convenient to define what 
> parameters my action should accept, by implementing 
> ParameterNameAware#acceptableParameterName. With this change, there is the 
> additional requirement that the parameter names must also satisfy 
> acceptableName(name).
> In the ParametersInterceptor javadoc, it says: "if you wish to apply a global 
> rule that isn't implemented in your action, then you could extend this 
> interceptor and override the {@link #acceptableName(String)} method." So this 
> isn't suitable for customizing a single action.
> Looking more carefully at the code, another alternative to defining what 
> parameters my action can accept, looks to be via populating the 
> ParametersInterceptor's field acceptParams. Apparently this could be done in 
> the interceptor stack from what I have read here: 
> http://struts.apache.org/release/2.3.x/docs/parameters-interceptor.html
> By forcing one to populate acceptParams, and also implement 
> ParameterNameAware#acceptableParameterName it becomes quite difficult to add 
> custom behavior. I understand people should fully understand what they are 
> doing due to the security risks involved, but it is probably safer to define 
> the behavior in a single place.
> I'd greatly appreciate your help understanding how to adapt to this change. 
> In the meantime, I'll have to continue using 2.3.15.3
> Thanks



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-4311) HttpHeaderResult should allow to provide a body for the response

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-4311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-4311:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> HttpHeaderResult should allow to provide a body for the response
> 
>
> Key: WW-4311
> URL: https://issues.apache.org/jira/browse/WW-4311
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Dispatch Filter
>Reporter: Jose L Martinez-Avial
>Priority: Minor
> Fix For: 7.0.0
>
>
> Curently the HttpHeaderResult can only write to the body response if it is 
> the result has a parameter error (through the errorMessage setter), and then 
> it uses javax.servlet.http.HttpServletResponse#sendError(int, String) to send 
> the error, with the error message in the body, to the client.
> If the result has a parameters status, and no error, then nothing is written 
> to the response body. It only set the status and the headers, and send it to 
> the client.
> I suggest to add a parameter message that can be written to the response when 
> using the parameter status.
> I'm working on a patch for this, it shouldn't take long.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3429) tag generated by produce HTML warning in validators

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3429?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3429:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

>  tag generated by  produce HTML warning in validators
> 
>
> Key: WW-3429
> URL: https://issues.apache.org/jira/browse/WW-3429
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core Interceptors, Other
>Affects Versions: 2.1.8.1
> Environment: Apache Tomcat 5.5, 6.0.18 running on Win 32 and Fedora 
> Code Linux x86_64. Actually, bug is relevant to any environment.
>Reporter: Alexey Malev
>Assignee: Lukasz Lenart
>Priority: Minor
>  Labels: checkbox, hidden, html, input, warning
> Fix For: 7.0.0
>
> Attachments: CheckboxInterceptor.java, checkbox.ftl, diff.txt
>
>
>  tag with default xhtml theme produce an  tag, like that 
> one:
>  name="__checkbox_vacancy.open" value="true" />
> produces HTML Tidy validator warning about an attribute name and ID starting 
> with two "_" signs. So, here is a patch I suggest to resolve this issue:
> I changed FreeMarker template and a checkbox interceptor code in such a way 
> that prefix of that input no longer produce warning.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-4508) DefaultActionMapperTest failures due to invalid mock type for parameterMap

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-4508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-4508:
--
Fix Version/s: 6.2.0
   (was: 6.1.0)

> DefaultActionMapperTest failures due to invalid mock type for parameterMap
> --
>
> Key: WW-4508
> URL: https://issues.apache.org/jira/browse/WW-4508
> Project: Struts 2
>  Issue Type: Bug
>  Components: Unit Tests
>Affects Versions: 2.3.24
> Environment: The JVM where this was encountered is the Waratek JVM 
> (www.waratek.com) which contains support for prevention of SQL Injection 
> attacks. This bug is not reproducible using OpenJDK or any other JVM due to 
> the fact the tests reference only the keys and not the values.
>Reporter: Dermot McGahon
>Priority: Minor
> Fix For: 6.2.0
>
>
> All of the tests which use StrutsMockHttpServletRequest are setting up 
> incorrectly typed parameterMaps in the mock.
> A parameterMap should be typed 
> java.util.Map and not Map 
> as the tests are doing i.e the value parameter should be String[] and not 
> String. This caused us to see test failures when treating those values as 
> String[] when they weren't.
> See:
> http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html
> http://docs.oracle.com/javaee/7/api/javax/servlet/ServletRequest.html#getParameterMap%28%29



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3532) client validation isn't generated when using a VisitorFieldValidator annotation

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3532:
--
Fix Version/s: 6.2.0
   (was: 6.1.0)

> client validation isn't generated when using a VisitorFieldValidator 
> annotation
> ---
>
> Key: WW-3532
> URL: https://issues.apache.org/jira/browse/WW-3532
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.2.1
> Environment: jboss 5, struts2-core-2.2.1.jar
>Reporter: David G
>Priority: Minor
> Fix For: 6.2.0
>
> Attachments: AnnotationValidationConfigurationBuilderTest.java
>
>
> When using a VisitorFieldValidator in an action, the generated Javascript 
> doesn't validate fields on the referenced POJO, i.e. the example I have below 
> would only generate:
> 
> function validateForm_createAccount() {
> form = document.getElementById("createAccount");
> clearErrorMessages(form);
> clearErrorLabels(form);
> var errors = false;
> var continueValidation = true;
> return !errors;
> }
> 
> I have two current workarounds, but they're a bit of a pain:
> 1) Using XML validation instead of annotations.
> 2) Not to use the VisitorFieldValidator model, and instead have the form 
> fields referenced directly in the Action class.
> Here's the code I've been using (a trimmed down version of it anyway ;-) )
> AccountManagementAction.java:
> public class AccountManagementAction extends ActionSupport
> {
>   private Account account;
>   public Account getAccount()
>   {
>   return account;
>   }
>   @VisitorFieldValidator
>   public void setAccount(Account account)
>   {
>   this.account = account;
>   }
> ...
> }
> Account.java:
> public class Account
> {
>   private String username;
>   public String getUsername()
>   {
>   return username;
>   }
>   @Validations(
>   requiredStrings = @RequiredStringValidator(trim = true, message 
> = "Required"),
>   stringLengthFields = @StringLengthFieldValidator(
>   minLength = "2", maxLength = "10", trim = true,
>   message = "This must be between ${minLength} and 
> ${maxLength} letters"),
>   regexFields = @RegexFieldValidator(expression = 
> "^[0-9a-zA-Z]*$",
>   message = "Only plain letters and numbers are allowed")
> )
>   public void setUsername(String username)
>   {
>   this.username = username;
>   }
> }
> registration.jsp:
> <%@page contentType="text/html" pageEncoding="UTF-8"%>
> <%@ taglib prefix="s" uri="/struts-tags" %>
> "http://www.w3.org/TR/html4/loose.dtd;>
> 
>   
>   
>   
>   
>   
>   
>   
>   
>   
> 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3666) TypeConverter should trim before conversion to things that are not Strings

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3666?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3666:
--
Fix Version/s: 6.2.0
   (was: 6.1.0)

> TypeConverter should trim before conversion to things that are not Strings
> --
>
> Key: WW-3666
> URL: https://issues.apache.org/jira/browse/WW-3666
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Value Stack
>Affects Versions: 2.2.1.1
> Environment: Standard Struts2 implementation with Jetty
>Reporter: adam brin
>Priority: Minor
> Fix For: 6.2.0
>
>
> For a simple struts2 application, when you pass in parameters that are not 
> "Strings" for example Longs or Enums the Xwork2 TypeConverter (and Struts2's 
> handling) needs some work.
> Issues:
> * numeric values are not properly parsed if they have space characters
> * enum values are not properly parsed if they have space characters
> * ideally some exception would bubble back up in the form of an ActionError
> Attached (in comments) is a simple controller and test case using HTMLUnit to 
> demonstrate the issue.  Even with the following logger settings, no errors 
> are visible:
> {noformat}log4j.logger.org.apache.struts2=TRACE
> log4j.logger.com.opensymphony.xwork2=TRACE
> {noformat} 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3232) New Cookie Interceptor

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3232:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> New Cookie Interceptor
> --
>
> Key: WW-3232
> URL: https://issues.apache.org/jira/browse/WW-3232
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Interceptors
>Affects Versions: 2.1.6
>Reporter: carlo scarioni
>Assignee: Maurizio Cucchiara
>Priority: Minor
> Fix For: 7.0.0
>
> Attachments: struts-cookie-interceptor.tar.gz
>
>
> Hello, I've developed for my current project a simple Cookie Interceptor. 
> It's like the one in the distribution but different, :)
> It works by annotating in the action with a 
> @Cookie(name="cookieName",timeToLive=100,path="xxx") a String property.
> The Interceptor (Which is also a PreResultListener) Scans the action. if it 
> finds a @Cookie annotation it injects the cookie value into the action's 
> property. When the action is executed, the interceptor's beforeResultMethod 
> scans the action again and the values from properties annotated with @Cookie 
> are saved in the response's cookies.
> This is the basic idea, than using just the getters and setters in the action 
> you can retrieve and set a cookie..
> I would love to share this simple interceptor, i would love to see a little 
> of my code added to your project :D ... what can i do for you to see the code 
> and if it's something you like, submit it... thanks..



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3233) @Result name aliases

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3233:
--
Fix Version/s: 6.2.0
   (was: 6.1.0)

> @Result name aliases
> 
>
> Key: WW-3233
> URL: https://issues.apache.org/jira/browse/WW-3233
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Plugin - Convention
>Affects Versions: 2.1.6
>Reporter: Alex Siman
>Priority: Minor
> Fix For: 6.2.0
>
>
> Suppose we have LoginAction which maps to "login.jsp". How to use the same 
> JSP for "input" (or whatever else) result w/o using of result location? For 
> now we do:
> @Results({
> @Result(
> name = Action.INPUT,
> location = "login.jsp"
> )
> })
> public class LoginAction {...}
> But it would be better to have something like @Result.aliases[].
> Concept example:
> @Results({
> @Result(
> /*name = "success", */
> aliases = {"input", "error"}
> )
> })
> public class LoginAction {...}
> And this action must be mapped to page "login.jsp" on any of these action 
> results: 
> "success"
> "input"
> "error"



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-1742) new token associated execute and wait interceptor

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-1742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-1742:
--
Fix Version/s: 6.2.0
   (was: 6.1.0)

> new token associated execute and wait interceptor
> -
>
> Key: WW-1742
> URL: https://issues.apache.org/jira/browse/WW-1742
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Interceptors
>Reporter: Thomas Micheline
>Priority: Minor
> Fix For: 6.2.0
>
> Attachments: TokenizedExecuteAndWaitInterceptor.java
>
>
> A new interceptor could be created which associates background processes with 
> a token rather than a session.  This way, an application could allow separate 
> background processes to the same user operating in multiple windows/tabs.  
> I'll provide the class which makes use of the getName method suggest in 
> WW-1740 (and the change in WW-1741 is also needed if the token interceptor 
> preceeds this interceptor in the stack).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3226) Add optional support to AliasInterceptor to overwrite aliased parameters

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3226:
--
Fix Version/s: 6.2.0
   (was: 6.1.0)

> Add optional support to AliasInterceptor to overwrite aliased parameters
> 
>
> Key: WW-3226
> URL: https://issues.apache.org/jira/browse/WW-3226
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Interceptors
>Affects Versions: 2.1.8
>Reporter: Jasper Rosenberg
>Priority: Minor
> Fix For: 6.2.0
>
>
> It would be great if the AliasInterceptor could overwrite the aliased 
> parameters rather than just inject them under different names, much like I 
> recall staticParams supports.  I suspect many, like me, were surprised to 
> learn this wasn't how it currently behaved.  It would have to be a new flag 
> to maintain backwards compatibility.
> Alternatively, the ParametersInterceptor could be enhanced to take an 
> optional aliases map.  That would be pretty handy.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-4016) Rename validatorType to validatorName

2022-10-22 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-4016?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-4016:
--
Fix Version/s: 7.0.0
   (was: 6.1.0)

> Rename validatorType to validatorName
> -
>
> Key: WW-4016
> URL: https://issues.apache.org/jira/browse/WW-4016
> Project: Struts 2
>  Issue Type: Improvement
>  Components: XML Validators
>Affects Versions: 2.3.12
>Reporter: Lukasz Lenart
>Priority: Minor
> Fix For: 7.0.0
>
> Attachments: WW-4016.patch
>
>
> Right no validatorType is a simple String in 
> AnnotationValidationConfigurationBuilder which can lead to mistakes.
> {code:java}
> String validatorType = "regex";
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-5251) Remove deprecated interfaces used with ServletConfigInterceptor

2022-10-21 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-5251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-5251:
--
Description: 
{{ServletConfigInterceptor}} supports a bunch of deprecated interfaces which 
already have proper replacement and they should be removed
* {{org.apache.struts2.util.ServletContextAware}}
* {{org.apache.struts2.interceptor.ServletRequestAware}}
* {{org.apache.struts2.interceptor.ServletResponseAware}}
* {{org.apache.struts2.interceptor.ParameterAware}}
* {{org.apache.struts2.interceptor.SessionAware}}
* {{org.apache.struts2.interceptor.ApplicationAware}}
* {{org.apache.struts2.interceptor.PrincipalAware}}

all these interfaces have proper replacement in {{org.apache.struts2.action}} 
package

  was:{{ServletConfigInterceptor}} supports a bunch of deprecated interfaces 
which already have proper replacement and they should be removed


> Remove deprecated interfaces used with ServletConfigInterceptor
> ---
>
> Key: WW-5251
> URL: https://issues.apache.org/jira/browse/WW-5251
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Interceptors
>Reporter: Lukasz Lenart
>Priority: Major
> Fix For: 6.2.0
>
>
> {{ServletConfigInterceptor}} supports a bunch of deprecated interfaces which 
> already have proper replacement and they should be removed
> * {{org.apache.struts2.util.ServletContextAware}}
> * {{org.apache.struts2.interceptor.ServletRequestAware}}
> * {{org.apache.struts2.interceptor.ServletResponseAware}}
> * {{org.apache.struts2.interceptor.ParameterAware}}
> * {{org.apache.struts2.interceptor.SessionAware}}
> * {{org.apache.struts2.interceptor.ApplicationAware}}
> * {{org.apache.struts2.interceptor.PrincipalAware}}
> all these interfaces have proper replacement in {{org.apache.struts2.action}} 
> package



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (WW-5251) Remove deprecated interfaces used with ServletConfigInterceptor

2022-10-21 Thread Lukasz Lenart (Jira)
Lukasz Lenart created WW-5251:
-

 Summary: Remove deprecated interfaces used with 
ServletConfigInterceptor
 Key: WW-5251
 URL: https://issues.apache.org/jira/browse/WW-5251
 Project: Struts 2
  Issue Type: Improvement
  Components: Core Interceptors
Reporter: Lukasz Lenart
 Fix For: 6.2.0


{{ServletConfigInterceptor}} supports a bunch of deprecated interfaces which 
already have proper replacement and they should be removed



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-5250) Address TODO in DefaultActionValidatorManagerTest

2022-10-21 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-5250?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-5250:
--
Component/s: Unit Tests

> Address TODO in DefaultActionValidatorManagerTest
> -
>
> Key: WW-5250
> URL: https://issues.apache.org/jira/browse/WW-5250
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core, Unit Tests, XML Validators
>Reporter: Lukasz Lenart
>Priority: Minor
> Fix For: 6.2.0
>
>
> There is a TODO which should be addressed:
> {noformat}
> // TODO: this all need to be converted to real unit tests
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (WW-5250) Address TODO in DefaultActionValidatorManagerTest

2022-10-21 Thread Lukasz Lenart (Jira)
Lukasz Lenart created WW-5250:
-

 Summary: Address TODO in DefaultActionValidatorManagerTest
 Key: WW-5250
 URL: https://issues.apache.org/jira/browse/WW-5250
 Project: Struts 2
  Issue Type: Improvement
  Components: Core, XML Validators
Reporter: Lukasz Lenart
 Fix For: 6.2.0


There is a TODO which should be addressed:
{noformat}
// TODO: this all need to be converted to real unit tests
{noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Assigned] (WW-3725) Remove unused tag templates from core/src/main/resources/template/archive

2022-10-21 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3725?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart reassigned WW-3725:
-

Assignee: Lukasz Lenart

> Remove unused tag templates from core/src/main/resources/template/archive
> -
>
> Key: WW-3725
> URL: https://issues.apache.org/jira/browse/WW-3725
> Project: Struts 2
>  Issue Type: Improvement
>Reporter: Lukasz Lenart
>Assignee: Lukasz Lenart
>Priority: Minor
> Fix For: 6.1.0
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Remove the tags templates that are not used anymore



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work started] (WW-3725) Remove unused tag templates from core/src/main/resources/template/archive

2022-10-21 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3725?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on WW-3725 started by Lukasz Lenart.
-
> Remove unused tag templates from core/src/main/resources/template/archive
> -
>
> Key: WW-3725
> URL: https://issues.apache.org/jira/browse/WW-3725
> Project: Struts 2
>  Issue Type: Improvement
>Reporter: Lukasz Lenart
>Assignee: Lukasz Lenart
>Priority: Minor
> Fix For: 6.1.0
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Remove the tags templates that are not used anymore



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Assigned] (WW-5137) Remove class attribute

2022-10-21 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-5137?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart reassigned WW-5137:
-

Assignee: Lukasz Lenart

> Remove class attribute
> --
>
> Key: WW-5137
> URL: https://issues.apache.org/jira/browse/WW-5137
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Results
>Reporter: Lukasz Lenart
>Assignee: Lukasz Lenart
>Priority: Minor
> Fix For: 6.1.0
>
>
> Remove deprecated {{class}} attribute.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Assigned] (WW-5133) Remove deprecated labelposition

2022-10-21 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-5133?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart reassigned WW-5133:
-

Assignee: Lukasz Lenart

> Remove deprecated labelposition
> ---
>
> Key: WW-5133
> URL: https://issues.apache.org/jira/browse/WW-5133
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Tags
>Reporter: Lukasz Lenart
>Assignee: Lukasz Lenart
>Priority: Minor
> Fix For: 6.1.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> See WW-5132



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work started] (WW-5133) Remove deprecated labelposition

2022-10-21 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-5133?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on WW-5133 started by Lukasz Lenart.
-
> Remove deprecated labelposition
> ---
>
> Key: WW-5133
> URL: https://issues.apache.org/jira/browse/WW-5133
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Tags
>Reporter: Lukasz Lenart
>Assignee: Lukasz Lenart
>Priority: Minor
> Fix For: 6.1.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> See WW-5132



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work started] (WW-5137) Remove class attribute

2022-10-21 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-5137?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on WW-5137 started by Lukasz Lenart.
-
> Remove class attribute
> --
>
> Key: WW-5137
> URL: https://issues.apache.org/jira/browse/WW-5137
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Results
>Reporter: Lukasz Lenart
>Assignee: Lukasz Lenart
>Priority: Minor
> Fix For: 6.1.0
>
>
> Remove deprecated {{class}} attribute.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Closed] (WW-3599) Struts2 ignores 'final' modifier when backing form onto field

2022-10-21 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart closed WW-3599.
-
Resolution: Resolved

This was resolved in OGNL at some point

> Struts2 ignores 'final' modifier when backing form onto field
> -
>
> Key: WW-3599
> URL: https://issues.apache.org/jira/browse/WW-3599
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core Actions
>Affects Versions: 2.1.6
>Reporter: Jon
>Priority: Minor
>
> I had a bean and nested enum defined like
> public class SomeBean {
>   private Type type;
>   // getters+setters for type
>   public static enum Type {
> UNSET(0),
> USER(1),
> GROUP(2);
> public final short code;
> private Type(short code) {
>   this.code = code;
> }
>   }
> }
> We accidentally included the final field 'code' as the name of a field on a 
> form that was backed by Struts. e.g. something like:
> 
> When this field was submitted, the final field 'code' was updated on the enum 
> to match the value picked in the select box. This caused a huge amount of 
> confusion for a time, as this field is marked final and so shouldn't ever be 
> updated... presumably Struts is using reflection to bypass the JVM 
> enforcement on finality?
> Fix would be to check a public field isn't marked final, before backing a 
> form onto it.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3599) Struts2 ignores 'final' modifier when backing form onto field

2022-10-21 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3599:
--
Fix Version/s: (was: 6.1.0)

> Struts2 ignores 'final' modifier when backing form onto field
> -
>
> Key: WW-3599
> URL: https://issues.apache.org/jira/browse/WW-3599
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core Actions
>Affects Versions: 2.1.6
>Reporter: Jon
>Priority: Minor
>
> I had a bean and nested enum defined like
> public class SomeBean {
>   private Type type;
>   // getters+setters for type
>   public static enum Type {
> UNSET(0),
> USER(1),
> GROUP(2);
> public final short code;
> private Type(short code) {
>   this.code = code;
> }
>   }
> }
> We accidentally included the final field 'code' as the name of a field on a 
> form that was backed by Struts. e.g. something like:
> 
> When this field was submitted, the final field 'code' was updated on the enum 
> to match the value picked in the select box. This caused a huge amount of 
> confusion for a time, as this field is marked final and so shouldn't ever be 
> updated... presumably Struts is using reflection to bypass the JVM 
> enforcement on finality?
> Fix would be to check a public field isn't marked final, before backing a 
> form onto it.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-4904) Support for cross context request processing

2022-10-21 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-4904?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-4904:
--
Fix Version/s: 6.2.0

> Support for  cross context request processing
> -
>
> Key: WW-4904
> URL: https://issues.apache.org/jira/browse/WW-4904
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Dispatch Filter
>Affects Versions: 2.3.34
> Environment: Wildlfy 10.1.0
> Struts 2.3.34
> JDK 1.8.0_151
>Reporter: Prasanth 
>Priority: Minor
> Fix For: 6.2.0
>
>
> When a request is forwarded from one context to another (both using struts2)
> {code:java}
> ServletContext sContext = context.getContext("/context2");
> RequestDispatcher rd = sContext.getRequestDispatcher(resource);
> rd.forward(request, response);
> {code}
> you get a {{ClassCastException}}. Both the projects has their own struts jars 
> (in WEB-INF/lib folder).
> {noformat}
> Caused by: java.lang.ClassCastException: 
> org.apache.struts2.dispatcher.mapper.ActionMapping cannot be cast to 
> org.apache.struts2.dispatcher.mapper.ActionMapping
> at 
> org.apache.struts2.dispatcher.ng.PrepareOperations.findActionMapping(PrepareOperations.java:163)
> at 
> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:92)
> at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
> at 
> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
> at 
> io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
> at 
> io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
> at 
> io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
> at 
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at 
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at 
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at 
> io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:274)
> at 
> io.undertow.servlet.handlers.ServletInitialHandler.dispatchToPath(ServletInitialHandler.java:209)
> at 
> io.undertow.servlet.spec.RequestDispatcherImpl.forwardImpl(RequestDispatcherImpl.java:221)
> ... 128 more
> {noformat}
> To make it work you have to have a filter (before struts2 filter) in the 
> application that is receiving the request and have the below two lines. 
> {code:java}
> request.setAttribute("struts.actionMapping", new ActionMapping());
> request.setAttribute("struts.valueStack", null);
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-4672) StrutsApplicationResource incompatible with superclass PostfixedApplicationResource

2022-10-21 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-4672?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-4672:
--
Fix Version/s: 6.2.0

> StrutsApplicationResource incompatible with superclass 
> PostfixedApplicationResource
> ---
>
> Key: WW-4672
> URL: https://issues.apache.org/jira/browse/WW-4672
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - Tiles
>Affects Versions: 2.5.2
>Reporter: Joonas Vali
>Priority: Minor
> Fix For: 6.2.0
>
>
> {{org.apache.struts2.tiles.StrutsApplicationResource}} constructor takes in a 
> single parameter, URL, and from this parameter getPath() is asked, which 
> returns absolute path to a resource on disk (usually?), and this is passed to 
> the superclass as String. 
> This logic is however incompatible with superclass 
> {{org.apache.tiles.request.locale.PostfixedApplicationResource}} which is 
> built to deal with relative paths to the context root. e.g 
> '/WEB-INF/tiles.xml'.
> Previous creates issues with 'refreshing' enabled in 
> (CachingLocaleUrlDefinitionDAO) superclass 
> {{org.apache.tiles.definition.dao.BaseLocaleUrlDefinitionDAO#refreshRequired()}}
>  method, which iterates over these resource paths and ultimately calls 
> {{servletContext#getResource(path)}}, which always returns null on absolute 
> paths. This results in the following NPE on next line where 
> {{resource.getLastModified()}} is asked. 
> {noformat}
>  java.lang.NullPointerException
>   at 
> org.apache.tiles.definition.dao.BaseLocaleUrlDefinitionDAO.refreshRequired(BaseLocaleUrlDefinitionDAO.java:120)
>   at 
> org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.getDefinitions(CachingLocaleUrlDefinitionDAO.java:130)
>   at 
> org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.getDefinition(CachingLocaleUrlDefinitionDAO.java:105)
>   at 
> org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.getDefinition(CachingLocaleUrlDefinitionDAO.java:49)
>   at 
> org.apache.tiles.definition.UnresolvingLocaleDefinitionsFactory.getDefinition(UnresolvingLocaleDefinitionsFactory.java:89)
>   at 
> org.apache.tiles.impl.BasicTilesContainer.getDefinition(BasicTilesContainer.java:286)
>   at 
> org.apache.tiles.impl.BasicTilesContainer.isValidDefinition(BasicTilesContainer.java:273)
>   at 
> org.apache.tiles.TilesContainerWrapper.isValidDefinition(TilesContainerWrapper.java:88)
>   at 
> org.apache.tiles.impl.mgmt.CachingTilesContainer.isValidDefinition(CachingTilesContainer.java:100)
>   at 
> org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:139)
>   at 
> org.apache.struts2.result.StrutsResultSupport.execute(StrutsResultSupport.java:208)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Closed] (WW-4495) Autocompleter does not resize well if deployed up

2022-10-21 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-4495?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart closed WW-4495.
-
Resolution: Won't Fix

> Autocompleter does not resize well if deployed up
> -
>
> Key: WW-4495
> URL: https://issues.apache.org/jira/browse/WW-4495
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - Dojo Tags
>Affects Versions: 2.3.15.3
> Environment: All browsers
>Reporter: Miriam Gutierrez
>Priority: Minor
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> The  does not work properly when the content is deployed 
> up, when matching content while writing the list resize always down - up and 
> the list appears far from the textbox.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Closed] (WW-3854) How to implement my own TextProvider

2022-10-21 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3854?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart closed WW-3854.
-
Resolution: Fixed

https://github.com/apache/struts-examples/tree/master/text-provider

> How to implement my own TextProvider
> 
>
> Key: WW-3854
> URL: https://issues.apache.org/jira/browse/WW-3854
> Project: Struts 2
>  Issue Type: Sub-task
>Reporter: Lukasz Lenart
>Priority: Major
> Fix For: examples-1.1
>
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Closed] (WW-3855) How to implement my own NumberConverter

2022-10-21 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart closed WW-3855.
-
Resolution: Fixed

> How to implement my own NumberConverter
> ---
>
> Key: WW-3855
> URL: https://issues.apache.org/jira/browse/WW-3855
> Project: Struts 2
>  Issue Type: Sub-task
>Reporter: Lukasz Lenart
>Priority: Major
> Fix For: examples-1.1
>
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Closed] (WW-4324) Examples and tutorials for database applications

2022-10-21 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-4324?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart closed WW-4324.
-
Resolution: Fixed

> Examples and tutorials for database applications
> 
>
> Key: WW-4324
> URL: https://issues.apache.org/jira/browse/WW-4324
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Documentation, Example Applications
>Reporter: Antonio Sánchez
>Priority: Minor
>  Labels: crud, documentation, example, rest, tutorial
> Fix For: examples-1.1
>
>
> 1. There are some CRUD examples in documentation (1), many of them are 
> external and long articles that won't be read by almost any developer. This 
> is confusing and overwhelming. There should be only one official CRUD page, 
> as concise as possible, and continuing the Getting Started (2) example.
> 2. Documentation should consider that there are different approaches for 
> CRUD, which is the recommended one? . For instance, @InputConfig + 
> defaultStack (3) may replace paramsPrepareParams, and in general there some 
> other approaches. Documentation should recommend acceptable techniques and 
> warn against bad ones (dynamic method invocation, for example).
> 3. Documentation should also cover, following directions above and in 
> different steps, usual CRUD scenarios like JPA, Spring, etc...
> 4. REST approach should be also explained in Getting Started, and, widely 
> recommended for database applications.  
> 5. Code for such a CRUD example in Getting Started already exists (4). It 
> just needs to be reviewed and adapted as required. 
> This code is based in 'Struts 2 CRUD Example' (5) linked from (1) as 'CRUD 
> made easy'.
> 6. This issue is inspired by comments in issue ww-3393 (6).
> (1) http://struts.apache.org/release/2.3.x/docs/tutorials.html
> (2) http://struts.apache.org/release/2.3.x/docs/getting-started.html
> (3) https://issues.apache.org/jira/browse/WW-3993?#comment-13879845
> (4) https://github.com/juntando-lineas/pro-crud-struts2
> (5) http://struts.apache.org/release/2.3.x/docs/crud-demo-i.html
> (6) https://issues.apache.org/jira/browse/WW-3993#comment-13969384



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Closed] (WW-3993) How to implement simple CRUD application

2022-10-21 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3993?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart closed WW-3993.
-
Resolution: Fixed

> How to implement simple CRUD application
> 
>
> Key: WW-3993
> URL: https://issues.apache.org/jira/browse/WW-3993
> Project: Struts 2
>  Issue Type: Sub-task
>  Components: Example Applications
>Reporter: Lukasz Lenart
>Priority: Minor
> Fix For: examples-1.1
>
> Attachments: crud-with-maven.7z, crud-with-maven.7z
>
>
> Rewrite to Maven based project and with the latest Struts version
> https://cwiki.apache.org/confluence/display/WW/CRUD+Demo+I



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Closed] (WW-3963) Remove unused class DateFormatter

2022-10-21 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3963?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart closed WW-3963.
-
Resolution: Won't Fix

The class was transformed into an interface and is used to implement custom 
formatters, see WW-5016

> Remove unused class DateFormatter
> -
>
> Key: WW-3963
> URL: https://issues.apache.org/jira/browse/WW-3963
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Actions
>Affects Versions: 2.3.20
>Reporter: Lukasz Lenart
>Priority: Trivial
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3963) Remove unused class DateFormatter

2022-10-21 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3963?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3963:
--
Fix Version/s: (was: 6.1.0)

> Remove unused class DateFormatter
> -
>
> Key: WW-3963
> URL: https://issues.apache.org/jira/browse/WW-3963
> Project: Struts 2
>  Issue Type: Improvement
>  Components: Core Actions
>Affects Versions: 2.3.20
>Reporter: Lukasz Lenart
>Priority: Trivial
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (WW-3396) Custom Window States when creating URL

2022-10-21 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-3396:
--
Fix Version/s: (was: 6.1.0)

> Custom Window States when creating URL
> --
>
> Key: WW-3396
> URL: https://issues.apache.org/jira/browse/WW-3396
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - Portlet
>Affects Versions: 2.1.8.1
> Environment: Any
>Reporter: Ricardo Velhote
>Priority: Trivial
>  Labels: PortletUrlHelper, windowState
> Attachments: patch-custom-windowstate-urlhelper.txt
>
>
> Currently while creating a URL, Struts2 only supports the regular JSR Window 
> States (NORMAL; MAXIMIZED, MINIMIZED). When a customized window state is 
> passed it defaults to the NORMAL window state
> Here is an example link to reproduce this behaviour
> 
> A patched is attached to this issue.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Closed] (WW-3396) Custom Window States when creating URL

2022-10-21 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart closed WW-3396.
-
Resolution: Won't Fix

Portlet plugin is deprecated

> Custom Window States when creating URL
> --
>
> Key: WW-3396
> URL: https://issues.apache.org/jira/browse/WW-3396
> Project: Struts 2
>  Issue Type: Bug
>  Components: Plugin - Portlet
>Affects Versions: 2.1.8.1
> Environment: Any
>Reporter: Ricardo Velhote
>Priority: Trivial
>  Labels: PortletUrlHelper, windowState
> Attachments: patch-custom-windowstate-urlhelper.txt
>
>
> Currently while creating a URL, Struts2 only supports the regular JSR Window 
> States (NORMAL; MAXIMIZED, MINIMIZED). When a customized window state is 
> passed it defaults to the NORMAL window state
> Here is an example link to reproduce this behaviour
> 
> A patched is attached to this issue.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Closed] (WW-5105) Tracking the fix commit of CVE-2005-3745 and CVE-2018-1327

2022-10-21 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-5105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart closed WW-5105.
-
Resolution: Not A Problem

> Tracking the fix commit of CVE-2005-3745 and CVE-2018-1327
> --
>
> Key: WW-5105
> URL: https://issues.apache.org/jira/browse/WW-5105
> Project: Struts 2
>  Issue Type: Temp
>Reporter: waganigong
>Priority: Trivial
>
> Hi, this report is about a trivial question from me, and hope the struts 
> community could help me or provide any hints.
> I'm a security researcher and I'm very interested in the fix of 
> [CVE-2005-3745|http://www.cvedetails.com/cve/CVE-2005-3745/] and 
> [CVE-2018-1327|http://www.cvedetails.com/cve/CVE-2008-1327]
> According to the [Apache security vulnerability 
> handling|https://www.apache.org/security/committers.html] #16 , in svn era, 
> the log of fixing commit will be amended with CVE id, however, I cannot find 
> that log for CVE-2005-3745.
> In git era, I cannot find a way to trace the fixing commit. I was wondering 
> that after a vulnerability is fixed, will the corresponding commit be amended 
> with CVE information somewhere else?  
> Any hints will be super helpful.
> Thank you!
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Closed] (WW-4811) Getting run time exception after upgrading to 2.5.10.1

2022-10-21 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-4811?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart closed WW-4811.
-
Resolution: Not A Problem

> Getting run time exception after upgrading to 2.5.10.1
> --
>
> Key: WW-4811
> URL: https://issues.apache.org/jira/browse/WW-4811
> Project: Struts 2
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.5.10
>Reporter: vinay raj
>Priority: Trivial
>
> i have just upgraded my project from 2.5.2 TO 2.5.10.1 but i'm getting this 
> error and im unable to get the app started .
> {code:java}
> Jun 28, 2017 1:20:13 PM org.apache.catalina.core.StandardContext filterStart
> SEVERE: Exception starting filter struts2
> java.lang.RuntimeException: java.lang.RuntimeException: 
> java.lang.RuntimeException: java.lang.RuntimeException: 
> java.lang.reflect.InvocationTargetException - Class: 
> com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector
> File: ContainerImpl.java
> Method: inject
> Line: 289 - com/opensymphony/xwork2/inject/ContainerImpl.java:289:-1
>   at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:499)
>   at 
> org.apache.struts2.dispatcher.InitOperations.initDispatcher(InitOperations.java:75)
>   at 
> org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:63)
>   at 
> org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281)
>   at 
> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)
>   at 
> org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:107)
>   at 
> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4775)
>   at 
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5452)
>   at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>   at 
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
>   at 
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
>   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.RuntimeException: java.lang.RuntimeException: 
> java.lang.RuntimeException: java.lang.RuntimeException: 
> java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>   at 
> com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:289)
>   at 
> com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:422)
>   at 
> com.opensymphony.xwork2.inject.ContainerBuilder$5.create(ContainerBuilder.java:218)
>   at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:52)
>   at 
> com.opensymphony.xwork2.inject.ContainerBuilder$3.create(ContainerBuilder.java:91)
>   at 
> com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:571)
>   at 
> com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:568)
>   at 
> com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:560)
>   at 
> com.opensymphony.xwork2.inject.ContainerBuilder.create(ContainerBuilder.java:568)
>   at 
> com.opensymphony.xwork2.config.impl.DefaultConfiguration.createBootstrapContainer(DefaultConfiguration.java:278)
>   at 
> com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:160)
>   at 
> com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
>   at 
> org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:906)
>   at 
> org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:445)
>   at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:486)
>   ... 14 more
> Caused by: java.lang.RuntimeException: java.lang.RuntimeException: 
> java.lang.RuntimeException: java.lang.RuntimeException: 
> java.lang.reflect.InvocationTargetException
>   at 
> com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:289)
>   at 
> com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:422)
>   at 
> com.opensymphony.xwork2.inject.ContainerBuilder$5.create(ContainerBuilder.java:218)
>   at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:52)
>   at 
> 

[jira] [Closed] (WW-4074) Prepare sample OSGi application

2022-10-21 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-4074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart closed WW-4074.
-
Resolution: Won't Fix

> Prepare sample OSGi application
> ---
>
> Key: WW-4074
> URL: https://issues.apache.org/jira/browse/WW-4074
> Project: Struts 2
>  Issue Type: Sub-task
>  Components: Example Applications
>Reporter: Lukasz Lenart
>Priority: Trivial
> Fix For: examples-1.1
>
>
> As the Struts 2 OSGi plugin was upgraded it would be nice to have a sample 
> application, please refer to WW-3958 for more details



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Resolved] (WW-3737) Parsing of excludePattern breaks regex

2022-10-21 Thread Lukasz Lenart (Jira)


 [ 
https://issues.apache.org/jira/browse/WW-3737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart resolved WW-3737.
---
Resolution: Fixed

> Parsing of excludePattern breaks regex 
> ---
>
> Key: WW-3737
> URL: https://issues.apache.org/jira/browse/WW-3737
> Project: Struts 2
>  Issue Type: Bug
>  Components: Dispatch Filter
>Reporter: Erlend Oftedal
>Priority: Major
> Fix For: 6.1.0
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> See {{buildExcludedPatternsList()}} in 
> [http://svn.apache.org/repos/asf/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/ng/InitOperations.java]
> It simply splits on commas, making it impossible to write regex like 
> {{"/products/[0-9]\{1,10}.json"}} as this will be split in two.
> Please supply a way to escape commas by sticking a \ in front or something 
> like that.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


<    3   4   5   6   7   8   9   10   11   12   >