Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-02-13 Thread Mahabir Gupta
Dear Lukasz,

Noted with thanks.

Regards
Mahabir

On Fri, Feb 14, 2025 at 12:21 AM Lukasz Lenart 
wrote:

> I would suggest learning Maven and use it to build Struts app
> https://struts.apache.org/getting-started/hello-world-using-struts2
>
> śr., 12 lut 2025 o 07:46 Lukasz Lenart 
> napisał(a):
> >
> > I just noticed we are polluting this thread with unrelated discussion,
> > please start a new thread to discuss your problem.
> >
> > śr., 12 lut 2025 o 07:30 Mahabir Gupta 
> napisał(a):
> > >
> > > Dear Lukasz,
> > >
> > > Previously I did not include the xwork-core-2.3.37.jar but added it to
> > > follow the youtube video but now I have removed it but the problem
> still
> > > persists.
> > >
> > > http://localhost:8080/Struts2Starter/tutorials/getTutorial.action
> > >
> > > https://github.com/MahabirGupta/Struts2Starter
> > > HTTP Status 404 – Not Found
> > > --
> > >
> > > *Type* Status Report
> > >
> > > *Message* There is no Action mapped for action name getTutorial.
> > >
> > > *Description* The origin server did not find a current representation
> for
> > > the target resource or is not willing to disclose that one exists.
> > > --
> > > Apache Tomcat/9.0.82
> > > Kindly advise. Thank you.
> > >
> > > Regards
> > > Mahabir
> > >
> > > On Wed, Feb 12, 2025 at 2:16 PM Lukasz Lenart  >
> > > wrote:
> > >
> > > > śr., 12 lut 2025 o 05:17 Mahabir Gupta 
> napisał(a):
> > > > >
> > > > > Dear Lukasz and Dave,
> > > > >
> > > > > The only deploy  I am seeing is the below and this is my github
> link
> > > > > https://github.com/MahabirGupta/Struts2Starter.
> > > >
> > > > I noticed you have xwork-core-2.3.37.jar in your libs, please remove
> > > > this JAR as Xwork classes are already included in
> > > > struts2-core-2.5.8.jar
> > > >
> > > >
> > > > Regards
> > > > Łukasz
> > > >
> > > > -
> > > > To unsubscribe, e-mail: [email protected]
> > > > For additional commands, e-mail: [email protected]
> > > >
> > > >
>
> -
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-02-13 Thread Lukasz Lenart
I would suggest learning Maven and use it to build Struts app
https://struts.apache.org/getting-started/hello-world-using-struts2

śr., 12 lut 2025 o 07:46 Lukasz Lenart  napisał(a):
>
> I just noticed we are polluting this thread with unrelated discussion,
> please start a new thread to discuss your problem.
>
> śr., 12 lut 2025 o 07:30 Mahabir Gupta  napisał(a):
> >
> > Dear Lukasz,
> >
> > Previously I did not include the xwork-core-2.3.37.jar but added it to
> > follow the youtube video but now I have removed it but the problem still
> > persists.
> >
> > http://localhost:8080/Struts2Starter/tutorials/getTutorial.action
> >
> > https://github.com/MahabirGupta/Struts2Starter
> > HTTP Status 404 – Not Found
> > --
> >
> > *Type* Status Report
> >
> > *Message* There is no Action mapped for action name getTutorial.
> >
> > *Description* The origin server did not find a current representation for
> > the target resource or is not willing to disclose that one exists.
> > --
> > Apache Tomcat/9.0.82
> > Kindly advise. Thank you.
> >
> > Regards
> > Mahabir
> >
> > On Wed, Feb 12, 2025 at 2:16 PM Lukasz Lenart 
> > wrote:
> >
> > > śr., 12 lut 2025 o 05:17 Mahabir Gupta  napisał(a):
> > > >
> > > > Dear Lukasz and Dave,
> > > >
> > > > The only deploy  I am seeing is the below and this is my github link
> > > > https://github.com/MahabirGupta/Struts2Starter.
> > >
> > > I noticed you have xwork-core-2.3.37.jar in your libs, please remove
> > > this JAR as Xwork classes are already included in
> > > struts2-core-2.5.8.jar
> > >
> > >
> > > Regards
> > > Łukasz
> > >
> > > -
> > > To unsubscribe, e-mail: [email protected]
> > > For additional commands, e-mail: [email protected]
> > >
> > >

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-02-11 Thread Lukasz Lenart
I just noticed we are polluting this thread with unrelated discussion,
please start a new thread to discuss your problem.

śr., 12 lut 2025 o 07:30 Mahabir Gupta  napisał(a):
>
> Dear Lukasz,
>
> Previously I did not include the xwork-core-2.3.37.jar but added it to
> follow the youtube video but now I have removed it but the problem still
> persists.
>
> http://localhost:8080/Struts2Starter/tutorials/getTutorial.action
>
> https://github.com/MahabirGupta/Struts2Starter
> HTTP Status 404 – Not Found
> --
>
> *Type* Status Report
>
> *Message* There is no Action mapped for action name getTutorial.
>
> *Description* The origin server did not find a current representation for
> the target resource or is not willing to disclose that one exists.
> --
> Apache Tomcat/9.0.82
> Kindly advise. Thank you.
>
> Regards
> Mahabir
>
> On Wed, Feb 12, 2025 at 2:16 PM Lukasz Lenart 
> wrote:
>
> > śr., 12 lut 2025 o 05:17 Mahabir Gupta  napisał(a):
> > >
> > > Dear Lukasz and Dave,
> > >
> > > The only deploy  I am seeing is the below and this is my github link
> > > https://github.com/MahabirGupta/Struts2Starter.
> >
> > I noticed you have xwork-core-2.3.37.jar in your libs, please remove
> > this JAR as Xwork classes are already included in
> > struts2-core-2.5.8.jar
> >
> >
> > Regards
> > Łukasz
> >
> > -
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-02-11 Thread Mahabir Gupta
Dear Lukasz,

