[jira] [Updated] (WW-4418) Plugin script resources don't load when action extension is blank

2014-11-13 Thread Lukasz Lenart (JIRA)

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

Lukasz Lenart updated WW-4418:
--
Priority: Minor  (was: Critical)

 Plugin script resources don't load when action extension is blank
 -

 Key: WW-4418
 URL: https://issues.apache.org/jira/browse/WW-4418
 Project: Struts 2
  Issue Type: Bug
Affects Versions: 2.3.16
Reporter: Paul Benedict
Priority: Minor
 Fix For: 2.5


 Using s:head outputs a link to utils.js:
 {code}
 script src=/mycontext/struts/utils.js.../script
 {code}
 But the file can't be found. FYI, I have no action extension. The solution is 
 to make the action extension a comma:
 http://stackoverflow.com/questions/12607075/struts2-action-extension-causing-css-javascript-and-struts-dojo-to-break
 But this is obviously a bug.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (WW-4418) Plugin script resources don't load when action extension is blank

2014-11-13 Thread Lukasz Lenart (JIRA)

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

Lukasz Lenart updated WW-4418:
--
Fix Version/s: 2.5

 Plugin script resources don't load when action extension is blank
 -

 Key: WW-4418
 URL: https://issues.apache.org/jira/browse/WW-4418
 Project: Struts 2
  Issue Type: Bug
Affects Versions: 2.3.16
Reporter: Paul Benedict
Priority: Minor
 Fix For: 2.5


 Using s:head outputs a link to utils.js:
 {code}
 script src=/mycontext/struts/utils.js.../script
 {code}
 But the file can't be found. FYI, I have no action extension. The solution is 
 to make the action extension a comma:
 http://stackoverflow.com/questions/12607075/struts2-action-extension-causing-css-javascript-and-struts-dojo-to-break
 But this is obviously a bug.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (WW-4418) Plugin script resources don't load when action extension is blank

2014-11-13 Thread Lukasz Lenart (JIRA)

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

Lukasz Lenart updated WW-4418:
--
Affects Version/s: (was: 2.3.16)
   2.1.8

 Plugin script resources don't load when action extension is blank
 -

 Key: WW-4418
 URL: https://issues.apache.org/jira/browse/WW-4418
 Project: Struts 2
  Issue Type: Bug
Affects Versions: 2.1.8
Reporter: Paul Benedict
Priority: Minor
 Fix For: 2.5


 Using s:head outputs a link to utils.js:
 {code}
 script src=/mycontext/struts/utils.js.../script
 {code}
 But the file can't be found. FYI, I have no action extension. The solution is 
 to make the action extension a comma:
 http://stackoverflow.com/questions/12607075/struts2-action-extension-causing-css-javascript-and-struts-dojo-to-break
 But this is obviously a bug.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4418) Plugin script resources don't load when action extension is blank

2014-11-13 Thread Lukasz Lenart (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14209468#comment-14209468
 ] 

Lukasz Lenart commented on WW-4418:
---

It only happens when you define empty action extension
{code:xml}
constant name=struts.action.extension value=/
{code}

It was designed in that way from the very beginning so changing it can 
influence users.

 Plugin script resources don't load when action extension is blank
 -

 Key: WW-4418
 URL: https://issues.apache.org/jira/browse/WW-4418
 Project: Struts 2
  Issue Type: Bug
Affects Versions: 2.1.8
Reporter: Paul Benedict
Priority: Minor
 Fix For: 2.5


 Using s:head outputs a link to utils.js:
 {code}
 script src=/mycontext/struts/utils.js.../script
 {code}
 But the file can't be found. FYI, I have no action extension. The solution is 
 to make the action extension a comma:
 http://stackoverflow.com/questions/12607075/struts2-action-extension-causing-css-javascript-and-struts-dojo-to-break
 But this is obviously a bug.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4418) Plugin script resources don't load when action extension is blank

2014-11-13 Thread Lukasz Lenart (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14209469#comment-14209469
 ] 

Lukasz Lenart commented on WW-4418:
---

Just for reference, it's a bug/feature in {{DefaultActionMapper}}

