You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Arsen Milutsa <ar...@gmail.com> on 2025/07/07 18:42:42 UTC
Struts 7 upgrade - looking for the javax.servlet.Filter instead of jakarta.*
Hello,
Getting the compliance error from the WL's appc. The dependencies were
changed to WebLogic version 14c, so was the web-app spec - 5.0. Jakarta's
bom was incorporated as well, we took all the references in the code from
javax.* to jakarta.*
Still getting this error:
[ERROR] weblogic.servlet.internal.dd.compliance.ComplianceException: The
element filter-class,
"org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter" must
be a subclass of "javax.servlet.Filter".
[ERROR] at
weblogic.servlet.internal.dd.compliance.BaseComplianceChecker.addDescriptorError(BaseComplianceChecker.java:55)
Please share insights.
--
Got Gmail?
RE: [External] : Struts 7 upgrade - looking for the javax.servlet.Filter instead of jakarta.*
Posted by Krishnaraj Viswanathan <kr...@oracle.com.INVALID>.
To my knowledge, WLS 14 is yet to support jakartaEE and it is still on JavaEE. WLS 15c is where the shift is happening. You might have to stay on Struts 6 for WLS 14.
Again, this is not something that I know for sure, but something I understood from my initial reading.
~K
-----Original Message-----
From: Arsen Milutsa <ar...@gmail.com>
Sent: Tuesday, July 8, 2025 12:13 AM
To: user@struts.apache.org
Subject: [External] : Struts 7 upgrade - looking for the javax.servlet.Filter instead of jakarta.*
Hello,
Getting the compliance error from the WL's appc. The dependencies were changed to WebLogic version 14c, so was the web-app spec - 5.0. Jakarta's bom was incorporated as well, we took all the references in the code from
javax.* to jakarta.*
Still getting this error:
[ERROR] weblogic.servlet.internal.dd.compliance.ComplianceException: The element filter-class, "org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter" must be a subclass of "javax.servlet.Filter".
[ERROR] at
weblogic.servlet.internal.dd.compliance.BaseComplianceChecker.addDescriptorError(BaseComplianceChecker.java:55)
Please share insights.
--
Got Gmail?
Re: [External] : Re: Struts 7 upgrade - looking for the javax.servlet.Filter instead of jakarta.*
Posted by Lukasz Lenart <lu...@apache.org>.
I updated the Getting Started guide to Struts 7
https://github.com/apache/struts-site/pull/272
Cheers
Łukasz
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [External] : Re: Struts 7 upgrade - looking for the javax.servlet.Filter instead of jakarta.*
Posted by Lukasz Lenart <lu...@apache.org>.
pt., 11 lip 2025 o 07:58 IGRA TRANSFORMING KNOWLEDGE
<co...@gmail.com> napisał(a):
>
> can anyone share the code of crud operation using strut7.
>
> however, still struts official displaying 2.5 version
> https://struts.apache.org/getting-started/how-to-create-a-struts2-web-application
That shouldn't be a problem, just use proper dependencies related to Struts 7.
You can also take a look on these examples
https://github.com/apache/struts-examples/tree/main/crud
https://github.com/apache/struts/tree/main/apps/showcase/ (skill &
person examples)
Cheers
Łukasz
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [External] : Re: Struts 7 upgrade - looking for the javax.servlet.Filter instead of jakarta.*
Posted by IGRA TRANSFORMING KNOWLEDGE <co...@gmail.com>.
can anyone share the code of crud operation using strut7.
however, still struts official displaying 2.5 version
https://struts.apache.org/getting-started/how-to-create-a-struts2-web-application
Thanks in advance.
On Thu, Jul 10, 2025 at 3:32 PM Krishnaraj Viswanathan
<kr...@oracle.com.invalid> wrote:
> Lukasz,
> Following up on this, does this mean, we will have to migrate to
> Struts 7 when taking up WLS 15 which supports jakartax.*?
>
> ~K
>
>
> -----Original Message-----
> From: Lukasz Lenart <lu...@apache.org>
> Sent: Wednesday, July 9, 2025 10:31 AM
> To: Struts Users Mailing List <us...@struts.apache.org>
> Subject: [External] : Re: Struts 7 upgrade - looking for the
> javax.servlet.Filter instead of jakarta.*
>
> After asking Perplexity I got such an answer:
> WebLogic 14c is compatible with Jakarta EE 8 only. It does not support
> Jakarta EE 9 or later versions, which introduce the new `jakarta.*`
> namespace
>
> Cheers
> Lukasz
>
> pon., 7 lip 2025 o 20:43 Arsen Milutsa <ar...@gmail.com> napisał(a):
> >
> > Hello,
> >
> > Getting the compliance error from the WL's appc. The dependencies were
> > changed to WebLogic version 14c, so was the web-app spec - 5.0.
> > Jakarta's bom was incorporated as well, we took all the references in
> > the code from
> > javax.* to jakarta.*
> > Still getting this error:
> > [ERROR] weblogic.servlet.internal.dd.compliance.ComplianceException:
> > The element filter-class,
> > "org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter"
> > must be a subclass of "javax.servlet.Filter".
> > [ERROR] at
> > weblogic.servlet.internal.dd.compliance.BaseComplianceChecker.addDescr
> > iptorError(BaseComplianceChecker.java:55)
> >
> > Please share insights.
> >
> > --
> > Got Gmail?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
Re: [External] : Re: Struts 7 upgrade - looking for the javax.servlet.Filter instead of jakarta.*
Posted by Lukasz Lenart <lu...@apache.org>.
Probably yes, there could be also a case where WLS15 will support
javax.* as well (I'm not an Oracle expert in this matter)
czw., 10 lip 2025 o 12:02 Krishnaraj Viswanathan
<kr...@oracle.com.invalid> napisał(a):
>
> Lukasz,
> Following up on this, does this mean, we will have to migrate to Struts 7 when taking up WLS 15 which supports jakartax.*?
>
> ~K
>
>
> -----Original Message-----
> From: Lukasz Lenart <lu...@apache.org>
> Sent: Wednesday, July 9, 2025 10:31 AM
> To: Struts Users Mailing List <us...@struts.apache.org>
> Subject: [External] : Re: Struts 7 upgrade - looking for the javax.servlet.Filter instead of jakarta.*
>
> After asking Perplexity I got such an answer:
> WebLogic 14c is compatible with Jakarta EE 8 only. It does not support Jakarta EE 9 or later versions, which introduce the new `jakarta.*` namespace
>
> Cheers
> Lukasz
>
> pon., 7 lip 2025 o 20:43 Arsen Milutsa <ar...@gmail.com> napisał(a):
> >
> > Hello,
> >
> > Getting the compliance error from the WL's appc. The dependencies were
> > changed to WebLogic version 14c, so was the web-app spec - 5.0.
> > Jakarta's bom was incorporated as well, we took all the references in
> > the code from
> > javax.* to jakarta.*
> > Still getting this error:
> > [ERROR] weblogic.servlet.internal.dd.compliance.ComplianceException:
> > The element filter-class,
> > "org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter"
> > must be a subclass of "javax.servlet.Filter".
> > [ERROR] at
> > weblogic.servlet.internal.dd.compliance.BaseComplianceChecker.addDescr
> > iptorError(BaseComplianceChecker.java:55)
> >
> > Please share insights.
> >
> > --
> > Got Gmail?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: [External] : Re: Struts 7 upgrade - looking for the javax.servlet.Filter instead of jakarta.*
Posted by Krishnaraj Viswanathan <kr...@oracle.com.INVALID>.
Lukasz,
Following up on this, does this mean, we will have to migrate to Struts 7 when taking up WLS 15 which supports jakartax.*?
~K
-----Original Message-----
From: Lukasz Lenart <lu...@apache.org>
Sent: Wednesday, July 9, 2025 10:31 AM
To: Struts Users Mailing List <us...@struts.apache.org>
Subject: [External] : Re: Struts 7 upgrade - looking for the javax.servlet.Filter instead of jakarta.*
After asking Perplexity I got such an answer:
WebLogic 14c is compatible with Jakarta EE 8 only. It does not support Jakarta EE 9 or later versions, which introduce the new `jakarta.*` namespace
Cheers
Lukasz
pon., 7 lip 2025 o 20:43 Arsen Milutsa <ar...@gmail.com> napisał(a):
>
> Hello,
>
> Getting the compliance error from the WL's appc. The dependencies were
> changed to WebLogic version 14c, so was the web-app spec - 5.0.
> Jakarta's bom was incorporated as well, we took all the references in
> the code from
> javax.* to jakarta.*
> Still getting this error:
> [ERROR] weblogic.servlet.internal.dd.compliance.ComplianceException:
> The element filter-class,
> "org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter"
> must be a subclass of "javax.servlet.Filter".
> [ERROR] at
> weblogic.servlet.internal.dd.compliance.BaseComplianceChecker.addDescr
> iptorError(BaseComplianceChecker.java:55)
>
> Please share insights.
>
> --
> Got Gmail?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Extend CSP (Content Security Policy)
Posted by Lukasz Lenart <lu...@apache.org>.
śr., 9 lip 2025 o 20:03 Ute Kaiser <ut...@web.de.invalid> napisał(a):
>
> Hi,
> I want to add
> frame-ancestors 'self'
> to the HTTP-Headers provided by Struts7 (using enforce-mode)
>
> Unfortunately I do not understand https://struts.apache.org/core-developers/csp-interceptor
>
> Neither do I want to replace DefaultCspSettings.class (losing any struts enhancements in future struts versions) in the first place
> nor did I see how to use CspSettingsAware.
>
> I looked into CspInterceptorTest.java:
> public CspSettings getCspSettings() {
> DefaultCspSettings settings = new DefaultCspSettings();
> settings.setReportUri(reportUri);
> return settings;
> }
> but that did not help to add an entry to the policy.
>
> Please give me a hint. If necessary, I would try
> >>
> cspSettingsClassName (default to DefaultCspSettings.class) - a full class name implementing CspSettings interface to allow to define a custom CPS settings.
> <<
> but not quite sure if this means to copy or extend the default class, and not sure how to change my class and how to configure struts.xml.
If this should be a global change it's better to implement your own
CspSettings by either extending DefaultCspSettings or implementing it
from scratch. Then you you can provide the new class via
cspSettingsClassName parameter.
> Mail not sent while work in progress:
>
> I extended the default class by overriding createPolicyFormat and managed to get it to work with this struts.xml (took me quite a while):
> <interceptor-ref name="defaultStack">
> <param name="csp.enforcingMode">true</param>
> <param name="csp.cspSettingsClassName">my.FullyQualifiedCspSettingsClass</param>
> </interceptor-ref>
>
> These are the warnings in firefox developer tools:
> Content-Security-Policy: Ignorieren von "http:" innerhalb script-src: 'strict-dynamic' angegeben (my translation: "http:" within script-src ignored: 'strict-dynamic' specified.)
> Is the struts default CSP policy inconsistent?
>
> Please tell me if I am on the right path, if there is better best practice, and please could you extend the documentation?
> I am not lucky wih overriding createPolicyFormat.
You must override the interceptor's parameters like this (I assume in
your case Method 3 is the way to go)
https://struts.apache.org/core-developers/interceptors#interceptor-parameter-overriding
If you have other requirements let me know and I try to address them
in the next Struts 7 version.
Cheers
Łukasz
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Extend CSP (Content Security Policy)
Posted by Ute Kaiser <ut...@web.de.INVALID>.
Hi,
I want to add
frame-ancestors 'self'
to the HTTP-Headers provided by Struts7 (using enforce-mode)
Unfortunately I do not understand https://struts.apache.org/core-developers/csp-interceptor
Neither do I want to replace DefaultCspSettings.class (losing any struts enhancements in future struts versions) in the first place
nor did I see how to use CspSettingsAware.
I looked into CspInterceptorTest.java:
public CspSettings getCspSettings() {
DefaultCspSettings settings = new DefaultCspSettings();
settings.setReportUri(reportUri);
return settings;
}
but that did not help to add an entry to the policy.
Please give me a hint. If necessary, I would try
>>
cspSettingsClassName (default to DefaultCspSettings.class) - a full class name implementing CspSettings interface to allow to define a custom CPS settings.
<<
but not quite sure if this means to copy or extend the default class, and not sure how to change my class and how to configure struts.xml.
Mail not sent while work in progress:
I extended the default class by overriding createPolicyFormat and managed to get it to work with this struts.xml (took me quite a while):
<interceptor-ref name="defaultStack">
<param name="csp.enforcingMode">true</param>
<param name="csp.cspSettingsClassName">my.FullyQualifiedCspSettingsClass</param>
</interceptor-ref>
These are the warnings in firefox developer tools:
Content-Security-Policy: Ignorieren von "http:" innerhalb script-src: 'strict-dynamic' angegeben (my translation: "http:" within script-src ignored: 'strict-dynamic' specified.)
Is the struts default CSP policy inconsistent?
Please tell me if I am on the right path, if there is better best practice, and please could you extend the documentation?
I am not lucky wih overriding createPolicyFormat.
Best regards Ute
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts 7 upgrade - looking for the javax.servlet.Filter instead of jakarta.*
Posted by Lukasz Lenart <lu...@apache.org>.
After asking Perplexity I got such an answer:
WebLogic 14c is compatible with Jakarta EE 8 only. It does not support
Jakarta EE 9 or later versions, which introduce the new `jakarta.*`
namespace
Cheers
Lukasz
pon., 7 lip 2025 o 20:43 Arsen Milutsa <ar...@gmail.com> napisał(a):
>
> Hello,
>
> Getting the compliance error from the WL's appc. The dependencies were
> changed to WebLogic version 14c, so was the web-app spec - 5.0. Jakarta's
> bom was incorporated as well, we took all the references in the code from
> javax.* to jakarta.*
> Still getting this error:
> [ERROR] weblogic.servlet.internal.dd.compliance.ComplianceException: The
> element filter-class,
> "org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter" must
> be a subclass of "javax.servlet.Filter".
> [ERROR] at
> weblogic.servlet.internal.dd.compliance.BaseComplianceChecker.addDescriptorError(BaseComplianceChecker.java:55)
>
> Please share insights.
>
> --
> Got Gmail?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org