Previously I did not include the xwork-core-2.3.37.jar but added it to
follow the youtube video but now I have removed it but the problem still
persists.

http://localhost:8080/Struts2Starter/tutorials/getTutorial.action

https://github.com/MahabirGupta/Struts2Starter
HTTP Status 404 – Not Found
--

*Type* Status Report

*Message* There is no Action mapped for action name getTutorial.

*Description* The origin server did not find a current representation for
the target resource or is not willing to disclose that one exists.
--
Apache Tomcat/9.0.82
Kindly advise. Thank you.

Regards
Mahabir

On Wed, Feb 12, 2025 at 2:16 PM Lukasz Lenart 
wrote:

> śr., 12 lut 2025 o 05:17 Mahabir Gupta  napisał(a):
> >
> > Dear Lukasz and Dave,
> >
> > The only deploy  I am seeing is the below and this is my github link
> > https://github.com/MahabirGupta/Struts2Starter.
>
> I noticed you have xwork-core-2.3.37.jar in your libs, please remove
> this JAR as Xwork classes are already included in
> struts2-core-2.5.8.jar
>
>
> Regards
> Łukasz
>
> -
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-02-11 Thread Lukasz Lenart
śr., 12 lut 2025 o 05:17 Mahabir Gupta  napisał(a):
>
> Dear Lukasz and Dave,
>
> The only deploy  I am seeing is the below and this is my github link
> https://github.com/MahabirGupta/Struts2Starter.

I noticed you have xwork-core-2.3.37.jar in your libs, please remove
this JAR as Xwork classes are already included in
struts2-core-2.5.8.jar


Regards
Łukasz

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-02-11 Thread Mahabir Gupta
Dear Lukasz and Dave,

The only deploy  I am seeing is the below and this is my github link
https://github.com/MahabirGupta/Struts2Starter.

Feb 12, 2025 11:46:52 AM org.apache.catalina.startup.VersionLoggerListener
log

INFO: Command line argument:
-Dwtp.deploy=/Users/mahabirguptanew/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps

Thank you.

Regards
Mahabir

On Tue, Feb 11, 2025 at 11:36 PM Lukasz Lenart 
wrote:

> pon., 10 lut 2025 o 04:06 Mahabir Gupta  napisał(a):
> >
> > Dear Lukasz,
> >
> > I am using Struts2 using struts2-core-2.5.8.jar with Java 17.
> >
> > http://localhost:8080/manager/html
> > HTTP Status 404 – Not Found
> > --
> >
> > *Type* Status Report
> >
> > *Message* The requested resource [/manager/html] is not available
> >
> > *Description* The origin server did not find a current representation for
> > the target resource or is not willing to disclose that one exists.
> > --
> > Apache Tomcat/9.0.82
>
> Could you confirm, based on Tomcat logs, that your app has been
> deployed? There should be something like "deploying  name>" in the logs
>
> Cheers
> Lukasz
>
> -
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-02-11 Thread Lukasz Lenart
pon., 10 lut 2025 o 04:06 Mahabir Gupta  napisał(a):
>
> Dear Lukasz,
>
> I am using Struts2 using struts2-core-2.5.8.jar with Java 17.
>
> http://localhost:8080/manager/html
> HTTP Status 404 – Not Found
> --
>
> *Type* Status Report
>
> *Message* The requested resource [/manager/html] is not available
>
> *Description* The origin server did not find a current representation for
> the target resource or is not willing to disclose that one exists.
> --
> Apache Tomcat/9.0.82

Could you confirm, based on Tomcat logs, that your app has been
deployed? There should be something like "deploying " in the logs

Cheers
Lukasz

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-02-11 Thread Dave Newton
The 2.5.8 from eight years ago that was deprecated in 2023?  Do you have a
minimal non-working app repo to look at?

em: [email protected]
mo: 908-380-8699
gh: davelnewton 
so: Dave Newton 



On Tue, Feb 11, 2025 at 22:52 Mahabir Gupta  wrote:

> Dear Lukasz,
>
> Can you please advise on the above? None of my application seems to be able
> to be mapped.
>
> http://localhost:8080/TutorialFinder/tutorials/getTutorial.action
>
> HTTP Status 404 – Not Found
> --
>
> *Type* Status Report
>
> *Message* There is no Action mapped for action name getTutorial.
>
> *Description* The origin server did not find a current representation for
> the target resource or is not willing to disclose that one exists.
> --
> Apache Tomcat/9.0.82
>
> On Mon, Feb 10, 2025 at 11:06 AM Mahabir Gupta 
> wrote:
>
> > Dear Lukasz,
> >
> > I am using Struts2 using struts2-core-2.5.8.jar with Java 17.
> >
> > http://localhost:8080/manager/html
> > HTTP Status 404 – Not Found
> > --
> >
> > *Type* Status Report
> >
> > *Message* The requested resource [/manager/html] is not available
> >
> > *Description* The origin server did not find a current representation for
> > the target resource or is not willing to disclose that one exists.
> > --
> > Apache Tomcat/9.0.82
> > Thank you.
> >
> > Regards
> > Mahabir
> >
> > On Sun, Feb 9, 2025 at 8:32 PM Lukasz Lenart 
> > wrote:
> >
> >> niedz., 9 lut 2025 o 12:23 Mahabir Gupta 
> >> napisał(a):
> >> > Apache Tomcat/9.0.82
> >>
> >> Do you use Struts 6.7.x or 7.0? Can you confirm the app has been
> >> deployed into Tomcat using Tomcat Manager App?
> >>
> >> Cheers
> >> Lukasz
> >>
> >> -
> >> To unsubscribe, e-mail: [email protected]
> >> For additional commands, e-mail: [email protected]
> >>
> >>
>


Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-02-11 Thread Mahabir Gupta
Dear Lukasz,