{code:java}
@Inject(StrutsConstants.STRUTS_ACTION_EXTENSION)
public void setExtensions(String extensions) {
if (extensions != null  !.equals(extensions)) {
ListString list = new ArrayListString();
String[] tokens = extensions.split(,);
Collections.addAll(list, tokens);
if (extensions.endsWith(,)) {
list.add();
}
this.extensions = Collections.unmodifiableList(list);
} else {
this.extensions = null;
}
}
{code}

 Plugin script resources don't load when action extension is blank
 -

 Key: WW-4418
 URL: https://issues.apache.org/jira/browse/WW-4418
 Project: Struts 2
  Issue Type: Bug
  Components: Core Actions
Affects Versions: 2.1.8
Reporter: Paul Benedict
Priority: Minor
 Fix For: 2.5


 Using s:head outputs a link to utils.js:
 {code}
 script src=/mycontext/struts/utils.js.../script
 {code}
 But the file can't be found. FYI, I have no action extension. The solution is 
 to make the action extension a comma:
 http://stackoverflow.com/questions/12607075/struts2-action-extension-causing-css-javascript-and-struts-dojo-to-break
 But this is obviously a bug.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (WW-4418) Plugin script resources don't load when action extension is blank

2014-11-13 Thread Lukasz Lenart (JIRA)

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

Lukasz Lenart updated WW-4418:
--
Component/s: Core Actions

 Plugin script resources don't load when action extension is blank
 -

 Key: WW-4418
 URL: https://issues.apache.org/jira/browse/WW-4418
 Project: Struts 2
  Issue Type: Bug
  Components: Core Actions
Affects Versions: 2.1.8
Reporter: Paul Benedict
Priority: Minor
 Fix For: 2.5


 Using s:head outputs a link to utils.js:
 {code}
 script src=/mycontext/struts/utils.js.../script
 {code}
 But the file can't be found. FYI, I have no action extension. The solution is 
 to make the action extension a comma:
 http://stackoverflow.com/questions/12607075/struts2-action-extension-causing-css-javascript-and-struts-dojo-to-break
 But this is obviously a bug.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (WW-4419) Defend for NPE when performing async request

2014-11-13 Thread zhouyanming (JIRA)
zhouyanming created WW-4419:
---

 Summary: Defend for NPE when performing async request 
 Key: WW-4419
 URL: https://issues.apache.org/jira/browse/WW-4419
 Project: Struts 2
  Issue Type: Bug
  Components: Plugin - SiteMesh
Reporter: zhouyanming


https://github.com/apache/struts/pull/30



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (WW-4419) Defend for NPE when performing async request

2014-11-13 Thread Lukasz Lenart (JIRA)

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

Lukasz Lenart updated WW-4419:
--
Fix Version/s: 2.3.x

 Defend for NPE when performing async request 
 -

 Key: WW-4419
 URL: https://issues.apache.org/jira/browse/WW-4419
 Project: Struts 2
  Issue Type: Bug
  Components: Plugin - SiteMesh
Reporter: zhouyanming
 Fix For: 2.3.x


 https://github.com/apache/struts/pull/30



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4418) Plugin script resources don't load when action extension is blank

2014-11-13 Thread Johannes Geppert (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14209479#comment-14209479
 ] 

Johannes Geppert commented on WW-4418:
--

Like you see it works well for the Struts2 jquery Showcase.
http://struts.jgeppert.com/struts2-jquery-showcase/struts/utils.js

How looks your filter filter settings in theweb.xml?

 Plugin script resources don't load when action extension is blank
 -

 Key: WW-4418
 URL: https://issues.apache.org/jira/browse/WW-4418
 Project: Struts 2
  Issue Type: Bug
  Components: Core Actions
Affects Versions: 2.1.8
Reporter: Paul Benedict
Priority: Minor
 Fix For: 2.5


 Using s:head outputs a link to utils.js:
 {code}
 script src=/mycontext/struts/utils.js.../script
 {code}
 But the file can't be found. FYI, I have no action extension. The solution is 
 to make the action extension a comma:
 http://stackoverflow.com/questions/12607075/struts2-action-extension-causing-css-javascript-and-struts-dojo-to-break
 But this is obviously a bug.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (WW-4418) Plugin script resources don't load when action extension is blank

