You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Roslyakova, Svetlana" <sv...@bnymellon.com> on 2017/09/26 15:27:30 UTC

RE: Question about upgrade to struts2 2.3.34 and session variables

Hi Lukasz,

I have another issue with struts2 2.3.34 upgrade.
We are using session variables throughout the application:

<s:textfield type="text" id="userId" theme="simple" name="session.user.UserId" value="%{top.UserId}" />

After the upgrade, the session variable is not updated anymore.

Any advice?

Thanks,

Lana.


-----Original Message-----
From: Lukasz Lenart [mailto:lukaszlenart@apache.org] 
Sent: Tuesday, September 26, 2017 1:21 AM
To: Struts Users Mailing List <us...@struts.apache.org>
Subject: Re: Question about upgrade to struts2 2.3.34 and s:hidden tag

Hi

I was just want to point to you to this [1] and especially to this issue [2] as now <s:hidden/> tag follows xhtml theme specification.

[1] https://clicktime.symantec.com/a/1/jTxJONkjiDRjnxqtJyLzOAW9IgFhSuhAO_BGezqBLQA=?d=cw3qmxrrBfHDuoaq7QOPdUlNgBJnHnyUtChS7TBmICggHQMsKhhx9Hy43fBh3lJvTDwrkBE4fy1r2z_KoLv33RdftTnb4mBDcK8JItt86Kesv4YCI_BBQ0GCMkOvkEbGV4tVnOGdvdOXVjdei6Tq1niWhY8Z5HiXdeQ7PZKlO5-c6orjryZImRxmPNTVMGsFnMOHpDCXlyq0zZ9HgWKUotXksDNjLrqWIUr3SuDDF6yDKZMRmyT7xgWqF3AEjz9cu5a2xUMd7NW3hvEsDFRqFzGXpyrK4E04Wv84AK6-iON2O9K5EyTkYHVoKOV2HoGnfnMlbOklzL6VDb8TWAI1AVHlLFlqVUKO5cp9WjWwlKO8uEVnYNSHcY5T1U6aM-AIqgRZWMvTmljn-vL1OUeuKh1X5HnHoT9PAP3Qo6U-buZt_DdlnVZ05J75-k4tQKyLEt56Qum1q4_nzthSavnEtMVi3GrM2MvGQT4WZywkbfTeEjMg8ht-x9g-&u=https%3A%2F%2Fcwiki.apache.org%2Fconfluence%2Fdisplay%2FWW%2FVersion%2BNotes%2B2.3.20
[2] https://clicktime.symantec.com/a/1/1gcOPBZ6wej0_Dfk183XYVBQnHmw0JQwx4KxA_-RCWU=?d=cw3qmxrrBfHDuoaq7QOPdUlNgBJnHnyUtChS7TBmICggHQMsKhhx9Hy43fBh3lJvTDwrkBE4fy1r2z_KoLv33RdftTnb4mBDcK8JItt86Kesv4YCI_BBQ0GCMkOvkEbGV4tVnOGdvdOXVjdei6Tq1niWhY8Z5HiXdeQ7PZKlO5-c6orjryZImRxmPNTVMGsFnMOHpDCXlyq0zZ9HgWKUotXksDNjLrqWIUr3SuDDF6yDKZMRmyT7xgWqF3AEjz9cu5a2xUMd7NW3hvEsDFRqFzGXpyrK4E04Wv84AK6-iON2O9K5EyTkYHVoKOV2HoGnfnMlbOklzL6VDb8TWAI1AVHlLFlqVUKO5cp9WjWwlKO8uEVnYNSHcY5T1U6aM-AIqgRZWMvTmljn-vL1OUeuKh1X5HnHoT9PAP3Qo6U-buZt_DdlnVZ05J75-k4tQKyLEt56Qum1q4_nzthSavnEtMVi3GrM2MvGQT4WZywkbfTeEjMg8ht-x9g-&u=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FWW-4297


Regards
--
Łukasz
+ 48 606 323 122 
+ https://clicktime.symantec.com/a/1/ouX-9RmxwMUJlDhRp8dgaH4-OUkOaYfIzAZ
+ BDp-Sv2o=?d=cw3qmxrrBfHDuoaq7QOPdUlNgBJnHnyUtChS7TBmICggHQMsKhhx9Hy43f
+ Bh3lJvTDwrkBE4fy1r2z_KoLv33RdftTnb4mBDcK8JItt86Kesv4YCI_BBQ0GCMkOvkEbG
+ V4tVnOGdvdOXVjdei6Tq1niWhY8Z5HiXdeQ7PZKlO5-c6orjryZImRxmPNTVMGsFnMOHpD
+ CXlyq0zZ9HgWKUotXksDNjLrqWIUr3SuDDF6yDKZMRmyT7xgWqF3AEjz9cu5a2xUMd7NW3
+ hvEsDFRqFzGXpyrK4E04Wv84AK6-iON2O9K5EyTkYHVoKOV2HoGnfnMlbOklzL6VDb8TWA
+ I1AVHlLFlqVUKO5cp9WjWwlKO8uEVnYNSHcY5T1U6aM-AIqgRZWMvTmljn-vL1OUeuKh1X
+ 5HnHoT9PAP3Qo6U-buZt_DdlnVZ05J75-k4tQKyLEt56Qum1q4_nzthSavnEtMVi3GrM2M
+ vGQT4WZywkbfTeEjMg8ht-x9g-&u=http%3A%2F%2Fwww.lenart.org.pl%2F

2017-09-26 3:46 GMT+02:00 Roslyakova, Svetlana <
svetlana.roslyakova@bnymellon.com>:

> I was able to resolve the issue.  We didn’t have ‘theme=”simple”’ on the
> <s:hidden> tags.
>
> Once I’ve added it to the tags, the issue went away.
>
>
>
> *From:* Roslyakova, Svetlana
> *Sent:* Monday, September 25, 2017 5:39 PM
> *To:* 'Struts Users Mailing List' <us...@struts.apache.org>
> *Subject:* RE: Question about upgrade to struts2 2.3.34 and s:hidden tag
>
>
>
> A little more information.
>
>
>
> I have the following form:
>
>
>
> <s:form id="Main" name="Main" method="POST" enctype="multipart/form-data" >
>
> <table border="0" cellpadding="0" cellspacing="0" width=1024px>
>
> <tr>
>
> <td height="100%" colspan="2" valign="top">
>
> <tiles:insertAttribute name="header" />
>
>  </td>
>
>   </tr>
>
>   <tr>
>
>    <td height="100%" width="20%" valign="top" ><tiles:insertAttribute
> name="menu" />
>
>    </td>
>
>    <td width="80%" valign="top"><tiles:insertAttribute name="body" />
>
>    </td>
>
>    </tr>
>
>
>
>           </table>
>
>           </s:form>
>
>
>
> If I use <s:hidden > tag in one of my jsp pages that are used as tiles in
> the above form, the pages are displayed one after another on the screen,
> instead of being displayed side by side.
>
> If I change <s:hidden > to <s:textfield > the jsp pages are displayed side
> by side, as they did before the upgrade.
>
>
>
> Please disregard below errors.  They’ve existed before the upgrade.
>
>
>
> Thanks,
>
>
>
> Lana.
>
>
>
> *From:* Roslyakova, Svetlana
> *Sent:* Monday, September 25, 2017 4:56 PM
> *To:* Struts Users Mailing List <us...@struts.apache.org>
> *Subject:* Question about upgrade to struts2 2.3.34 and s:hidden tag
>
>
>
> The only error is in Chrome:
>
>
>
> Not sure what resource it’s looking for in localhost/
>
>
>
> Thanks,
>
>
>
> Lana.
>
>
>
> -----Original Message-----
> From: Lukasz Lenart [mailto:lukaszlenart@apache.org
> <lu...@apache.org>]
> Sent: Monday, September 25, 2017 2:11 PM
> To: Struts Users Mailing List <us...@struts.apache.org>
> Subject: Re: Question about com.opensymphony.xwork2.util.LocalizedTextUtil
>
>
>
> 2017-09-25 20:05 GMT+02:00 Roslyakova, Svetlana
>
> <sv...@bnymellon.com>:
>
> > Hi,
>
> >
>
> > We have upgraded to struts2 version 2.3.34.
>
> >
>
> > After the upgrade s:hidden field stopped working.  If I remove s:hidden
> tag from the jsp page, the page is displayed correctly, with the <s:hidden
> tag on the screen, css stop working.
>
> >
>
> > Any advice?
>
>
>
> Do you see any exception in the logs?
>
>
>
> And please do not mix two different questions, this thread is about Struts
> 2.5.13 and your question is not related to it. It would be better start a
> new thread.
>
>
>
>
>
> Regards
>
> --
>
> Łukasz
>
> + 48 606 323 122 <606%20323%20122>
>
> + https://clicktime.symantec.com/a/1/9huMiFXcu3yYqczNjqF-DUHGUqqtgMvPHBV
>
> + UY2TKy8c=?d=h0wfo3Srn4eySKlXwne7XZ1zQ72d0asSi5JUojjPdCvATGoFO0A5vBtYd7
>
> + 0Rnvjkgzjux8Cg-I5ZN1ReVHJ6sTd5UklTWhfugCEC62GiPYYfeWEfwYlsIbPgHWaS3sZq
>
> + YYKRJ5Da0DyXGFKg2sHXO6DiNHTo1V4d_B83Mk2Gc5U5grzxiXgrDXfqwg6v6kn0eZAcEM
>
> + Q_c9rS89zhhKGAjdffweZ3CIrruRyPbheRXCN9puvrqnWtW7fEjkb1VnLl_nJ0D9Prl37L
>
> + i7LPQVUaFvJj7gG7lCX1t3vV2R7a52CTOAjgy7P8f1adON5r3YKWPjE_triyVnraN11lLJ
>
> + LvBQdVAWOO84U9aN3GoJbqc5Ky_kw-SCPQyz8MiRYmLhBGf60H9bHwBA-ehWHGy3glRiq9
>
> + PfFuCT0nlAr5mVqB-lpjX3uDy-bCGqsKJqIkXCbr6YXgYXwo053uJxZKbuwVEI_mQ9xyb7
>
> + RYrrziYok2TOmWmaKI2BfcAGQX1KBq9Q%3D%3D&u=http%3A%2F%2Fwww.lenart.org.p
>
> + l%2F
>
>
>
> ---------------------------------------------------------------------
>
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>
> For additional commands, e-mail: user-help@struts.apache.org
>
> The information contained in this e-mail, and any attachment, is
> confidential and is intended solely for the use of the intended recipient.
> Access, copying or re-use of the e-mail or any attachment, or any
> information contained therein, by any other person is not authorized. If
> you are not the intended recipient please return the e-mail to the sender
> and delete it from your computer. Although we attempt to sweep e-mail and
> attachments for viruses, we do not guarantee that either are virus-free and
> accept no liability for any damage sustained as a result of viruses.
>
> Please refer to https://clicktime.symantec.com/a/1/X2jQqQO6G8cKoyqMf2UXZC3nlOTu1Y1pAmfyjFkiR5E=?d=cw3qmxrrBfHDuoaq7QOPdUlNgBJnHnyUtChS7TBmICggHQMsKhhx9Hy43fBh3lJvTDwrkBE4fy1r2z_KoLv33RdftTnb4mBDcK8JItt86Kesv4YCI_BBQ0GCMkOvkEbGV4tVnOGdvdOXVjdei6Tq1niWhY8Z5HiXdeQ7PZKlO5-c6orjryZImRxmPNTVMGsFnMOHpDCXlyq0zZ9HgWKUotXksDNjLrqWIUr3SuDDF6yDKZMRmyT7xgWqF3AEjz9cu5a2xUMd7NW3hvEsDFRqFzGXpyrK4E04Wv84AK6-iON2O9K5EyTkYHVoKOV2HoGnfnMlbOklzL6VDb8TWAI1AVHlLFlqVUKO5cp9WjWwlKO8uEVnYNSHcY5T1U6aM-AIqgRZWMvTmljn-vL1OUeuKh1X5HnHoT9PAP3Qo6U-buZt_DdlnVZ05J75-k4tQKyLEt56Qum1q4_nzthSavnEtMVi3GrM2MvGQT4WZywkbfTeEjMg8ht-x9g-&u=http%3A%2F%2Fdisclaimer.bnymellon.com%2Feu.htm for certain
> disclosures relating to European legal entities.
>

The information contained in this e-mail, and any attachment, is confidential and is intended solely for the use of the intended recipient. Access, copying or re-use of the e-mail or any attachment, or any information contained therein, by any other person is not authorized. If you are not the intended recipient please return the e-mail to the sender and delete it from your computer. Although we attempt to sweep e-mail and attachments for viruses, we do not guarantee that either are virus-free and accept no liability for any damage sustained as a result of viruses. 

Please refer to http://disclaimer.bnymellon.com/eu.htm for certain disclosures relating to European legal entities.

Re: Question about upgrade to struts2 2.3.34 and session variables