Can you please advise on the above? None of my application seems to be able
to be mapped.

http://localhost:8080/TutorialFinder/tutorials/getTutorial.action

HTTP Status 404 – Not Found
--

*Type* Status Report

*Message* There is no Action mapped for action name getTutorial.

*Description* The origin server did not find a current representation for
the target resource or is not willing to disclose that one exists.
--
Apache Tomcat/9.0.82

On Mon, Feb 10, 2025 at 11:06 AM Mahabir Gupta  wrote:

> Dear Lukasz,
>
> I am using Struts2 using struts2-core-2.5.8.jar with Java 17.
>
> http://localhost:8080/manager/html
> HTTP Status 404 – Not Found
> --
>
> *Type* Status Report
>
> *Message* The requested resource [/manager/html] is not available
>
> *Description* The origin server did not find a current representation for
> the target resource or is not willing to disclose that one exists.
> --
> Apache Tomcat/9.0.82
> Thank you.
>
> Regards
> Mahabir
>
> On Sun, Feb 9, 2025 at 8:32 PM Lukasz Lenart 
> wrote:
>
>> niedz., 9 lut 2025 o 12:23 Mahabir Gupta 
>> napisał(a):
>> > Apache Tomcat/9.0.82
>>
>> Do you use Struts 6.7.x or 7.0? Can you confirm the app has been
>> deployed into Tomcat using Tomcat Manager App?
>>
>> Cheers
>> Lukasz
>>
>> -
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>


Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-02-09 Thread Mahabir Gupta
Dear Lukasz,

I am using Struts2 using struts2-core-2.5.8.jar with Java 17.

http://localhost:8080/manager/html
HTTP Status 404 – Not Found
--

*Type* Status Report

*Message* The requested resource [/manager/html] is not available

*Description* The origin server did not find a current representation for
the target resource or is not willing to disclose that one exists.
--
Apache Tomcat/9.0.82
Thank you.

Regards
Mahabir

On Sun, Feb 9, 2025 at 8:32 PM Lukasz Lenart 
wrote:

> niedz., 9 lut 2025 o 12:23 Mahabir Gupta 
> napisał(a):
> > Apache Tomcat/9.0.82
>
> Do you use Struts 6.7.x or 7.0? Can you confirm the app has been
> deployed into Tomcat using Tomcat Manager App?
>
> Cheers
> Lukasz
>
> -
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-02-09 Thread Lukasz Lenart
niedz., 9 lut 2025 o 12:23 Mahabir Gupta  napisał(a):
> Apache Tomcat/9.0.82

Do you use Struts 6.7.x or 7.0? Can you confirm the app has been
deployed into Tomcat using Tomcat Manager App?

Cheers
Lukasz

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



RE: [EXTERNAL] Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-02-04 Thread ndeleon
Hi Murali,

You need WAS9, Websphere App Server 9 for Struts6+.

We have Struts6+ running on WAS9, Websphere App Server 9

Struts6 requires Servlet API 3.1.
Servlet API 3.1 is supported by WAS9, Websphere App Server 9.

WAS8 does not support Servlet API 3.1, WAS8+ only supports Servlet API 3.0

Regards,
Noel Deleon


-Original Message-
From: Murali Challa  
Sent: Tuesday, February 4, 2025 3:11 AM
To: Struts Users Mailing List ; [email protected]
Subject: [EXTERNAL] Re: Facings issues while migrating from Struts 2.5.x to 6.7

CAUTION! This email originated outside of the organization. Please do not open 
attachments or click links from an unknown or suspicious origin.

==
Hi Lukasz ,

I have created a struts project with with JSP EL using struts v6.7.0 
dependencies and the EL is working fine in this test project.

This test project is deployed in tomcat and tested.

Now I'm really confused on why it is not working in our actual application.

Our application runs in Websphere 8.5.x.

Not sure if our application server supports servlet-api-3.1.jar Or if any 
conflicts are there with our application libraries.

Can you guide us on how this can be identified and resolved ?


On Wed, 29 Jan, 2025, 14:14 Lukasz Lenart,  wrote:

> śr., 29 sty 2025 o 09:39 Murali Challa 
> napisał(a):
> > And do we need to have below constant and any other constant to be 
> > added
> in our struts.xml file?
> >
> > 
>
> No, you don't need that, I messed up with Struts 7
>
>
> Cheers
> Łukasz
>
> -
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-02-04 Thread 哈哈哈哈
There are multi issue you need to solve in WAS 8.5
1.downgrade freemarker to 2.3.32
2.remove old tiles dependecies like tiles-core ,tiles-ognl...
3.add any missing dependency if the error happened(Jackson xml in my
situation)
3.clean jsp cache if the error is CannotRenderException