2014-11-13 Thread Johannes Geppert (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14209479#comment-14209479
 ] 

Johannes Geppert edited comment on WW-4418 at 11/13/14 8:20 AM:


Like you see it works well for the Struts2 jquery Showcase.
http://struts.jgeppert.com/struts2-jquery-showcase/struts/utils.js

How looks your filter settings in the web.xml?


was (Author: jogep):
Like you see it works well for the Struts2 jquery Showcase.
http://struts.jgeppert.com/struts2-jquery-showcase/struts/utils.js

How looks your filter filter settings in theweb.xml?

 Plugin script resources don't load when action extension is blank
 -

 Key: WW-4418
 URL: https://issues.apache.org/jira/browse/WW-4418
 Project: Struts 2
  Issue Type: Bug
  Components: Core Actions
Affects Versions: 2.1.8
Reporter: Paul Benedict
Priority: Minor
 Fix For: 2.5


 Using s:head outputs a link to utils.js:
 {code}
 script src=/mycontext/struts/utils.js.../script
 {code}
 But the file can't be found. FYI, I have no action extension. The solution is 
 to make the action extension a comma:
 http://stackoverflow.com/questions/12607075/struts2-action-extension-causing-css-javascript-and-struts-dojo-to-break
 But this is obviously a bug.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4418) Plugin script resources don't load when action extension is blank

2014-11-13 Thread Aleksandr Mashchenko (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14211252#comment-14211252
 ] 

Aleksandr Mashchenko commented on WW-4418:
--

It is more or less documented in here: 
http://struts.apache.org/development/2.x/docs/strutsproperties.html.
{quote}
The blank extension allows you to match directory listings as well as pure 
action names without interfering with static resources, which can be specified 
as an empty string prior to a comma e.g. struts.action.extension=,
{quote}

Documented bug = feature.

 Plugin script resources don't load when action extension is blank
 -

 Key: WW-4418
 URL: https://issues.apache.org/jira/browse/WW-4418
 Project: Struts 2
  Issue Type: Bug
  Components: Core Actions
Affects Versions: 2.1.8
Reporter: Paul Benedict
Priority: Minor
 Fix For: 2.5


 Using s:head outputs a link to utils.js:
 {code}
 script src=/mycontext/struts/utils.js.../script
 {code}
 But the file can't be found. FYI, I have no action extension. The solution is 
 to make the action extension a comma:
 http://stackoverflow.com/questions/12607075/struts2-action-extension-causing-css-javascript-and-struts-dojo-to-break
 But this is obviously a bug.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (WW-4418) Plugin script resources don't load when action extension is blank

2014-11-13 Thread Aleksandr Mashchenko (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14211252#comment-14211252
 ] 

Aleksandr Mashchenko edited comment on WW-4418 at 11/13/14 8:34 PM:


It is more or less documented in here: 
http://struts.apache.org/development/2.x/docs/strutsproperties.html.
{quote}
The blank extension allows you to match directory listings as well as pure 
action names without interfering with static resources, which can be specified 
as an empty string prior to a comma e.g. struts.action.extension=,
{quote}

Documented bug = feature. But it doesn't mean that this shouldn't be improved 
in next major release.


was (Author: aleksandr-m):
It is more or less documented in here: 
http://struts.apache.org/development/2.x/docs/strutsproperties.html.
{quote}
The blank extension allows you to match directory listings as well as pure 
action names without interfering with static resources, which can be specified 
as an empty string prior to a comma e.g. struts.action.extension=,
{quote}

Documented bug = feature.

 Plugin script resources don't load when action extension is blank
 -

 Key: WW-4418
 URL: https://issues.apache.org/jira/browse/WW-4418
 Project: Struts 2
  Issue Type: Bug
  Components: Core Actions
Affects Versions: 2.1.8
Reporter: Paul Benedict
Priority: Minor
 Fix For: 2.5


 Using s:head outputs a link to utils.js:
 {code}
 script src=/mycontext/struts/utils.js.../script
 {code}
 But the file can't be found. FYI, I have no action extension. The solution is 
 to make the action extension a comma:
 http://stackoverflow.com/questions/12607075/struts2-action-extension-causing-css-javascript-and-struts-dojo-to-break
 But this is obviously a bug.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (WW-4417) s:form fails to output context/namespace when used with regex pattern matcher

