Re: RE: Struts upgrade issue

2017-03-24 Thread Lukasz Lenart
2017-03-24 14:12 GMT+01:00 Gopal, Siva Prakash (US - Mechanicsburg)
:
> I have decompiled class file and looked on the logic's
>
> RadioHandler.java --> generate() method.

Hm... but the incremental ID was introduced in Struts 2.2.3, long time ago
https://issues.apache.org/jira/browse/WW-3587


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



RE: RE: Struts upgrade issue

2017-03-24 Thread Gopal, Siva Prakash (US - Mechanicsburg)
I have decompiled class file and looked on the logic's

RadioHandler.java --> generate() method.

Thanks,
Siva

-Original Message-
From: Lukasz Lenart [mailto:lukaszlen...@apache.org]
Sent: Friday, March 24, 2017 4:17 AM
To: Struts Users Mailing List 
Subject: Re: RE: Struts upgrade issue

2017-03-24 4:47 GMT+01:00 Gopal, Siva Prakash (US - Mechanicsburg)
:
> Hi All,
>
>
> we have identified issues between radio button generation under 
> RadioHandler.java under struts2-javatemplates-plugin-2.3.20 and 
> struts2-javatemplates-plugin-2.3.32
>
> struts2-javatemplates-plugin-2.3.20
> 
> for(Iterator itt = MakeIterator.convert(listObj); itt.hasNext(); stack.pop())
> {
> Object item = itt.next();
> stack.push(item);
> Object itemKey = findValue(listKey == null ? "top" : listKey);
> String itemKeyStr = StringUtils.defaultString(itemKey != null ? 
> itemKey.toString() : null);
> Object itemValue = findValue(listValue == null ? "top" : listValue);
> String itemValueStr = StringUtils.defaultString(itemValue != null ? 
> itemValue.toString() : null);
> String id = (new 
> StringBuilder()).append(params.get("id")).append(itemKeyStr).toString();
> Here id is generated by appending with key value
>
> struts2-javatemplates-plugin-2.3.32
> -
> for(Iterator itt = MakeIterator.convert(listObj); itt.hasNext(); stack.pop())
> {
> Object item = itt.next();
> stack.push(item);
> Object itemKey = findValue(listKey == null ? "top" : listKey);
> String itemKeyStr = StringUtils.defaultString(itemKey != null ? 
> itemKey.toString() : null);
> Object itemValue = findValue(listValue == null ? "top" : listValue);
> String itemValueStr = StringUtils.defaultString(itemValue != null ? 
> itemValue.toString() : null);
> String id = (new 
> StringBuilder()).append(params.get("id")).append(Integer.toString(cnt++)).toString();
> Here id is generated by appending with count of list items
>
> Because of these changes, we need to modify the jsp/javascription function in 
> all our application.

I cannot find such code in the RadioHandler.java

https://github.com/apache/struts/blob/support-2-3/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/simple/RadioHandler.java#L45-L92

> if we are not upgrading to next struts 2.3.20 (using 
> struts2-javatemplates-plugin-2.3.20 along with strut2-cord 2.3.32 version)
>
> we are getting below error
>
> Caused by: java.lang.NoSuchMethodError: 
> org/apache/struts2/util/ComponentUtils.isExpression(Ljava/lang/Object;)Z
> at 
> org.apache.struts2.views.java.simple.DynamicAttributesHandler.processDynamicAttributes(DynamicAttributesHandler.java:48)
> at 
> org.apache.struts2.views.java.simple.DynamicAttributesHandler.start(DynamicAttributesHandler.java:41)

You cannot mix different versions

> Do we have any alternate option to resolve this issue

Not yet as I cannot identify the source code.



Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

This message (including any attachments) contains confidential information 
intended for a specific individual and purpose, and is protected by law. If you 
are not the intended recipient, you should delete this message and any 
disclosure, copying, or distribution of this message, or the taking of any 
action based on it, by you is strictly prohibited.

v.E.1

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org


Re: RE: Struts upgrade issue

2017-03-24 Thread Lukasz Lenart
2017-03-24 4:47 GMT+01:00 Gopal, Siva Prakash (US - Mechanicsburg)
:
> Hi All,
>
>
> we have identified issues between radio button generation under 
> RadioHandler.java under struts2-javatemplates-plugin-2.3.20 and 
> struts2-javatemplates-plugin-2.3.32
>
> struts2-javatemplates-plugin-2.3.20
> 
> for(Iterator itt = MakeIterator.convert(listObj); itt.hasNext(); stack.pop())
> {
> Object item = itt.next();
> stack.push(item);
> Object itemKey = findValue(listKey == null ? "top" : listKey);
> String itemKeyStr = StringUtils.defaultString(itemKey != null ? 
> itemKey.toString() : null);
> Object itemValue = findValue(listValue == null ? "top" : listValue);
> String itemValueStr = StringUtils.defaultString(itemValue != null ? 
> itemValue.toString() : null);
> String id = (new 
> StringBuilder()).append(params.get("id")).append(itemKeyStr).toString();
> Here id is generated by appending with key value
>
> struts2-javatemplates-plugin-2.3.32
> -
> for(Iterator itt = MakeIterator.convert(listObj); itt.hasNext(); stack.pop())
> {
> Object item = itt.next();
> stack.push(item);
> Object itemKey = findValue(listKey == null ? "top" : listKey);
> String itemKeyStr = StringUtils.defaultString(itemKey != null ? 
> itemKey.toString() : null);
> Object itemValue = findValue(listValue == null ? "top" : listValue);
> String itemValueStr = StringUtils.defaultString(itemValue != null ? 
> itemValue.toString() : null);
> String id = (new 
> StringBuilder()).append(params.get("id")).append(Integer.toString(cnt++)).toString();
> Here id is generated by appending with count of list items
>
> Because of these changes, we need to modify the jsp/javascription function in 
> all our application.

I cannot find such code in the RadioHandler.java

https://github.com/apache/struts/blob/support-2-3/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/simple/RadioHandler.java#L45-L92

> if we are not upgrading to next struts 2.3.20 (using 
> struts2-javatemplates-plugin-2.3.20 along with strut2-cord 2.3.32 version)
>
> we are getting below error
>
> Caused by: java.lang.NoSuchMethodError: 
> org/apache/struts2/util/ComponentUtils.isExpression(Ljava/lang/Object;)Z
> at 
> org.apache.struts2.views.java.simple.DynamicAttributesHandler.processDynamicAttributes(DynamicAttributesHandler.java:48)
> at 
> org.apache.struts2.views.java.simple.DynamicAttributesHandler.start(DynamicAttributesHandler.java:41)

You cannot mix different versions

> Do we have any alternate option to resolve this issue

Not yet as I cannot identify the source code.



Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: RE: Struts upgrade issue

2017-03-24 Thread Christoph Nenning
Hi,

for cases like yours a new librariy has been created: "Struts 2 Secure 
Jakarta Multipart parser plugin".

With that you can fix recent security issue in your app with your current 
version of struts. That buys you more time to do migration or refactoring 
necessary to upgrade struts.


http://struts.apache.org/download.cgi#struts-extras

https://github.com/apache/struts-extras



Regards,
Christoph



> From: "Gopal, Siva Prakash (US - Mechanicsburg)" 
> To: "user@struts.apache.org" , 
> Date: 24.03.2017 04:49
> Subject: Re: RE: Struts upgrade issue
> 
> Hi All,
> 
> 
> we have identified issues between radio button generation under 
> RadioHandler.java under struts2-javatemplates-plugin-2.3.20 and 
> struts2-javatemplates-plugin-2.3.32
> 
> struts2-javatemplates-plugin-2.3.20
> 
> for(Iterator itt = MakeIterator.convert(listObj); itt.hasNext(); 
stack.pop())
> {
> Object item = itt.next();
> stack.push(item);
> Object itemKey = findValue(listKey == null ? "top" : listKey);
> String itemKeyStr = StringUtils.defaultString(itemKey != null ? 
> itemKey.toString() : null);
> Object itemValue = findValue(listValue == null ? "top" : listValue);
> String itemValueStr = StringUtils.defaultString(itemValue != null ? 
> itemValue.toString() : null);
> String id = (new StringBuilder()).append(params.get("id")).append
> (itemKeyStr).toString();
> Here id is generated by appending with key value
> 
> struts2-javatemplates-plugin-2.3.32
> -
> for(Iterator itt = MakeIterator.convert(listObj); itt.hasNext(); 
stack.pop())
> {
> Object item = itt.next();
> stack.push(item);
> Object itemKey = findValue(listKey == null ? "top" : listKey);
> String itemKeyStr = StringUtils.defaultString(itemKey != null ? 
> itemKey.toString() : null);
> Object itemValue = findValue(listValue == null ? "top" : listValue);
> String itemValueStr = StringUtils.defaultString(itemValue != null ? 
> itemValue.toString() : null);
> String id = (new StringBuilder()).append(params.get("id")).append
> (Integer.toString(cnt++)).toString();
> Here id is generated by appending with count of list items
> 
> Because of these changes, we need to modify the jsp/javascription 
> function in all our application.
> 
> if we are not upgrading to next struts 2.3.20 (using struts2-
> javatemplates-plugin-2.3.20 along with strut2-cord 2.3.32 version)
> 
> we are getting below error
> 
> Caused by: java.lang.NoSuchMethodError: org/apache/struts2/util/
> ComponentUtils.isExpression(Ljava/lang/Object;)Z
> at 
> 
org.apache.struts2.views.java.simple.DynamicAttributesHandler.processDynamicAttributes
> (DynamicAttributesHandler.java:48)
> at 
> org.apache.struts2.views.java.simple.DynamicAttributesHandler.start
> (DynamicAttributesHandler.java:41)
> 
> Do we have any alternate option to resolve this issue
> 
> 
> Thanks,
> Siva
> 
> This message (including any attachments) contains confidential 
> information intended for a specific individual and purpose, and is 
> protected by law. If you are not the intended recipient, you should 
> delete this message and any disclosure, copying, or distribution of 
> this message, or the taking of any action based on it, by you is 
> strictly prohibited.
> 
> v.E.1

This Email was scanned by Sophos Anti Virus


Re: RE: Struts upgrade issue

2017-03-23 Thread Gopal, Siva Prakash (US - Mechanicsburg)
Hi All,


we have identified issues between radio button generation under 
RadioHandler.java under struts2-javatemplates-plugin-2.3.20 and 
struts2-javatemplates-plugin-2.3.32

struts2-javatemplates-plugin-2.3.20

for(Iterator itt = MakeIterator.convert(listObj); itt.hasNext(); stack.pop())
{
Object item = itt.next();
stack.push(item);
Object itemKey = findValue(listKey == null ? "top" : listKey);
String itemKeyStr = StringUtils.defaultString(itemKey != null ? 
itemKey.toString() : null);
Object itemValue = findValue(listValue == null ? "top" : listValue);
String itemValueStr = StringUtils.defaultString(itemValue != null ? 
itemValue.toString() : null);
String id = (new 
StringBuilder()).append(params.get("id")).append(itemKeyStr).toString();
Here id is generated by appending with key value

struts2-javatemplates-plugin-2.3.32
-
for(Iterator itt = MakeIterator.convert(listObj); itt.hasNext(); stack.pop())
{
Object item = itt.next();
stack.push(item);
Object itemKey = findValue(listKey == null ? "top" : listKey);
String itemKeyStr = StringUtils.defaultString(itemKey != null ? 
itemKey.toString() : null);
Object itemValue = findValue(listValue == null ? "top" : listValue);
String itemValueStr = StringUtils.defaultString(itemValue != null ? 
itemValue.toString() : null);
String id = (new 
StringBuilder()).append(params.get("id")).append(Integer.toString(cnt++)).toString();
Here id is generated by appending with count of list items

Because of these changes, we need to modify the jsp/javascription function in 
all our application.

if we are not upgrading to next struts 2.3.20 (using 
struts2-javatemplates-plugin-2.3.20 along with strut2-cord 2.3.32 version)

we are getting below error

Caused by: java.lang.NoSuchMethodError: 
org/apache/struts2/util/ComponentUtils.isExpression(Ljava/lang/Object;)Z
at 
org.apache.struts2.views.java.simple.DynamicAttributesHandler.processDynamicAttributes(DynamicAttributesHandler.java:48)
at 
org.apache.struts2.views.java.simple.DynamicAttributesHandler.start(DynamicAttributesHandler.java:41)

Do we have any alternate option to resolve this issue


Thanks,
Siva

This message (including any attachments) contains confidential information 
intended for a specific individual and purpose, and is protected by law. If you 
are not the intended recipient, you should delete this message and any 
disclosure, copying, or distribution of this message, or the taking of any 
action based on it, by you is strictly prohibited.

v.E.1


RE: Struts upgrade issue

2017-03-23 Thread Gopal, Siva Prakash (US - Mechanicsburg)
Hi All,

We have issue after upgrade to struts2-core-2.3.32 version

Action Method :

private List radioValueNum=new ArrayList();

public List getRadioValueNum() {
if(!radioValueNum.isEmpty()){
radioValueNum.clear();
radioValueNum.add(new 
ListOfValue("1", getText("generic.yes")));
radioValueNum.add(new 
ListOfValue("2", getText("generic.no")));
}
else{
radioValueNum.add(new 
ListOfValue("1", getText("generic.yes")));
radioValueNum.add(new 
ListOfValue("2", getText("generic.no")));
}
return radioValueNum;
}

JSP :



Generated HTML before strus upgrade 32 version (struts2-core-2.3.20.jar):
 
Yes

No


Generated HTML after strus upgrade 32 version (struts2-core-2.3.32.jar):


Yes

No

Here we have issue with ID generation for radio button .

Before upgrade, id's for radio button has been generated as id="radio11" and 
id="radio12" [by appending id="radio1"+key value mentioned in the list 
(radioValueNum).

After upgrade, id's for radio button has been generated as id="radio10" and 
id="radio11". it looks like key value mentioned in the list is not appended 
(index position is getting appended)

We just want to cross check that we are missing any jars as part of upgrade. or 
it caused due to ognl jar fix.

Please guide us.

This message (including any attachments) contains confidential information 
intended for a specific individual and purpose, and is protected by law. If you 
are not the intended recipient, you should delete this message and any 
disclosure, copying, or distribution of this message, or the taking of any 
action based on it, by you is strictly prohibited.

v.E.1