Best regards

Murali Challa  於 2025年2月4日 週二 下午4:12 寫道:

> Hi Lukasz ,
>
> I have created a struts project with with JSP EL using struts v6.7.0
> dependencies and the EL is working fine in this test project.
>
> This test project is deployed in tomcat and tested.
>
> Now I'm really confused on why it is not working in our actual application.
>
> Our application runs in Websphere 8.5.x.
>
> Not sure if our application server supports servlet-api-3.1.jar
> Or if any conflicts are there with our application libraries.
>
> Can you guide us on how this can be identified and resolved ?
>
>
> On Wed, 29 Jan, 2025, 14:14 Lukasz Lenart, 
> wrote:
>
> > śr., 29 sty 2025 o 09:39 Murali Challa 
> > napisał(a):
> > > And do we need to have below constant and any other constant to be
> added
> > in our struts.xml file?
> > >
> > > 
> >
> > No, you don't need that, I messed up with Struts 7
> >
> >
> > Cheers
> > Łukasz
> >
> > -
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >
>


Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-02-04 Thread Murali Challa
Hi Lukasz ,

I have created a struts project with with JSP EL using struts v6.7.0
dependencies and the EL is working fine in this test project.

This test project is deployed in tomcat and tested.

Now I'm really confused on why it is not working in our actual application.

Our application runs in Websphere 8.5.x.

Not sure if our application server supports servlet-api-3.1.jar
Or if any conflicts are there with our application libraries.

Can you guide us on how this can be identified and resolved ?


On Wed, 29 Jan, 2025, 14:14 Lukasz Lenart,  wrote:

> śr., 29 sty 2025 o 09:39 Murali Challa 
> napisał(a):
> > And do we need to have below constant and any other constant to be added
> in our struts.xml file?
> >
> > 
>
> No, you don't need that, I messed up with Struts 7
>
>
> Cheers
> Łukasz
>
> -
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-01-29 Thread Lukasz Lenart
śr., 29 sty 2025 o 09:39 Murali Challa  napisał(a):
> And do we need to have below constant and any other constant to be added in 
> our struts.xml file?
>
> 

No, you don't need that, I messed up with Struts 7


Cheers
Łukasz

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-01-29 Thread Murali Challa
OK,  let me check on logs for some clue.

And do we need to have below constant and any other constant to be added in
our struts.xml file?



On Wed, 29 Jan, 2025, 13:59 Lukasz Lenart,  wrote:

> śr., 29 sty 2025 o 08:46 Murali Challa 
> napisał(a):
>
> > Yes, this is what we are using in our application code. Same code we have
> > mentioned at beginning of this mailing.
> >
> > Just to keep it clear, our code looks as below.
> >
> > Action Class (extends ActionSupport):
> >
> > HttpSession session =
> ServletActionContext.getRequest().getSession(false);
> >
> > session.setAttribute("menuList", objList);
> >
> > Jsp:
> >
> > 
> > ${menu.funcName}
> > 
>
> And this doesn't work, yes?
>
> I was playing with showcase-app (on 6.7.x branch) and modified it like
> this:
>
> 
> 
> "> value="empId"/>
> ${s.index} ${item.empId}
> 
> 
> 
> 
>
> And action code:
> ServletActionContext.getRequest().getSession(true).setAttribute("items",
> availableItems);
>
> I had to use "true" as the session didn't exist. All works without an
> issue.
>
> Maybe try to increase the log level and observe what the framework reports?
>
>
> Cheers
> Łukasz
>
> -
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-01-29 Thread Lukasz Lenart
śr., 29 sty 2025 o 08:46 Murali Challa  napisał(a):

> Yes, this is what we are using in our application code. Same code we have
> mentioned at beginning of this mailing.
>
> Just to keep it clear, our code looks as below.
>
> Action Class (extends ActionSupport):
>
> HttpSession session = ServletActionContext.getRequest().getSession(false);
>
> session.setAttribute("menuList", objList);
>
> Jsp:
>
> 
> ${menu.funcName}
> 

And this doesn't work, yes?

I was playing with showcase-app (on 6.7.x branch) and modified it like this:



">
${s.index} ${item.empId}





And action code:
ServletActionContext.getRequest().getSession(true).setAttribute("items",
availableItems);

I had to use "true" as the session didn't exist. All works without an issue.

Maybe try to increase the log level and observe what the framework reports?


Cheers
Łukasz

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-01-28 Thread Murali Challa
Hi Lukasz,

Yes, this is what we are using in our application code. Same code we have
mentioned at beginning of this mailing.

Just to keep it clear, our code looks as below.

Action Class (extends ActionSupport):

HttpSession session = ServletActionContext.getRequest().getSession(false);

session.setAttribute("menuList", objList);

Jsp:


${menu.funcName}



Thanks,
Murali

On Wed, 29 Jan, 2025, 12:52 Lukasz Lenart,  wrote:

> Could you try to use:
>
> 
>
> ?
>
> śr., 29 sty 2025 o 07:57 Murali Challa 
> napisał(a):
> >
> > Session is referenced using
> > ServletActionContext.getRequest().getSession(false) in action classes.
> >
> > Our's is legacy application where all our action classes extend
> > xwork2.ActionSupport class and no annotations are used in it.
> >
> > Thanks,
> > Murali
> >
> >
> >
> >
> >
> > On Wed, 29 Jan, 2025, 12:00 Lukasz Lenart, 
> wrote:
> >
> > > wt., 28 sty 2025 o 07:31 Murali Challa 
> > > napisał(a):
> > > >
> > > > We get the availableItems from session.
> > > >
> > > > That is the only difference in can see from your example.
> > > >
> > > > Can you try something link below and see if it works?
> > > >
> > > > 
> > > > ${item.empid}
> > > > ${s.index}  // index as well coming as empty
> > > > 
> > >
> > > It works, btw. I had to configure allowlist list like this (or you can
> > > disable this functionality)
> > >
> > > 
> > > 
> > > 
> > > 
> > >
> > > >
> > > > We set availableItems to session in our struts action layer as below.
> > > >
> > > > session.setAttribute("availableItems", availableItems);
> > >
> > > How do you obtain reference to "session"? Do you use SessionAware
> > > interface?
> > >
> > >
> > > Regards
> > > Łukasz
> > >
> > > -
> > > To unsubscribe, e-mail: [email protected]
> > > For additional commands, e-mail: [email protected]
> > >
> > >
>
> -
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-01-28 Thread Lukasz Lenart
Could you try to use:



?

śr., 29 sty 2025 o 07:57 Murali Challa  napisał(a):
>
> Session is referenced using
> ServletActionContext.getRequest().getSession(false) in action classes.
>
> Our's is legacy application where all our action classes extend
> xwork2.ActionSupport class and no annotations are used in it.
>
> Thanks,
> Murali
>
>
>
>
>
> On Wed, 29 Jan, 2025, 12:00 Lukasz Lenart,  wrote:
>
> > wt., 28 sty 2025 o 07:31 Murali Challa 
> > napisał(a):
> > >
> > > We get the availableItems from session.
> > >
> > > That is the only difference in can see from your example.
> > >
> > > Can you try something link below and see if it works?
> > >
> > > 
> > > ${item.empid}
> > > ${s.index}  // index as well coming as empty
> > > 
> >
> > It works, btw. I had to configure allowlist list like this (or you can
> > disable this functionality)
> >
> > 
> > 
> > 
> > 
> >
> > >
> > > We set availableItems to session in our struts action layer as below.
> > >
> > > session.setAttribute("availableItems", availableItems);
> >
> > How do you obtain reference to "session"? Do you use SessionAware
> > interface?
> >
> >
> > Regards
> > Łukasz
> >
> > -
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-01-28 Thread Murali Challa
Session is referenced using
ServletActionContext.getRequest().getSession(false) in action classes.

Our's is legacy application where all our action classes extend
xwork2.ActionSupport class and no annotations are used in it.

Thanks,
Murali





On Wed, 29 Jan, 2025, 12:00 Lukasz Lenart,  wrote:

> wt., 28 sty 2025 o 07:31 Murali Challa 
> napisał(a):
> >
> > We get the availableItems from session.
> >
> > That is the only difference in can see from your example.
> >
> > Can you try something link below and see if it works?
> >
> > 
> > ${item.empid}
> > ${s.index}  // index as well coming as empty
> > 
>
> It works, btw. I had to configure allowlist list like this (or you can
> disable this functionality)
>
> 
> 
> 
> 
>
> >
> > We set availableItems to session in our struts action layer as below.
> >
> > session.setAttribute("availableItems", availableItems);
>
> How do you obtain reference to "session"? Do you use SessionAware
> interface?
>
>
> Regards
> Łukasz
>
> -
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-01-28 Thread Lukasz Lenart
wt., 28 sty 2025 o 07:31 Murali Challa  napisał(a):
>
> We get the availableItems from session.
>
> That is the only difference in can see from your example.
>
> Can you try something link below and see if it works?
>
> 
> ${item.empid}
> ${s.index}  // index as well coming as empty
> 

It works, btw. I had to configure allowlist list like this (or you can
disable this functionality)






>
> We set availableItems to session in our struts action layer as below.
>
> session.setAttribute("availableItems", availableItems);

How do you obtain reference to "session"? Do you use SessionAware interface?


Regards
Łukasz

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-01-27 Thread Murali Challa
We get the availableItems from session.

That is the only difference in can see from your example.

Can you try something link below and see if it works?


${item.empid}
${s.index}  // index as well coming as empty


We set availableItems to session in our struts action layer as below.

session.setAttribute("availableItems", availableItems);


On Tue, 28 Jan, 2025, 11:31 Lukasz Lenart,  wrote:

> pon., 27 sty 2025 o 08:41 Murali Challa 
> napisał(a):
> >
> > Hi Lukasz,
> >
> > Yes, the values in session exist.
> >
> > We are able to iterate through session.list and while trying to print
> values of session.list using EL, empty values are getting printed.
> >
> > EL is inside  tag and we can see table with empty rows (here rows
> count is equal to session.list size) is getting displayed in UI.
>
> I assume your code is similar to this example:
>
> https://github.com/apache/struts/blob/main/apps/showcase/src/main/webapp/WEB-INF/empmanager/listEmployees.jsp#L49-L55
>
> And I modified it like this (additional column with "empId"):
> 
> 
> Id
> Id
> First Name
> Last Name
> 
> 
> 
> "> value="empId"/>
> ${empId}
> 
> 
> 
> 
> 
>
> and all works just fine.
>
>
> Cheers
> Łukasz
>
> -
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-01-27 Thread Lukasz Lenart
pon., 27 sty 2025 o 08:41 Murali Challa  napisał(a):
>
> Hi Lukasz,
>
> Yes, the values in session exist.
>
> We are able to iterate through session.list and while trying to print values 
> of session.list using EL, empty values are getting printed.
>
> EL is inside  tag and we can see table with empty rows (here rows count 
> is equal to session.list size) is getting displayed in UI.