2014-11-13 Thread Lukasz Lenart (JIRA)

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

Lukasz Lenart updated WW-4417:
--
Fix Version/s: 2.3.x

 s:form fails to output context/namespace when used with regex pattern matcher
 -

 Key: WW-4417
 URL: https://issues.apache.org/jira/browse/WW-4417
 Project: Struts 2
  Issue Type: Bug
  Components: Core Actions
Affects Versions: 2.3.16.3
Reporter: Peter Björkman
 Fix For: 2.3.x


 Just changed my config to enable regex in action names. In struts.xml:
 constant name=struts.patternMatcher value=regex /
 Works great! But as a side effect, s:forms no longer outputs the correct path 
 to my actions.
 The code below:
 s:form id=uploadImage action=uploadImagesSave!execute 
 enctype=multipart/form-data method=post
 used to output:
 form id=uploadImage 
 action=/mycontext/news/uploadImagesSave!execute.action method=post 
 enctype=multipart/form-data
 but now I only get:
 form id=uploadImage action=uploadImagesSave!execute.action method=post 
 enctype=multipart/form-data
 The context and namespace is stripped out. I verified that just changing back 
 the patternMatcher fixes the issue. I'm using struts 2.3.16.3. Anyone has any 
 ideas on how to fix it?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (WW-4417) s:form fails to output context/namespace when used with regex pattern matcher

2014-11-13 Thread Lukasz Lenart (JIRA)

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

Lukasz Lenart updated WW-4417:
--
Description: 
Just changed my config to enable regex in action names. In struts.xml:
{code:xml}
constant name=struts.patternMatcher value=regex /
{code}
Works great! But as a side effect, s:forms no longer outputs the correct path 
to my actions.

The code below:
{code:html}
s:form id=uploadImage action=uploadImagesSave!execute 
enctype=multipart/form-data method=post
{code}
used to output:
{code:html}
form id=uploadImage action=/mycontext/news/uploadImagesSave!execute.action 
method=post enctype=multipart/form-data
{code}
but now I only get:
{code:html}
form id=uploadImage action=uploadImagesSave!execute.action method=post 
enctype=multipart/form-data
{code}
The context and namespace is stripped out. I verified that just changing back 
the patternMatcher fixes the issue. I'm using struts 2.3.16.3. Anyone has any 
ideas on how to fix it?

  was:
Just changed my config to enable regex in action names. In struts.xml:

constant name=struts.patternMatcher value=regex /

Works great! But as a side effect, s:forms no longer outputs the correct path 
to my actions.

The code below:
s:form id=uploadImage action=uploadImagesSave!execute 
enctype=multipart/form-data method=post

used to output:

form id=uploadImage action=/mycontext/news/uploadImagesSave!execute.action 
method=post enctype=multipart/form-data

but now I only get:

form id=uploadImage action=uploadImagesSave!execute.action method=post 
enctype=multipart/form-data

The context and namespace is stripped out. I verified that just changing back 
the patternMatcher fixes the issue. I'm using struts 2.3.16.3. Anyone has any 
ideas on how to fix it?


 s:form fails to output context/namespace when used with regex pattern matcher
 -

 Key: WW-4417
 URL: https://issues.apache.org/jira/browse/WW-4417
 Project: Struts 2
  Issue Type: Bug
  Components: Core Actions
Affects Versions: 2.3.16.3
Reporter: Peter Björkman
 Fix For: 2.3.x


 Just changed my config to enable regex in action names. In struts.xml:
 {code:xml}
 constant name=struts.patternMatcher value=regex /
 {code}
 Works great! But as a side effect, s:forms no longer outputs the correct path 
 to my actions.
 The code below:
 {code:html}
 s:form id=uploadImage action=uploadImagesSave!execute 
 enctype=multipart/form-data method=post
 {code}
 used to output:
 {code:html}
 form id=uploadImage 
 action=/mycontext/news/uploadImagesSave!execute.action method=post 
 enctype=multipart/form-data
 {code}
 but now I only get:
 {code:html}
 form id=uploadImage action=uploadImagesSave!execute.action method=post 
 enctype=multipart/form-data
 {code}
 The context and namespace is stripped out. I verified that just changing back 
 the patternMatcher fixes the issue. I'm using struts 2.3.16.3. Anyone has any 
 ideas on how to fix it?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4417) s:form fails to output context/namespace when used with regex pattern matcher