Posted by Lukasz Lenart <lu...@apache.org>.
2017-09-27 13:49 GMT+02:00 Roslyakova, Svetlana
<sv...@bnymellon.com>:
> 250917 [http-nio-8080-exec-8] WARN com.opensymphony.xwork2.interceptor.ParametersInterceptor - Parameter [#session['userList'][0].UserId] matches excluded pattern [(^|\%\{)((#?)(top(\.|\['|\[")|\[\d\]\.)?)(dojo|struts|session|request|response|application|servlet(Request|Response|Context)|parameters|context|_memberAccess)(\.|\[).*]!

From what version do you migrate? You have two options:
- either rename session into something else, e.g. SessionUsers
- use ParameterNameAware in your action to allow accessing session
https://struts.apache.org/maven/struts2-core/apidocs/com/opensymphony/xwork2/interceptor/ParameterNameAware.html

I would suggest the first option as using "session" is misleading as
there a #session scope
https://struts.apache.org/docs/ognl.html


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

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


RE: Question about upgrade to struts2 2.3.34 and session variables

Posted by "Roslyakova, Svetlana" <sv...@bnymellon.com>.
Hi Yasser,

Replacing .UserID with lowercase u .userId didn't work either.

I've got the following warning message:


250917 [http-nio-8080-exec-8] WARN com.opensymphony.xwork2.interceptor.ParametersInterceptor - Parameter [#session['userList'][0].UserId] matches excluded pattern [(^|\%\{)((#?)(top(\.|\['|\[")|\[\d\]\.)?)(dojo|struts|session|request|response|application|servlet(Request|Response|Context)|parameters|context|_memberAccess)(\.|\[).*]!

Thanks,


Lana.



-----Original Message-----
From: Yasser Zamani [mailto:yasser.zamani@live.com] 
Sent: Wednesday, September 27, 2017 1:24 AM
To: user@struts.apache.org
Subject: Re: Question about upgrade to struts2 2.3.34 and session variables



On 9/26/2017 10:47 PM, Roslyakova, Svetlana wrote:
> Hi Yasser,
> 
> Unfortunately it didn't work either.
> 
> Thanks,
> 
> Lana.
> 

I also think all .UserId should be replaced with .userId (lowercase u). 
Also, please set devMode to true [1] and examine output for any related WARN.

[1] https://struts.apache.org/docs/devmode.html

> -----Original Message-----
> From: Yasser Zamani [mailto:yasser.zamani@live.com]
> Sent: Tuesday, September 26, 2017 1:49 PM
> To: user@struts.apache.org
> Subject: Re: Question about upgrade to struts2 2.3.34 and session 
> variables
> 
> 
> 
> On 9/26/2017 9:14 PM, Roslyakova, Svetlana wrote:
>> Hi Yasser,
>>
>> Here is my Session getters/setters:
>>
>> 	public void setSession(Map<String, Object> arg0) {
>> 		this.Session = arg0;
>> 	}
>> 	
>> 	public Map<String, Object> getSession() {
>> 		return Session;
>> 	}
>>
> 
> Thank you! So could you please also check if replacing all session.userList with session['userList'] resolves this issue?
> 
>> Adding # before session didn't solve the issue.
>>
>> Thanks,
>>
>> Lana
>>
>> -----Original Message-----
>> From: Yasser Zamani [mailto:yasser.zamani@live.com]
>> Sent: Tuesday, September 26, 2017 1:12 PM
>> To: user@struts.apache.org
>> Subject: Re: Question about upgrade to struts2 2.3.34 and session 
>> variables
>>
>>
>>
>> On 9/26/2017 7:41 PM, Roslyakova, Svetlana wrote:
>>> Here is the full example:
>>>
>>> <s:iterator var="UserRow" status="stat" value="session.userList">
>>>     
>>
>> Does your action have getSession() method? As I remember, to access 
>> session we should use #session e.g. #session.userList or 
>> #session['userList']
>>
>>> <s:set var="index" value="%{#stat.index}" />
>>>     <tr>
>>>          
>>>       <td><div id="commitdiv<s:property 
>>> value="#index"/>"><s:textfield type="text" id="userId" 
>>> theme="simple"  name="session. userList [%{#stat.index}].UserId" 
>>> value="%{top.UserId}" /></div></td> </tr>
>>>
>>
>> Same as above, I guess it should be #session.userList 
>> [%{#stat.index}].UserId
>>
>> Regards,
>> Yasser.
>>
>>> The UserList is the business class and getters/setters for UserId in that class are as follows:
>>>
>>> public String getUserId() {
>>> 		return UserId;
>>> 	}
>>> 	public void setUserId(String userId) {
>>> 		UserId = userId;
>>> 	}
>>>
>>> It all worked before the upgrade.
>>>
>>> Thanks,
>>>
>>> Lana.
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: Lukasz Lenart [mailto:lukaszlenart@apache.org]
>>> Sent: Tuesday, September 26, 2017 11:39 AM
>>> To: Struts Users Mailing List <us...@struts.apache.org>
>>> Subject: Re: Question about upgrade to struts2 2.3.34 and session 
>>> variables
>>>
>>> 2017-09-26 17:27 GMT+02:00 Roslyakova, Svetlana
>>> <sv...@bnymellon.com>:
>>>> Hi Lukasz,
>>>>
>>>> I have another issue with struts2 2.3.34 upgrade.
>>>> We are using session variables throughout the application:
>>>>
>>>> <s:textfield type="text" id="userId" theme="simple"
>>>> name="session.user.UserId" value="%{top.UserId}" />
>>>
>>> What getters/setters do you have for UserId? And why do you use %{top.UserId}?
>>>
>>>
>>> Regards
>>>
>> B KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB  [  X  ܚX KK[XZ[
>>    \ \ ][  X  ܚX P  ]˘\X K ܙ B  ܈Y][ۘ[  [X[  K[XZ[
>>    \ \ Z[  ]˘\X K ܙ B
>>
>> The information contained in this e-mail, and any attachment, is confidential and is intended solely for the use of the intended recipient. Access, copying or re-use of the e-mail or any attachment, or any information contained therein, by any other person is not authorized. If you are not the intended recipient please return the e-mail to the sender and delete it from your computer. Although we attempt to sweep e-mail and attachments for viruses, we do not guarantee that either are virus-free and accept no liability for any damage sustained as a result of viruses.
>>
>> Please refer to http://disclaimer.bnymellon.com/eu.htm for certain disclosures relating to European legal entities.
>> B 
>> KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK
>> KCB  [  X  ܚX KK[XZ[
>   \ \ ][  X  ܚX P  ]˘\X K ܙ B  ܈Y][ۘ
>> [  [X[  K[XZ[
>   \ \ Z[  ]˘\X K ܙ B
>>
> B KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB  [  X  ܚX KK[XZ[
>   \ \ ][  X  ܚX P  ]˘\X K ܙ B  ܈Y][ۘ[  [X[  K[XZ[
>   \ \ Z[  ]˘\X K ܙ B
> 
> The information contained in this e-mail, and any attachment, is confidential and is intended solely for the use of the intended recipient. Access, copying or re-use of the e-mail or any attachment, or any information contained therein, by any other person is not authorized. If you are not the intended recipient please return the e-mail to the sender and delete it from your computer. Although we attempt to sweep e-mail and attachments for viruses, we do not guarantee that either are virus-free and accept no liability for any damage sustained as a result of viruses.
> 
> Please refer to http://disclaimer.bnymellon.com/eu.htm for certain disclosures relating to European legal entities.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
B KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB  [  X  ܚX KK[XZ[
 \ \ ][  X  ܚX P  ]˘\X K ܙ B  ܈Y][ۘ[  [X[  K[XZ[
 \ \ Z[  ]˘\X K ܙ B

The information contained in this e-mail, and any attachment, is confidential and is intended solely for the use of the intended recipient. Access, copying or re-use of the e-mail or any attachment, or any information contained therein, by any other person is not authorized. If you are not the intended recipient please return the e-mail to the sender and delete it from your computer. Although we attempt to sweep e-mail and attachments for viruses, we do not guarantee that either are virus-free and accept no liability for any damage sustained as a result of viruses. 

Please refer to http://disclaimer.bnymellon.com/eu.htm for certain disclosures relating to European legal entities.

Re: Question about upgrade to struts2 2.3.34 and session variables

Posted by Yasser Zamani <ya...@live.com>.

On 9/26/2017 10:47 PM, Roslyakova, Svetlana wrote:
> Hi Yasser,
> 
> Unfortunately it didn't work either.
> 
> Thanks,
> 
> Lana.
> 

I also think all .UserId should be replaced with .userId (lowercase u). 
Also, please set devMode to true [1] and examine output for any related 
WARN.

[1] https://struts.apache.org/docs/devmode.html

> -----Original Message-----
> From: Yasser Zamani [mailto:yasser.zamani@live.com]
> Sent: Tuesday, September 26, 2017 1:49 PM
> To: user@struts.apache.org
> Subject: Re: Question about upgrade to struts2 2.3.34 and session variables
> 
> 
> 
> On 9/26/2017 9:14 PM, Roslyakova, Svetlana wrote:
>> Hi Yasser,
>>
>> Here is my Session getters/setters:
>>
>> 	public void setSession(Map<String, Object> arg0) {
>> 		this.Session = arg0;
>> 	}
>> 	
>> 	public Map<String, Object> getSession() {
>> 		return Session;
>> 	}
>>
> 
> Thank you! So could you please also check if replacing all session.userList with session['userList'] resolves this issue?
> 
>> Adding # before session didn't solve the issue.
>>
>> Thanks,
>>
>> Lana
>>
>> -----Original Message-----
>> From: Yasser Zamani [mailto:yasser.zamani@live.com]
>> Sent: Tuesday, September 26, 2017 1:12 PM
>> To: user@struts.apache.org
>> Subject: Re: Question about upgrade to struts2 2.3.34 and session
>> variables
>>
>>
>>
>> On 9/26/2017 7:41 PM, Roslyakova, Svetlana wrote:
>>> Here is the full example:
>>>
>>> <s:iterator var="UserRow" status="stat" value="session.userList">
>>>     
>>
>> Does your action have getSession() method? As I remember, to access
>> session we should use #session e.g. #session.userList or
>> #session['userList']
>>
>>> <s:set var="index" value="%{#stat.index}" />
>>>     <tr>
>>>          
>>>       <td><div id="commitdiv<s:property value="#index"/>"><s:textfield
>>> type="text" id="userId" theme="simple"  name="session. userList
>>> [%{#stat.index}].UserId" value="%{top.UserId}" /></div></td> </tr>
>>>
>>
>> Same as above, I guess it should be #session.userList
>> [%{#stat.index}].UserId
>>
>> Regards,
>> Yasser.
>>
>>> The UserList is the business class and getters/setters for UserId in that class are as follows:
>>>
>>> public String getUserId() {
>>> 		return UserId;
>>> 	}
>>> 	public void setUserId(String userId) {
>>> 		UserId = userId;
>>> 	}
>>>
>>> It all worked before the upgrade.
>>>
>>> Thanks,
>>>
>>> Lana.
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: Lukasz Lenart [mailto:lukaszlenart@apache.org]
>>> Sent: Tuesday, September 26, 2017 11:39 AM
>>> To: Struts Users Mailing List <us...@struts.apache.org>
>>> Subject: Re: Question about upgrade to struts2 2.3.34 and session
>>> variables
>>>
>>> 2017-09-26 17:27 GMT+02:00 Roslyakova, Svetlana
>>> <sv...@bnymellon.com>:
>>>> Hi Lukasz,
>>>>
>>>> I have another issue with struts2 2.3.34 upgrade.
>>>> We are using session variables throughout the application:
>>>>
>>>> <s:textfield type="text" id="userId" theme="simple"
>>>> name="session.user.UserId" value="%{top.UserId}" />
>>>
>>> What getters/setters do you have for UserId? And why do you use %{top.UserId}?
>>>
>>>
>>> Regards
>>>
>> B KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB  [  X  ܚX KK[XZ[
>>    \ \ ][  X  ܚX P  ]˘\X K ܙ B  ܈Y][ۘ[  [X[  K[XZ[
>>    \ \ Z[  ]˘\X K ܙ B
>>
>> The information contained in this e-mail, and any attachment, is confidential and is intended solely for the use of the intended recipient. Access, copying or re-use of the e-mail or any attachment, or any information contained therein, by any other person is not authorized. If you are not the intended recipient please return the e-mail to the sender and delete it from your computer. Although we attempt to sweep e-mail and attachments for viruses, we do not guarantee that either are virus-free and accept no liability for any damage sustained as a result of viruses.
>>
>> Please refer to http://disclaimer.bnymellon.com/eu.htm for certain disclosures relating to European legal entities.
>> B KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK
>> KCB  [  X  ܚX KK[XZ[
>   \ \ ][  X  ܚX P  ]˘\X K ܙ B  ܈Y][ۘ
>> [  [X[  K[XZ[
>   \ \ Z[  ]˘\X K ܙ B
>>
> B KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB  [  X  ܚX KK[XZ[
>   \ \ ][  X  ܚX P  ]˘\X K ܙ B  ܈Y][ۘ[  [X[  K[XZ[
>   \ \ Z[  ]˘\X K ܙ B
> 
> The information contained in this e-mail, and any attachment, is confidential and is intended solely for the use of the intended recipient. Access, copying or re-use of the e-mail or any attachment, or any information contained therein, by any other person is not authorized. If you are not the intended recipient please return the e-mail to the sender and delete it from your computer. Although we attempt to sweep e-mail and attachments for viruses, we do not guarantee that either are virus-free and accept no liability for any damage sustained as a result of viruses.
> 
> Please refer to http://disclaimer.bnymellon.com/eu.htm for certain disclosures relating to European legal entities.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

RE: Question about upgrade to struts2 2.3.34 and session variables

Posted by "Roslyakova, Svetlana" <sv...@bnymellon.com>.
Hi Yasser,

Unfortunately it didn't work either.

Thanks,

Lana.

-----Original Message-----
From: Yasser Zamani [mailto:yasser.zamani@live.com] 
Sent: Tuesday, September 26, 2017 1:49 PM
To: user@struts.apache.org
Subject: Re: Question about upgrade to struts2 2.3.34 and session variables



On 9/26/2017 9:14 PM, Roslyakova, Svetlana wrote:
> Hi Yasser,
> 
> Here is my Session getters/setters:
> 
> 	public void setSession(Map<String, Object> arg0) {
> 		this.Session = arg0;
> 	}
> 	
> 	public Map<String, Object> getSession() {
> 		return Session;
> 	}
> 

Thank you! So could you please also check if replacing all session.userList with session['userList'] resolves this issue?

> Adding # before session didn't solve the issue.
> 
> Thanks,
> 
> Lana
> 
> -----Original Message-----
> From: Yasser Zamani [mailto:yasser.zamani@live.com]
> Sent: Tuesday, September 26, 2017 1:12 PM
> To: user@struts.apache.org
> Subject: Re: Question about upgrade to struts2 2.3.34 and session 
> variables
> 
> 
> 
> On 9/26/2017 7:41 PM, Roslyakova, Svetlana wrote:
>> Here is the full example:
>>
>> <s:iterator var="UserRow" status="stat" value="session.userList">
>>    
> 
> Does your action have getSession() method? As I remember, to access 
> session we should use #session e.g. #session.userList or 
> #session['userList']
> 
>> <s:set var="index" value="%{#stat.index}" />
>>    <tr>
>>         
>>      <td><div id="commitdiv<s:property value="#index"/>"><s:textfield 
>> type="text" id="userId" theme="simple"  name="session. userList 
>> [%{#stat.index}].UserId" value="%{top.UserId}" /></div></td> </tr>
>>
> 
> Same as above, I guess it should be #session.userList 
> [%{#stat.index}].UserId
> 
> Regards,
> Yasser.
> 
>> The UserList is the business class and getters/setters for UserId in that class are as follows:
>>
>> public String getUserId() {
>> 		return UserId;
>> 	}
>> 	public void setUserId(String userId) {
>> 		UserId = userId;
>> 	}
>>
>> It all worked before the upgrade.
>>
>> Thanks,
>>
>> Lana.
>>
>>
>>
>> -----Original Message-----
>> From: Lukasz Lenart [mailto:lukaszlenart@apache.org]
>> Sent: Tuesday, September 26, 2017 11:39 AM
>> To: Struts Users Mailing List <us...@struts.apache.org>
>> Subject: Re: Question about upgrade to struts2 2.3.34 and session 
>> variables
>>
>> 2017-09-26 17:27 GMT+02:00 Roslyakova, Svetlana
>> <sv...@bnymellon.com>:
>>> Hi Lukasz,
>>>
>>> I have another issue with struts2 2.3.34 upgrade.
>>> We are using session variables throughout the application:
>>>
>>> <s:textfield type="text" id="userId" theme="simple"
>>> name="session.user.UserId" value="%{top.UserId}" />
>>
>> What getters/setters do you have for UserId? And why do you use %{top.UserId}?
>>
>>
>> Regards
>>
> B KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB  [  X  ܚX KK[XZ[
>   \ \ ][  X  ܚX P  ]˘\X K ܙ B  ܈Y][ۘ[  [X[  K[XZ[
>   \ \ Z[  ]˘\X K ܙ B
> 
> The information contained in this e-mail, and any attachment, is confidential and is intended solely for the use of the intended recipient. Access, copying or re-use of the e-mail or any attachment, or any information contained therein, by any other person is not authorized. If you are not the intended recipient please return the e-mail to the sender and delete it from your computer. Although we attempt to sweep e-mail and attachments for viruses, we do not guarantee that either are virus-free and accept no liability for any damage sustained as a result of viruses.
> 
> Please refer to http://disclaimer.bnymellon.com/eu.htm for certain disclosures relating to European legal entities.
> B KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK
> KCB  [  X  ܚX KK[XZ[
 \ \ ][  X  ܚX P  ]˘\X K ܙ B  ܈Y][ۘ
> [  [X[  K[XZ[
 \ \ Z[  ]˘\X K ܙ B
> 
B KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB  [  X  ܚX KK[XZ[
 \ \ ][  X  ܚX P  ]˘\X K ܙ B  ܈Y][ۘ[  [X[  K[XZ[
 \ \ Z[  ]˘\X K ܙ B

The information contained in this e-mail, and any attachment, is confidential and is intended solely for the use of the intended recipient. Access, copying or re-use of the e-mail or any attachment, or any information contained therein, by any other person is not authorized. If you are not the intended recipient please return the e-mail to the sender and delete it from your computer. Although we attempt to sweep e-mail and attachments for viruses, we do not guarantee that either are virus-free and accept no liability for any damage sustained as a result of viruses. 

Please refer to http://disclaimer.bnymellon.com/eu.htm for certain disclosures relating to European legal entities.

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

Re: Question about upgrade to struts2 2.3.34 and session variables

Posted by Yasser Zamani <ya...@live.com>.

On 9/26/2017 9:14 PM, Roslyakova, Svetlana wrote:
> Hi Yasser,
> 
> Here is my Session getters/setters:
> 
> 	public void setSession(Map<String, Object> arg0) {
> 		this.Session = arg0;
> 	}
> 	
> 	public Map<String, Object> getSession() {
> 		return Session;
> 	}
> 

Thank you! So could you please also check if replacing all 
session.userList with session['userList'] resolves this issue?

> Adding # before session didn't solve the issue.
> 
> Thanks,
> 
> Lana
> 
> -----Original Message-----
> From: Yasser Zamani [mailto:yasser.zamani@live.com]
> Sent: Tuesday, September 26, 2017 1:12 PM
> To: user@struts.apache.org
> Subject: Re: Question about upgrade to struts2 2.3.34 and session variables
> 
> 
> 
> On 9/26/2017 7:41 PM, Roslyakova, Svetlana wrote:
>> Here is the full example:
>>
>> <s:iterator var="UserRow" status="stat" value="session.userList">
>>    
> 
> Does your action have getSession() method? As I remember, to access session we should use #session e.g. #session.userList or #session['userList']
> 
>> <s:set var="index" value="%{#stat.index}" />
>>    <tr>
>>         
>>      <td><div id="commitdiv<s:property value="#index"/>"><s:textfield
>> type="text" id="userId" theme="simple"  name="session. userList
>> [%{#stat.index}].UserId" value="%{top.UserId}" /></div></td> </tr>
>>
> 
> Same as above, I guess it should be #session.userList [%{#stat.index}].UserId
> 
> Regards,
> Yasser.
> 
>> The UserList is the business class and getters/setters for UserId in that class are as follows:
>>
>> public String getUserId() {
>> 		return UserId;
>> 	}
>> 	public void setUserId(String userId) {
>> 		UserId = userId;
>> 	}
>>
>> It all worked before the upgrade.
>>
>> Thanks,
>>
>> Lana.
>>
>>
>>
>> -----Original Message-----
>> From: Lukasz Lenart [mailto:lukaszlenart@apache.org]
>> Sent: Tuesday, September 26, 2017 11:39 AM
>> To: Struts Users Mailing List <us...@struts.apache.org>
>> Subject: Re: Question about upgrade to struts2 2.3.34 and session
>> variables
>>
>> 2017-09-26 17:27 GMT+02:00 Roslyakova, Svetlana
>> <sv...@bnymellon.com>:
>>> Hi Lukasz,
>>>
>>> I have another issue with struts2 2.3.34 upgrade.
>>> We are using session variables throughout the application:
>>>
>>> <s:textfield type="text" id="userId" theme="simple"
>>> name="session.user.UserId" value="%{top.UserId}" />
>>
>> What getters/setters do you have for UserId? And why do you use %{top.UserId}?
>>
>>
>> Regards
>>
> B KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB  [  X  ܚX KK[XZ[
>   \ \ ][  X  ܚX P  ]˘\X K ܙ B  ܈Y][ۘ[  [X[  K[XZ[
>   \ \ Z[  ]˘\X K ܙ B
> 
> The information contained in this e-mail, and any attachment, is confidential and is intended solely for the use of the intended recipient. Access, copying or re-use of the e-mail or any attachment, or any information contained therein, by any other person is not authorized. If you are not the intended recipient please return the e-mail to the sender and delete it from your computer. Although we attempt to sweep e-mail and attachments for viruses, we do not guarantee that either are virus-free and accept no liability for any damage sustained as a result of viruses.
> 
> Please refer to http://disclaimer.bnymellon.com/eu.htm for certain disclosures relating to European legal entities.
> B�KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB��[��X��ܚX�KK[XZ[�\�\�][��X��ܚX�P��]˘\X�K�ܙ�B��܈Y][ۘ[��[X[��K[XZ[�\�\�Z[��]˘\X�K�ܙ�B
> 

RE: Question about upgrade to struts2 2.3.34 and session variables

Posted by "Roslyakova, Svetlana" <sv...@bnymellon.com>.
Hi Yasser,

Here is my Session getters/setters:

	public void setSession(Map<String, Object> arg0) {
		this.Session = arg0;
	}
	
	public Map<String, Object> getSession() {
		return Session;
	}

Adding # before session didn't solve the issue.

Thanks,

Lana

-----Original Message-----
From: Yasser Zamani [mailto:yasser.zamani@live.com] 
Sent: Tuesday, September 26, 2017 1:12 PM
To: user@struts.apache.org
Subject: Re: Question about upgrade to struts2 2.3.34 and session variables



On 9/26/2017 7:41 PM, Roslyakova, Svetlana wrote:
> Here is the full example:
> 
> <s:iterator var="UserRow" status="stat" value="session.userList">
>   

Does your action have getSession() method? As I remember, to access session we should use #session e.g. #session.userList or #session['userList']

> <s:set var="index" value="%{#stat.index}" />
>   <tr>
>        
>     <td><div id="commitdiv<s:property value="#index"/>"><s:textfield 
> type="text" id="userId" theme="simple"  name="session. userList 
> [%{#stat.index}].UserId" value="%{top.UserId}" /></div></td> </tr>
> 

Same as above, I guess it should be #session.userList [%{#stat.index}].UserId

Regards,
Yasser.

> The UserList is the business class and getters/setters for UserId in that class are as follows:
> 
> public String getUserId() {
> 		return UserId;
> 	}
> 	public void setUserId(String userId) {
> 		UserId = userId;
> 	}
> 
> It all worked before the upgrade.
> 
> Thanks,
> 
> Lana.
> 
> 
> 
> -----Original Message-----
> From: Lukasz Lenart [mailto:lukaszlenart@apache.org]
> Sent: Tuesday, September 26, 2017 11:39 AM
> To: Struts Users Mailing List <us...@struts.apache.org>
> Subject: Re: Question about upgrade to struts2 2.3.34 and session 
> variables
> 
> 2017-09-26 17:27 GMT+02:00 Roslyakova, Svetlana
> <sv...@bnymellon.com>:
>> Hi Lukasz,
>>
>> I have another issue with struts2 2.3.34 upgrade.
>> We are using session variables throughout the application:
>>
>> <s:textfield type="text" id="userId" theme="simple" 
>> name="session.user.UserId" value="%{top.UserId}" />
> 
> What getters/setters do you have for UserId? And why do you use %{top.UserId}?
> 
> 
> Regards
> 
B KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB  [  X  ܚX KK[XZ[
 \ \ ][  X  ܚX P  ]˘\X K ܙ B  ܈Y][ۘ[  [X[  K[XZ[
 \ \ Z[  ]˘\X K ܙ B

The information contained in this e-mail, and any attachment, is confidential and is intended solely for the use of the intended recipient. Access, copying or re-use of the e-mail or any attachment, or any information contained therein, by any other person is not authorized. If you are not the intended recipient please return the e-mail to the sender and delete it from your computer. Although we attempt to sweep e-mail and attachments for viruses, we do not guarantee that either are virus-free and accept no liability for any damage sustained as a result of viruses. 

Please refer to http://disclaimer.bnymellon.com/eu.htm for certain disclosures relating to European legal entities.

Re: Question about upgrade to struts2 2.3.34 and session variables

Posted by Yasser Zamani <ya...@live.com>.

On 9/26/2017 7:41 PM, Roslyakova, Svetlana wrote:
> Here is the full example:
> 
> <s:iterator var="UserRow" status="stat" value="session.userList">
>   

Does your action have getSession() method? As I remember, to access 
session we should use #session e.g. #session.userList or 
#session['userList']

> <s:set var="index" value="%{#stat.index}" />
>   <tr>
>        
>     <td><div id="commitdiv<s:property value="#index"/>"><s:textfield type="text" id="userId" theme="simple"  name="session. userList [%{#stat.index}].UserId" value="%{top.UserId}" /></div></td>
> </tr>
> 

Same as above, I guess it should be #session.userList 
[%{#stat.index}].UserId

Regards,
Yasser.

> The UserList is the business class and getters/setters for UserId in that class are as follows:
> 
> public String getUserId() {
> 		return UserId;
> 	}
> 	public void setUserId(String userId) {
> 		UserId = userId;
> 	}
> 
> It all worked before the upgrade.
> 
> Thanks,
> 
> Lana.
> 
> 
> 
> -----Original Message-----
> From: Lukasz Lenart [mailto:lukaszlenart@apache.org]
> Sent: Tuesday, September 26, 2017 11:39 AM
> To: Struts Users Mailing List <us...@struts.apache.org>
> Subject: Re: Question about upgrade to struts2 2.3.34 and session variables
> 
> 2017-09-26 17:27 GMT+02:00 Roslyakova, Svetlana
> <sv...@bnymellon.com>:
>> Hi Lukasz,
>>
>> I have another issue with struts2 2.3.34 upgrade.
>> We are using session variables throughout the application:
>>
>> <s:textfield type="text" id="userId" theme="simple" name="session.user.UserId" value="%{top.UserId}" />
> 
> What getters/setters do you have for UserId? And why do you use %{top.UserId}?
> 
> 
> Regards
> 

Re: Question about upgrade to struts2 2.3.34 and session variables

Posted by Lukasz Lenart <lu...@apache.org>.
2017-09-29 17:35 GMT+02:00 Roslyakova, Svetlana
<sv...@bnymellon.com>:
> Below didn't work.  We ended up creating new Map variable in Action, updating that variable in jsp and setting session from that variable in Action.

Thanks for posting back your solution, I think we should start
collecting all these small advices (e.g. do not use "session" as a
variable name as this is a special Struts variable)


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

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


RE: Question about upgrade to struts2 2.3.34 and session variables

Posted by "Roslyakova, Svetlana" <sv...@bnymellon.com>.
Below didn't work.  We ended up creating new Map variable in Action, updating that variable in jsp and setting session from that variable in Action.

Thanks,

Lana.

-----Original Message-----
From: Lukasz Lenart [mailto:lukaszlenart@apache.org] 
Sent: Wednesday, September 27, 2017 1:53 AM
To: Struts Users Mailing List <us...@struts.apache.org>
Subject: Re: Question about upgrade to struts2 2.3.34 and session variables

2017-09-26 18:11 GMT+02:00 Roslyakova, Svetlana
<sv...@bnymellon.com>:
> Here is the full example:
>
> <s:iterator var="UserRow" status="stat" value="session.userList">
>
> <s:set var="index" value="%{#stat.index}" />  <tr>
>
>    <td><div id="commitdiv<s:property value="#index"/>"><s:textfield 
> type="text" id="userId" theme="simple"  name="session. userList 
> [%{#stat.index}].UserId" value="%{top.UserId}" /></div></td> </tr>

<s:iterator var="userRow" status="stat" value="session.userList"> <s:set var="index" value="#stat.index" /> <tr>
    <td>
        <div id='commitdiv-<s:property value="#index"/>'>
            <s:textfield type="text" id="userId-%{#index}"
theme="simple" name="session.userList[#index].userId"
value="#userRow.userId" />
        </div>
    </td>
</tr>
</s:iterator>

This should work and I would suggest these readings:
https://clicktime.symantec.com/a/1/45Kx02MVtBkl36gnA94GWc2WdlkNs1_0re97xi3Gn-s=?d=07yfFFqYPM0WD4Foo01g3osCHMJYB3s-Bam1KYGt1G8OPUfmz2vfYiTUym7PiLP1YARrRlzJV8jUz4jcpOuNEe03YeaeS4yT-l4v5QM-UkCGtu2LFtjvb-xY4uGko_A-WyojufbTj9eapK7r2ZjwgdHnwOsBS2Vz8DQb6Q5_nMBWbB2qslNZbuqS9hJhOYjIYtTBkGycfJ2yufD86NwuhItmYDRE-qSfiYJNB87Wi4pBXd4W_xbvWFh6ita4wIXnIyNdiqh2KB4dLO_-_gmOFgzv8XsQrGX9gVByHlIxQeoOIPxQQcv_nhHILSwCSfZA7Z59feAxeAX6Xm6WhziW4gM03Xw8m8d6IiqOKk7gHG7gbxRM24zG8JUdswMoqSdDPFHQk_HRMuYUgK2LHmAzHNH0aUA07SCetMm9aUfKV8mmNBVja4_N-Z-yg0TnCIJ3Ft0QOCOvJlsmX_JHaLyyi_kOeSPHgu1Y12cWSNHPT1H-w-2qcL69QqBQFuwiIPin&u=http%3A%2F%2Fstruts.apache.org%2Fdocs%2Ftag-syntax.html
https://clicktime.symantec.com/a/1/QxgSgW_ss2BsUeDPAnq1-B62pVIOiyMAOMAQ3ZZSYTg=?d=07yfFFqYPM0WD4Foo01g3osCHMJYB3s-Bam1KYGt1G8OPUfmz2vfYiTUym7PiLP1YARrRlzJV8jUz4jcpOuNEe03YeaeS4yT-l4v5QM-UkCGtu2LFtjvb-xY4uGko_A-WyojufbTj9eapK7r2ZjwgdHnwOsBS2Vz8DQb6Q5_nMBWbB2qslNZbuqS9hJhOYjIYtTBkGycfJ2yufD86NwuhItmYDRE-qSfiYJNB87Wi4pBXd4W_xbvWFh6ita4wIXnIyNdiqh2KB4dLO_-_gmOFgzv8XsQrGX9gVByHlIxQeoOIPxQQcv_nhHILSwCSfZA7Z59feAxeAX6Xm6WhziW4gM03Xw8m8d6IiqOKk7gHG7gbxRM24zG8JUdswMoqSdDPFHQk_HRMuYUgK2LHmAzHNH0aUA07SCetMm9aUfKV8mmNBVja4_N-Z-yg0TnCIJ3Ft0QOCOvJlsmX_JHaLyyi_kOeSPHgu1Y12cWSNHPT1H-w-2qcL69QqBQFuwiIPin&u=http%3A%2F%2Fstruts.apache.org%2Fdocs%2Fiterator.html


Regards
--
Łukasz
+ 48 606 323 122 
+ https://clicktime.symantec.com/a/1/erAX0I2x4KuaHzO345eKT-7Ry3HQA6QTF6t
+ jw4PW2Og=?d=07yfFFqYPM0WD4Foo01g3osCHMJYB3s-Bam1KYGt1G8OPUfmz2vfYiTUym
+ 7PiLP1YARrRlzJV8jUz4jcpOuNEe03YeaeS4yT-l4v5QM-UkCGtu2LFtjvb-xY4uGko_A-
+ WyojufbTj9eapK7r2ZjwgdHnwOsBS2Vz8DQb6Q5_nMBWbB2qslNZbuqS9hJhOYjIYtTBkG
+ ycfJ2yufD86NwuhItmYDRE-qSfiYJNB87Wi4pBXd4W_xbvWFh6ita4wIXnIyNdiqh2KB4d
+ LO_-_gmOFgzv8XsQrGX9gVByHlIxQeoOIPxQQcv_nhHILSwCSfZA7Z59feAxeAX6Xm6Whz
+ iW4gM03Xw8m8d6IiqOKk7gHG7gbxRM24zG8JUdswMoqSdDPFHQk_HRMuYUgK2LHmAzHNH0
+ aUA07SCetMm9aUfKV8mmNBVja4_N-Z-yg0TnCIJ3Ft0QOCOvJlsmX_JHaLyyi_kOeSPHgu
+ 1Y12cWSNHPT1H-w-2qcL69QqBQFuwiIPin&u=http%3A%2F%2Fwww.lenart.org.pl%2F

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

The information contained in this e-mail, and any attachment, is confidential and is intended solely for the use of the intended recipient. Access, copying or re-use of the e-mail or any attachment, or any information contained therein, by any other person is not authorized. If you are not the intended recipient please return the e-mail to the sender and delete it from your computer. Although we attempt to sweep e-mail and attachments for viruses, we do not guarantee that either are virus-free and accept no liability for any damage sustained as a result of viruses. 

Please refer to http://disclaimer.bnymellon.com/eu.htm for certain disclosures relating to European legal entities.

Re: Question about upgrade to struts2 2.3.34 and session variables

Posted by Lukasz Lenart <lu...@apache.org>.
2017-09-26 18:11 GMT+02:00 Roslyakova, Svetlana
<sv...@bnymellon.com>:
> Here is the full example:
>
> <s:iterator var="UserRow" status="stat" value="session.userList">
>
> <s:set var="index" value="%{#stat.index}" />
>  <tr>
>
>    <td><div id="commitdiv<s:property value="#index"/>"><s:textfield type="text" id="userId" theme="simple"  name="session. userList [%{#stat.index}].UserId" value="%{top.UserId}" /></div></td>
> </tr>

<s:iterator var="userRow" status="stat" value="session.userList">
<s:set var="index" value="#stat.index" />
<tr>
    <td>
        <div id='commitdiv-<s:property value="#index"/>'>
            <s:textfield type="text" id="userId-%{#index}"
theme="simple" name="session.userList[#index].userId"
value="#userRow.userId" />
        </div>
    </td>
</tr>
</s:iterator>

This should work and I would suggest these readings:
http://struts.apache.org/docs/tag-syntax.html
http://struts.apache.org/docs/iterator.html


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

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


RE: Question about upgrade to struts2 2.3.34 and session variables

Posted by "Roslyakova, Svetlana" <sv...@bnymellon.com>.
Here is the full example:

<s:iterator var="UserRow" status="stat" value="session.userList">
 
<s:set var="index" value="%{#stat.index}" />
 <tr> 
      
   <td><div id="commitdiv<s:property value="#index"/>"><s:textfield type="text" id="userId" theme="simple"  name="session. userList [%{#stat.index}].UserId" value="%{top.UserId}" /></div></td>    
</tr>

The UserList is the business class and getters/setters for UserId in that class are as follows:

public String getUserId() {
		return UserId;
	}
	public void setUserId(String userId) {
		UserId = userId;
	}

It all worked before the upgrade.

Thanks,

Lana.



-----Original Message-----
From: Lukasz Lenart [mailto:lukaszlenart@apache.org] 
Sent: Tuesday, September 26, 2017 11:39 AM
To: Struts Users Mailing List <us...@struts.apache.org>
Subject: Re: Question about upgrade to struts2 2.3.34 and session variables

2017-09-26 17:27 GMT+02:00 Roslyakova, Svetlana
<sv...@bnymellon.com>:
> Hi Lukasz,
>
> I have another issue with struts2 2.3.34 upgrade.
> We are using session variables throughout the application:
>
> <s:textfield type="text" id="userId" theme="simple" name="session.user.UserId" value="%{top.UserId}" />

What getters/setters do you have for UserId? And why do you use %{top.UserId}?


Regards
-- 
Łukasz
+ 48 606 323 122 https://clicktime.symantec.com/a/1/xokPUUCIliZg8lXO_Xc1J6KtEGtwD4xYKMDg2npNLSE=?d=Gsx4vdFfFsR32vIH3Dfiq4JGi-kV_lXINQTFcq0zcd0j5AeIm5258gSuzDWVslJWluRvNYUCiTTgH7l4JvTf4DE8ldzIbkfoYDpUhAlsnk-EPLvSxn6gqOig8soxC90jS52zmRJIxSESnV9QqmlKJWkQNtSEeMiP_GWEj8_ABSjptjELoXxPUtUdLf4Xd_5rQGdw9YXeRYLiR-7hyiSxNEdDsSkhOF8K0yboT3aYOA-d86uvd4Rtv44Dl9XBtZJNWoB2PH62qhidjc_w4_Jy6P14Z0k5MAz6IVOyOzqi5YHxsP_1w-CXxMO2ScW8vOspVVH3wNTG9NvTW8L3AJsODbSHyc6sF1vGCXG0m6oIDFCfrBQ_wF4HT3PiWIGp1BEDeXTv3Zlzn-MsKRhDYLISGBFwgoZho-EB4WICzsMIhvfMUOwXonH8RA9Wc3TQWIaVEzPKCMWs5h4o85XjIr_ISymkxSIMJsldyteRUHnUJ5Xu7dt4cw6af0n_ZHYGF2A%3D&u=http%3A%2F%2Fwww.lenart.org.pl%2F

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

The information contained in this e-mail, and any attachment, is confidential and is intended solely for the use of the intended recipient. Access, copying or re-use of the e-mail or any attachment, or any information contained therein, by any other person is not authorized. If you are not the intended recipient please return the e-mail to the sender and delete it from your computer. Although we attempt to sweep e-mail and attachments for viruses, we do not guarantee that either are virus-free and accept no liability for any damage sustained as a result of viruses. 

Please refer to http://disclaimer.bnymellon.com/eu.htm for certain disclosures relating to European legal entities.

Re: Question about upgrade to struts2 2.3.34 and session variables

Posted by Lukasz Lenart <lu...@apache.org>.
2017-09-26 17:27 GMT+02:00 Roslyakova, Svetlana
<sv...@bnymellon.com>:
> Hi Lukasz,
>
> I have another issue with struts2 2.3.34 upgrade.
> We are using session variables throughout the application:
>
> <s:textfield type="text" id="userId" theme="simple" name="session.user.UserId" value="%{top.UserId}" />

What getters/setters do you have for UserId? And why do you use %{top.UserId}?


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

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