I assume your code is similar to this example:
https://github.com/apache/struts/blob/main/apps/showcase/src/main/webapp/WEB-INF/empmanager/listEmployees.jsp#L49-L55

And I modified it like this (additional column with "empId"):


Id
Id
First Name
Last Name



">
${empId}






and all works just fine.


Cheers
Łukasz

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-01-26 Thread Murali Challa
Hi Lukasz,

Yes, the values in session exist.

We are able to iterate through session.list and while trying to print
values of session.list using EL, empty values are getting printed.

EL is inside  tag and we can see table with empty rows (here rows count
is equal to session.list size) is getting displayed in UI.

On Mon, 27 Jan, 2025, 12:31 Lukasz Lenart,  wrote:

> śr., 22 sty 2025 o 11:25 Murali Challa 
> napisał(a):
> > Not sure why it is printing empty values while iterating through session
> > list.
>
> Could you confirm the value in session exists? Something like this:
> 
>
>
> https://struts.apache.org/getting-started/http-session#accessing-http-session-objects-in-the-view
>
> https://struts.apache.org/core-developers/accessing-application-session-request-objects#accessing-from-the-view-jsp-freemarker-etc
>
>
> Cheers
> Łukasz
>
> -
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-01-26 Thread Lukasz Lenart
śr., 22 sty 2025 o 11:25 Murali Challa  napisał(a):
> Not sure why it is printing empty values while iterating through session
> list.

Could you confirm the value in session exists? Something like this:


https://struts.apache.org/getting-started/http-session#accessing-http-session-objects-in-the-view
https://struts.apache.org/core-developers/accessing-application-session-request-objects#accessing-from-the-view-jsp-freemarker-etc


Cheers
Łukasz

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-01-26 Thread Lukasz Lenart
Hi Heikki,

First of all, could you start a new thread as this one is about
migrating from Struts 2.5.x to 6.x and your problem is related to
migrating to Struts 7.x?
Also could you share a full example of your Java & JSP code? Looks
like the  and  are connected based on the used
${subject} variable, but I'm just guessing.

niedz., 26 sty 2025 o 14:55 Heikki Hyyrö  napisał(a):
>
> Hi,
>
> I would of course *love* to provide a small example, but it seems a bit
> difficult (would probably require quite considerable effort for just
> that purpose). The application in question contains e.g. 100+ JSP files
> and the pages are composed in a component-wise/hierarchical manner with
> the tiles framework, etc.
>
> If it helps anyone understand what the problems could be related to, I
> have noticed a couple more things.
>
> If I create the iterator variable separately by changing
>
> 
>  ${subject.name}
> 
>
> into
>
> 
>  
>  ${subject.name}
> 
>
> the names appear also in 7.0.0. The same problem (and the "fix"
> described above) seem to apply to more or less all of the quite numerous
> loops used in the application's JSP files.
>
> Another thing is that I had problems with url parameters in 7.0.0. The
> application follows the Struts "a"-tag documentation and creates links
> in the following manner:
>
> 
>  
> 
> 
>  ${subject.name}
> 
>
> Such links stopped working in 7.0.0: the href is seemingly ignored and
> the url becomes just the encompassing action url. But prepending the url
> variable reference with #, ie. href="%{#viewUrl}, results in correct
> href:s also in 7.0.0.
>
> Best Regards
> Heikki
>
>
> -
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-01-26 Thread Dave Newton
On Sun, Jan 26, 2025 at 22:53 Heikki Hyyrö  wrote:

> I would of course *love* to provide a small example, but it seems a bit
> difficult (would probably require quite considerable effort for just
> that purpose). The application in question contains e.g. 100+ JSP files
> and the pages are composed in a component-wise/hierarchical manner with
> the tiles framework, etc.


Of the issue only happens in situ it’s the app or its environment.

It looks like a resolver issue; a minimal reproducible example would need
an action and the view layers (JSP(s), Tile(s), whatever) that shows the
issue.

If it’s difficult for you to reproduce in the small imagine how difficult
it’ll be to duplicate it from a blank slate.

d

>
>


Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-01-26 Thread Heikki Hyyrö

Hi,

I would of course *love* to provide a small example, but it seems a bit 
difficult (would probably require quite considerable effort for just 
that purpose). The application in question contains e.g. 100+ JSP files 
and the pages are composed in a component-wise/hierarchical manner with 
the tiles framework, etc.


If it helps anyone understand what the problems could be related to, I 
have noticed a couple more things.


If I create the iterator variable separately by changing


    ${subject.name}


into


    
    ${subject.name}


the names appear also in 7.0.0. The same problem (and the "fix" 
described above) seem to apply to more or less all of the quite numerous 
loops used in the application's JSP files.


Another thing is that I had problems with url parameters in 7.0.0. The 
application follows the Struts "a"-tag documentation and creates links 
in the following manner:



    


    ${subject.name}


Such links stopped working in 7.0.0: the href is seemingly ignored and 
the url becomes just the encompassing action url. But prepending the url 
variable reference with #, ie. href="%{#viewUrl}, results in correct 
href:s also in 7.0.0.


