Re: Unable to load configuration: /struts2-core-6.4.0.jar!/struts-beans.xml:39:72

Lukasz Lenart <[email protected]>
Newsgroups gmane.comp.jakarta.struts.devel
Message-ID <CAMopvkOde8VLwSEh9HYg7sUEjFJAUdzuPM5i32tECX-ZJu6a9w@mail.gmail.com>
czw., 18 kwi 2024 o 09:05 [email protected]
<[email protected]> napisał(a):
> My tiles definition remains unchanged under
>
> /WEB-INF/tiles.xml
>
> If I see this correctly, these changes do not include this situation?
>
> https://github.com/apache/struts/pull/896/commits/c7ae614824b4c158b9998575294d94fe9a746c41
>
>   @Deprecated
> String TILES_DEFAULT_PATTERN =
> "/WEB-INF/**/tiles*.xml,classpath*:META-INF/**/tiles*.xml";
>
>
>      public static final Set<String> TILES_DEFAULT_PATTERNS =
> Collections.unmodifiableSet(new HashSet<>(Arrays.asList(
>              "/WEB-INF/**/tiles*.xml",
>              "classpath*:META-INF/**/tiles*.xml"
>      )));
>
>
> This seems to be a breaking change?

Looks like, I assumed that ** should match any folder and even
no-folder, could you move your tiles.xml into the "config" subfolder
to see if this will fix the problem?

There is option to use <init-params> but I assume you do not use servlet config

<servlet>
    <servlet-name>tiles</servlet-name>
    <servlet-class>org.apache.tiles.web.startup.TilesServlet</servlet-class>
    <init-param>
        <param-name>
          org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG
        </param-name>
        <param-value>
          /WEB-INF/tiles.xml
        </param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
</servlet>


Thanks in advance
Lukasz
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.