[
https://issues.apache.org/jira/browse/WW-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17706744#comment-17706744
]
Kusal Kithul-Godage edited comment on WW-5301 at 3/30/23 7:37 AM:
------------------------------------------------------------------
{{<bean-selection>}} is not the same as {{StrutsBeanSelectionProvider}}.
StrutsBeanSelectionProvider runs at the end after struts.xml has already been
read. Whereas, {{<bean-selection>}} runs immediately when {{struts-plugin.xml}}
is read and before {{struts.xml}} is read. This means we can not configure a
custom default bean when Velocity plugin is using {{<bean-selection>}}.
was (Author: JIRAUSER298544):
{{<bean-selection>}} is not the same as {{StrutsBeanSelectionProvider}}.
StrutsBeanSelectionProvider runs at the end after struts.xml has already been
read. Whereas, {{<bean-selection>}} runs immediately when {{struts-plugin.xml}}
is read. This means we can not configure a custom default bean when Velocity
plugin is using {{<bean-selection>}}.
> Impossible to select alternate default VelocityManager bean
> -----------------------------------------------------------
>
> Key: WW-5301
> URL: https://issues.apache.org/jira/browse/WW-5301
> Project: Struts 2
> Issue Type: Bug
> Components: Core, Plugin - Velocity
> Affects Versions: 6.1.1
> Reporter: Kusal Kithul-Godage
> Priority: Major
> Fix For: 6.2.0
>
>
> I'm possibly missing something here but as far as I can tell
> struts-plugin.xml is always loaded before struts.xml.
> This means the default VelocityManager bean (#registerBeanSelection) will
> always be selected before the default bean can be configured via
> {{struts.velocity.manager.classname}}
> Changing the load order here probably isn't a good solution either.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)