Best Regards
Heikki


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-01-26 Thread M Huzaifah
Hii Heikki Hyyro,

Could you please provide us small project that contain your problem,
so all of us in here can help you up.

Thank you

On Sun, Jan 26, 2025 at 5:26 PM Heikki Hyyrö  wrote:
>
> Thanks Lukasz,
>
> and sorry about the confusion! Yes, I did browse through some of the
> release notes after your and Wolfgang's comments regarding xwork2
> packages. At that point I then added  name="struts.allowlist.enable" value="false"/> in struts.xml. But it
> seems I at the same time also accidentally added another setting
>  value="false"/>, which was of course the root cause for many problems!
> After removing that, the main (or at least one of them) problem seems to
> concern JSP expressions. Now this works
>
> 
>  
> 
>
> but the same with JSP expression does not show names in 7.0.0 (in
> 6.3.0.2 this works ok):
>
> 
>  ${subject.name}
> 
>
> What setting am I missing to get the latter to work? The code base
> relies very heavily on this type of JSP expressions so stopping using
> them is not a realistic option.
>
> Best regards
> Heikki
>
> Lukasz Lenart kirjoitti 26.1.2025 klo 8.32:
> > Did you read through the Migration guide? It looks like one of the
> > security factors blocks executions of your expression
> > https://cwiki.apache.org/confluence/display/WW/Struts+6.x.x+to+7.x.x+migration#Struts6.x.xto7.x.xmigration-Strongersecurity
> >
> > Take a look on the allowlist capability
> > https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=293046977#Struts6.x.xto7.x.xmigration-OGNLallowlistcapability
> >
> >
> > Cheers
> > Łukasz
> >
> > -
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
>
> -
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-01-26 Thread Heikki Hyyrö

Thanks Lukasz,

and sorry about the confusion! Yes, I did browse through some of the 
release notes after your and Wolfgang's comments regarding xwork2 
packages. At that point I then added name="struts.allowlist.enable" value="false"/> in struts.xml. But it 
seems I at the same time also accidentally added another setting 
value="false"/>, which was of course the root cause for many problems! 
After removing that, the main (or at least one of them) problem seems to 
concern JSP expressions. Now this works



    


but the same with JSP expression does not show names in 7.0.0 (in 
6.3.0.2 this works ok):



    ${subject.name}


What setting am I missing to get the latter to work? The code base 
relies very heavily on this type of JSP expressions so stopping using 
them is not a realistic option.


Best regards
Heikki

Lukasz Lenart kirjoitti 26.1.2025 klo 8.32:

Did you read through the Migration guide? It looks like one of the
security factors blocks executions of your expression
https://cwiki.apache.org/confluence/display/WW/Struts+6.x.x+to+7.x.x+migration#Struts6.x.xto7.x.xmigration-Strongersecurity

Take a look on the allowlist capability
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=293046977#Struts6.x.xto7.x.xmigration-OGNLallowlistcapability


Cheers
Łukasz

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-01-26 Thread Lukasz Lenart
These kinds of issues are very hard to debug or investigate, so it
would be good to prepare a small demo app reproducing the issue. You
can use one of the struts-examples app as a starting point
https://github.com/apache/struts-examples/


Thanks in advance
Łukasz

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-01-25 Thread Lukasz Lenart
czw., 23 sty 2025 o 22:37 Heikki Hyyrö  napisał(a):
>
> Dear all,
>
> I am having somewhat similar problems after upgrading from 6.3.0.2 to
> 7.0.0. It has become very difficult to refer to variables inside JSP code!
>
> The first symptom I inspected was quite identical to Murali's problem:
> referring to an attribute via the iterator variable name does not seem
> to work, but referring to the attribute only does work. E.g. a loop of form
>
> 
>
><%-- a whole lot of other stuff  --%>
> 
>
> does not show the values subject.name in 7.0.0 whereas in 6.3.0.2 it
> does. The names show up if I refer to the name without the object
> reference in the form .
>
> While investigating this I noted that even the set-tag example snippet
> from Struts documentation no longer works? If I embed the following lines
>
> X
> Jane Doe
> 
> Y
>
> inside a JSP page, the result is only "X Y" in 7.0.0 but the whole
> expected "X Jane Doe Y" in 6.3.0.2. Here I added the X and Y just to
> verify that that part of the page is processed in the first place.

Did you read through the Migration guide? It looks like one of the
security factors blocks executions of your expression
https://cwiki.apache.org/confluence/display/WW/Struts+6.x.x+to+7.x.x+migration#Struts6.x.xto7.x.xmigration-Strongersecurity

Take a look on the allowlist capability
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=293046977#Struts6.x.xto7.x.xmigration-OGNLallowlistcapability


Cheers
Łukasz

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-01-23 Thread Heikki Hyyrö

Dear all,

I am having somewhat similar problems after upgrading from 6.3.0.2 to 
7.0.0. It has become very difficult to refer to variables inside JSP code!


The first symptom I inspected was quite identical to Murali's problem: 
referring to an attribute via the iterator variable name does not seem 
to work, but referring to the attribute only does work. E.g. a loop of form



  
  <%-- a whole lot of other stuff  --%>


does not show the values subject.name in 7.0.0 whereas in 6.3.0.2 it 
does. The names show up if I refer to the name without the object 
reference in the form .


While investigating this I noted that even the set-tag example snippet 
from Struts documentation no longer works? If I embed the following lines