2014-11-13 Thread Lukasz Lenart (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14211917#comment-14211917
 ] 

Lukasz Lenart commented on WW-4417:
---

Following discussion http://markmail.org/message/fqtiquxlgjfsioss

 s:form fails to output context/namespace when used with regex pattern matcher
 -

 Key: WW-4417
 URL: https://issues.apache.org/jira/browse/WW-4417
 Project: Struts 2
  Issue Type: Bug
  Components: Core Actions
Affects Versions: 2.3.16.3
Reporter: Peter Björkman
 Fix For: 2.3.x


 Just changed my config to enable regex in action names. In struts.xml:
 constant name=struts.patternMatcher value=regex /
 Works great! But as a side effect, s:forms no longer outputs the correct path 
 to my actions.
 The code below:
 s:form id=uploadImage action=uploadImagesSave!execute 
 enctype=multipart/form-data method=post
 used to output:
 form id=uploadImage 
 action=/mycontext/news/uploadImagesSave!execute.action method=post 
 enctype=multipart/form-data
 but now I only get:
 form id=uploadImage action=uploadImagesSave!execute.action method=post 
 enctype=multipart/form-data
 The context and namespace is stripped out. I verified that just changing back 
 the patternMatcher fixes the issue. I'm using struts 2.3.16.3. Anyone has any 
 ideas on how to fix it?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4418) Plugin script resources don't load when action extension is blank

2014-11-13 Thread Lukasz Lenart (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14211921#comment-14211921
 ] 

Lukasz Lenart commented on WW-4418:
---

Basically you must specify {{,}} because {{String#split(,)}} will strip empty 
spaces and that's why there is a hack to add empty extension - but it won't 
work when you define it this way {{,action}} - then only {{.action}} will the 
valid extension ;-)

 Plugin script resources don't load when action extension is blank
 -

 Key: WW-4418
 URL: https://issues.apache.org/jira/browse/WW-4418
 Project: Struts 2
  Issue Type: Bug
  Components: Core Actions
Affects Versions: 2.1.8
Reporter: Paul Benedict
Priority: Minor
 Fix For: 2.5


 Using s:head outputs a link to utils.js:
 {code}
 script src=/mycontext/struts/utils.js.../script
 {code}
 But the file can't be found. FYI, I have no action extension. The solution is 
 to make the action extension a comma:
 http://stackoverflow.com/questions/12607075/struts2-action-extension-causing-css-javascript-and-struts-dojo-to-break
 But this is obviously a bug.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (WW-4418) Plugin script resources don't load when action extension is blank

2014-11-13 Thread Lukasz Lenart (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14211921#comment-14211921
 ] 

Lukasz Lenart edited comment on WW-4418 at 11/14/14 6:39 AM:
-

Basically you must specify {{,}} because {{String#split(,)}} will strip empty 
spaces and that's why there is a hack to add empty extension - but it won't 
work when you define it this way {{,action}} - then only {{.action}} will be 
the valid extension ;-)


was (Author: lukaszlenart):
Basically you must specify {{,}} because {{String#split(,)}} will strip empty 
spaces and that's why there is a hack to add empty extension - but it won't 
work when you define it this way {{,action}} - then only {{.action}} will the 
valid extension ;-)

 Plugin script resources don't load when action extension is blank
 -

 Key: WW-4418
 URL: https://issues.apache.org/jira/browse/WW-4418
 Project: Struts 2
  Issue Type: Bug
  Components: Core Actions
Affects Versions: 2.1.8
Reporter: Paul Benedict
Priority: Minor
 Fix For: 2.5


 Using s:head outputs a link to utils.js:
 {code}
 script src=/mycontext/struts/utils.js.../script
 {code}
 But the file can't be found. FYI, I have no action extension. The solution is 
 to make the action extension a comma:
 http://stackoverflow.com/questions/12607075/struts2-action-extension-causing-css-javascript-and-struts-dojo-to-break
 But this is obviously a bug.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)