X
Jane Doe

Y

inside a JSP page, the result is only "X Y" in 7.0.0 but the whole 
expected "X Jane Doe Y" in 6.3.0.2. Here I added the X and Y just to 
verify that that part of the page is processed in the first place.


-Heikki

Murali Challa kirjoitti 22.1.2025 klo 10.54:

${} is printing null values. Seems the EL is not working post 6.x 
migration.


Can you help me to understand if I'm missing something in this migration.

Below is the code snippet for your reference.


   // working

   ${menu.id} // Not working


Thanks,
Murali




-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



RE: Facings issues while migrating from Struts 2.5.x to 6.7

2025-01-22 Thread Nate Kerkhofs
Hi Murali,

I'm not a Struts developer, but it might help if you create a small project 
with as few dependencies as possible that shows the bug that you're 
experiencing and share it through GitHub or another publicly accessible 
platform. The problem could lie with a non-Struts dependency and a MVP project 
like that will definitely help the Struts team investigate this.

Cheers,

Nate

-Original Message-
From: Murali Challa  
Sent: Wednesday, 22 January 2025 12:45
To: Struts Users Mailing List ; [email protected]
Subject: Re: Facings issues while migrating from Struts 2.5.x to 6.7

No luck. It is not working.

Was there some issue with EL for using inside struts tags?

On Wed, 22 Jan, 2025, 16:56 Lukasz Lenart,  wrote:

> śr., 22 sty 2025 o 11:25 Murali Challa 
> napisał(a):
> > Pure EL is working fine.
> >
> > Not sure why it is printing empty values while iterating through 
> > session list.
>
> One more thing, try this:
> 
>// working
>   ${id} // Not working
> 
>
> if works, something has been broken in the framework
>
> Cheers
> Łukasz
>
> -
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-01-22 Thread Murali Challa
No luck. It is not working.

Was there some issue with EL for using inside struts tags?

On Wed, 22 Jan, 2025, 16:56 Lukasz Lenart,  wrote:

> śr., 22 sty 2025 o 11:25 Murali Challa 
> napisał(a):
> > Pure EL is working fine.
> >
> > Not sure why it is printing empty values while iterating through session
> > list.
>
> One more thing, try this:
> 
>// working
>   ${id} // Not working
> 
>
> if works, something has been broken in the framework
>
> Cheers
> Łukasz
>
> -
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-01-22 Thread Lukasz Lenart
śr., 22 sty 2025 o 11:25 Murali Challa  napisał(a):
> Pure EL is working fine.
>
> Not sure why it is printing empty values while iterating through session
> list.

One more thing, try this:

   // working
  ${id} // Not working


if works, something has been broken in the framework

Cheers
Łukasz

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-01-22 Thread Murali Challa
Hi,

Pure EL is working fine.

Not sure why it is printing empty values while iterating through session
list.

Thanks,
Murali

On Wed, 22 Jan, 2025, 14:43 Lukasz Lenart,  wrote:

> śr., 22 sty 2025 o 09:55 Murali Challa 
> napisał(a):
> >
> > Hi,
> >
> > We are migrating our application from struts2-core 2.5.33 to 6.7.0.
> >
> > Post migration, we are facing issues while populating bean values in
> > session.
> >
> > ${} is printing null values. Seems the EL is not working post 6.x
> migration.
> >
> > Can you help me to understand if I'm missing something in this migration.
> >
> > Below is the code snippet for your reference.
> >
> > 
> >// working
> >
> >${menu.id} // Not working
> > 
>
> Could you try to test if a pure EL works, something like this:
>
> hello
> ${myVar}
>
> If this works I would focus on checking logs, maybe you get a warning
> from SecurityMemberAccess, or #session is not accessible or
> unavailable (Struts doesn't create HttpSession if not needed).
>
>
> Cheers
> Łukasz
>
> -
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-01-22 Thread Lukasz Lenart
śr., 22 sty 2025 o 09:55 Murali Challa  napisał(a):
>
> Hi,
>
> We are migrating our application from struts2-core 2.5.33 to 6.7.0.
>
> Post migration, we are facing issues while populating bean values in
> session.
>
> ${} is printing null values. Seems the EL is not working post 6.x migration.
>
> Can you help me to understand if I'm missing something in this migration.
>
> Below is the code snippet for your reference.
>
> 
>// working
>
>${menu.id} // Not working
> 

Could you try to test if a pure EL works, something like this:

hello
${myVar}

If this works I would focus on checking logs, maybe you get a warning
from SecurityMemberAccess, or #session is not accessible or
unavailable (Struts doesn't create HttpSession if not needed).


Cheers
Łukasz

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: Facings issues while migrating from Struts 2.5.x to 6.7

2025-01-13 Thread Lukasz Lenart
I don't recall changes in this area, only this one but it was in Struts 2.3
https://issues.apache.org/jira/browse/WW-4073

niedz., 12 sty 2025 o 04:22 Murali Challa  napisał(a):
>
> Hi,
>
> We are migrating our application from struts2-core 2.5.33 to 6.7.0.
>
> Post migration, we are facing issues while populating bean values in
> session.
>
> ${} is printing null values. Seems the EL is not working post 6.x migration.
>
> Can you help me to understand if I'm missing something in this migration.
>
> Below is the code snippet for your reference.
>
> 
>// working
>
>${menu.id} // Not working
> 
>
> Thanks,
> Murali

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]