RE: Getting "could not find @TilesDefinition for action" after the upgrade from Struts 2.5.30 to 6.0.0

2022-06-09 Thread zdnknejedly
Hello Łukasz: 

Thank you very much for the workaround re context-param. That resolved it for 
me, too. 

Cheers,

Zdenek

-Original Message-
From: Lukasz Lenart  
Sent: June 9, 2022 8:25 AM
To: Struts Users Mailing List 
Subject: Re: Getting "could not find @TilesDefinition for action" after the 
upgrade from Struts 2.5.30 to 6.0.0

Ok, we have a bug with loading definitions, it works once context-param is 
defined



org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG

/WEB-INF/tiles.xml



Could you register a ticket in JIRA?


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

czw., 9 cze 2022 o 05:52  napisał(a):
>
> Hello Łukasz:
>
> Thank you for prompt response. No, I was not using the DEFINITIONS_CONFIG - 
> the tiles.xml was found fine in v2.5.30. When I add it via init-param to the 
> struts filter it does not seem to make a difference however.
>
> 
> struts2
> 
> org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter
> 
> 
> org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG
> /WEB-INF/tiles.xml
> 
> 
>
>
> Yes, I have deleted the work subfolder under Catalina home/base.
>
> Here is the output (for any line with tiles keyword plus the 
> StrutsPrepareAndExecuteFilter) after I enabled trace level in log4j.xml:
>
> 2022-06-08 23:26:10,749 INFO  [http-nio-8080-exec-55] 
> tiles.StrutsTilesListener (StrutsTilesListener.java:37) - Starting Struts 
> Tiles 3 integration ...
> 2022-06-08 23:26:10,805 TRACE [http-nio-8080-exec-55] 
> tiles.StrutsTilesInitializer (StrutsTilesInitializer.java:43) - Initializing 
> Tiles wildcard support ...
> 2022-06-08 23:26:10,855 TRACE [http-nio-8080-exec-55] 
> tiles.StrutsTilesInitializer (StrutsTilesInitializer.java:50) - 
> Creating dedicated Struts factory to create Tiles container
> 2022-06-08 23:26:11,086 TRACE [http-nio-8080-exec-55] 
> tiles.StrutsWildcardServletApplicationContext 
> (StrutsWildcardServletApplicationContext.java:117) - Using 
> ResourceFinder to find matches for tiles*.xml
> 2022-06-08 23:26:11,126 TRACE [http-nio-8080-exec-55] 
> tiles.StrutsWildcardServletApplicationContext 
> (StrutsWildcardServletApplicationContext.java:129) - Found resources 
> [Resource 
> file:/C:/data/Documents/NetBeansProjects13/xxx-v6/target/xxx-v6-1.0-SN
> APSHOT/WEB-INF/tiles.xml at 
> file:/C:/data/Documents/NetBeansProjects13/xxx-v6/target/xxx-v6-1.0-SN
> APSHOT/WEB-INF/tiles.xml] for path tiles*.xml [http-nio-8080-exec-55] 
> INFO org.apache.tiles.access.TilesAccess - Publishing TilesContext for 
> context: 
> org.apache.struts2.tiles.StrutsWildcardServletApplicationContext
>
> 2022-06-08 23:28:34,062 TRACE [http-nio-8080-exec-58] 
> filter.StrutsPrepareAndExecuteFilter 
> (StrutsPrepareAndExecuteFilter.java:126) - Checking if 
> /app/account/view-summary.action is a static resource
> 2022-06-08 23:28:34,063 TRACE [http-nio-8080-exec-58] 
> filter.StrutsPrepareAndExecuteFilter 
> (StrutsPrepareAndExecuteFilter.java:129) - Assuming uri 
> /app/account/view-summary.action as a normal action
> 2022-06-08 23:28:34,082 TRACE [http-nio-8080-exec-58] 
> filter.StrutsPrepareAndExecuteFilter 
> (StrutsPrepareAndExecuteFilter.java:139) - Found mapping 
> ActionMapping{name='view-summary', namespace='/app/account', 
> method='null', extension='action', params={}, result=null} for 
> /app/account/view-summary.action
>
> 2022-06-08 23:28:34,385 DEBUG [http-nio-8080-exec-58] tiles.TilesResult 
> (TilesResult.java:135) - checking if tiles definition exists 
> 'app.myAccount.viewSummary'
> 2022-06-08 23:28:34,388 TRACE [http-nio-8080-exec-58] 
> tiles.TilesResult (TilesResult.java:142) - tilesDefinition not found 
> yet, searching in action
> 2022-06-08 23:28:34,391 WARN  [http-nio-8080-exec-58] 
> tiles.TilesResult (TilesResult.java:154) - could not find 
> @TilesDefinition for action: view-summary
> 2022-06-08 23:28:34,391 DEBUG [http-nio-8080-exec-58] 
> interceptor.I18nInterceptor (I18nInterceptor.java:143) - After action 
> invocation Locale=en_US
> 2022-06-08 23:28:34,393 DEBUG [http-nio-8080-exec-58] 
> result.ServletDispatcherResult (ServletDispatcherResult.java:127) - 
> Forwarding to location: /tiles/exception.jsp
>
>
>
>
> The trace output is the same for v6 as for v2.5.30 - except that in v2.5.30 
> the tile definition is found and the processing of the tile/jsp proceeds:
>
>
> 2022-06-08 22:31:11,779 DEBUG [http-nio-8080-exec-3] tiles.TilesResult 
> (TilesResult.java:135) - checking if tiles definition exists 
> 'app.myAccount.viewSummary'
> 2022-06-08 22:31:12,427 DEBUG [http-nio-8080-exec-3] components.UIBean 
> (UIBean.java:1005) - Cannot determine id attribute for 
> [org.apache.struts2.components.Head@64229854], consider defining id, name or 
> key attribute!
> 2022-06-08 22:31:12,427 DEBUG [http-nio-8080-exec-3] components.UIBean 
> (UIBean.java:577) - Rendering template /template/xhtml/head
> 2022-06-08 22:31:12,453 DEB

Re: Struts 6.0.0 - jsp forward in result page

2022-06-09 Thread Łukasz Lenart
Could you share your struts.xml?

W dniu śr., 8.06.2022 o 20:56 Prasanth 
napisał(a):

> Hi,
>
> We have a scenario where one of the results of a struts action is a jsp
> page with a forward to another action. This works fine under 2.5.X
> versions. In 6.0.0 I am seeing a stackoverflowerror. After
> debugging it seems like the first action processes it correctly and
> returns the result page and the jsp forward is triggered at this point
> struts seems to execute the first action again rather than
> the action specified in the jsp forward.
>
> from web.xml
>
>  
>  struts2
>  *.action
>  FORWARD
>  REQUEST
>  
>
> Thanks,
> Prasanth

-- 
(mobile)


Re: Getting "could not find @TilesDefinition for action" after the upgrade from Struts 2.5.30 to 6.0.0

2022-06-09 Thread Lukasz Lenart
Looks like this PR broke support for Tiles, just testing a fix right now
https://github.com/apache/struts/pull/352


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

czw., 9 cze 2022 o 14:32  napisał(a):
>
> Thank you Łukasz. I will do that at lunch break. Cheers, Zdenek
>
> -Original Message-
> From: Lukasz Lenart 
> Sent: June 8, 2022 1:21 AM
> To: Struts Users Mailing List 
> Subject: Re: Getting "could not find @TilesDefinition for action" after the 
> upgrade from Struts 2.5.30 to 6.0.0
>
> To be honest nothing has changed in Tiles support between those versions, 
> could you enable TRACE logging for package org.apache.struts2.tiles ?
> Do you use "org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG"
> servlet init-param to define the definitions?
> Also, did you clean up Tomcat's temp folder?
> https://cwiki.apache.org/confluence/display/WW/Struts+2.5+to+6.0.0+migration#Struts2.5to6.0.0migration-Temp/WorkdirectoryofApplicationServer/ServletContainer
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>

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



RE: Getting "could not find @TilesDefinition for action" after the upgrade from Struts 2.5.30 to 6.0.0

2022-06-09 Thread zdnknejedly
Thank you Łukasz. I will do that at lunch break. Cheers, Zdenek

-Original Message-
From: Lukasz Lenart  
Sent: June 8, 2022 1:21 AM
To: Struts Users Mailing List 
Subject: Re: Getting "could not find @TilesDefinition for action" after the 
upgrade from Struts 2.5.30 to 6.0.0

To be honest nothing has changed in Tiles support between those versions, could 
you enable TRACE logging for package org.apache.struts2.tiles ?
Do you use "org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG"
servlet init-param to define the definitions?
Also, did you clean up Tomcat's temp folder?
https://cwiki.apache.org/confluence/display/WW/Struts+2.5+to+6.0.0+migration#Struts2.5to6.0.0migration-Temp/WorkdirectoryofApplicationServer/ServletContainer


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

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



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



Re: Getting "could not find @TilesDefinition for action" after the upgrade from Struts 2.5.30 to 6.0.0

2022-06-09 Thread Lukasz Lenart
Ok, we have a bug with loading definitions, it works once
context-param is defined



org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG

/WEB-INF/tiles.xml



Could you register a ticket in JIRA?


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

czw., 9 cze 2022 o 05:52  napisał(a):
>
> Hello Łukasz:
>
> Thank you for prompt response. No, I was not using the DEFINITIONS_CONFIG - 
> the tiles.xml was found fine in v2.5.30. When I add it via init-param to the 
> struts filter it does not seem to make a difference however.
>
> 
> struts2
> 
> org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter
> 
> 
> org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG
> /WEB-INF/tiles.xml
> 
> 
>
>
> Yes, I have deleted the work subfolder under Catalina home/base.
>
> Here is the output (for any line with tiles keyword plus the 
> StrutsPrepareAndExecuteFilter) after I enabled trace level in log4j.xml:
>
> 2022-06-08 23:26:10,749 INFO  [http-nio-8080-exec-55] 
> tiles.StrutsTilesListener (StrutsTilesListener.java:37) - Starting Struts 
> Tiles 3 integration ...
> 2022-06-08 23:26:10,805 TRACE [http-nio-8080-exec-55] 
> tiles.StrutsTilesInitializer (StrutsTilesInitializer.java:43) - Initializing 
> Tiles wildcard support ...
> 2022-06-08 23:26:10,855 TRACE [http-nio-8080-exec-55] 
> tiles.StrutsTilesInitializer (StrutsTilesInitializer.java:50) - Creating 
> dedicated Struts factory to create Tiles container
> 2022-06-08 23:26:11,086 TRACE [http-nio-8080-exec-55] 
> tiles.StrutsWildcardServletApplicationContext 
> (StrutsWildcardServletApplicationContext.java:117) - Using ResourceFinder to 
> find matches for tiles*.xml
> 2022-06-08 23:26:11,126 TRACE [http-nio-8080-exec-55] 
> tiles.StrutsWildcardServletApplicationContext 
> (StrutsWildcardServletApplicationContext.java:129) - Found resources 
> [Resource 
> file:/C:/data/Documents/NetBeansProjects13/xxx-v6/target/xxx-v6-1.0-SNAPSHOT/WEB-INF/tiles.xml
>  at 
> file:/C:/data/Documents/NetBeansProjects13/xxx-v6/target/xxx-v6-1.0-SNAPSHOT/WEB-INF/tiles.xml]
>  for path tiles*.xml
> [http-nio-8080-exec-55] INFO org.apache.tiles.access.TilesAccess - Publishing 
> TilesContext for context: 
> org.apache.struts2.tiles.StrutsWildcardServletApplicationContext
>
> 2022-06-08 23:28:34,062 TRACE [http-nio-8080-exec-58] 
> filter.StrutsPrepareAndExecuteFilter (StrutsPrepareAndExecuteFilter.java:126) 
> - Checking if /app/account/view-summary.action is a static resource
> 2022-06-08 23:28:34,063 TRACE [http-nio-8080-exec-58] 
> filter.StrutsPrepareAndExecuteFilter (StrutsPrepareAndExecuteFilter.java:129) 
> - Assuming uri /app/account/view-summary.action as a normal action
> 2022-06-08 23:28:34,082 TRACE [http-nio-8080-exec-58] 
> filter.StrutsPrepareAndExecuteFilter (StrutsPrepareAndExecuteFilter.java:139) 
> - Found mapping ActionMapping{name='view-summary', namespace='/app/account', 
> method='null', extension='action', params={}, result=null} for 
> /app/account/view-summary.action
>
> 2022-06-08 23:28:34,385 DEBUG [http-nio-8080-exec-58] tiles.TilesResult 
> (TilesResult.java:135) - checking if tiles definition exists 
> 'app.myAccount.viewSummary'
> 2022-06-08 23:28:34,388 TRACE [http-nio-8080-exec-58] tiles.TilesResult 
> (TilesResult.java:142) - tilesDefinition not found yet, searching in action
> 2022-06-08 23:28:34,391 WARN  [http-nio-8080-exec-58] tiles.TilesResult 
> (TilesResult.java:154) - could not find @TilesDefinition for action: 
> view-summary
> 2022-06-08 23:28:34,391 DEBUG [http-nio-8080-exec-58] 
> interceptor.I18nInterceptor (I18nInterceptor.java:143) - After action 
> invocation Locale=en_US
> 2022-06-08 23:28:34,393 DEBUG [http-nio-8080-exec-58] 
> result.ServletDispatcherResult (ServletDispatcherResult.java:127) - 
> Forwarding to location: /tiles/exception.jsp
>
>
>
>
> The trace output is the same for v6 as for v2.5.30 - except that in v2.5.30 
> the tile definition is found and the processing of the tile/jsp proceeds:
>
>
> 2022-06-08 22:31:11,779 DEBUG [http-nio-8080-exec-3] tiles.TilesResult 
> (TilesResult.java:135) - checking if tiles definition exists 
> 'app.myAccount.viewSummary'
> 2022-06-08 22:31:12,427 DEBUG [http-nio-8080-exec-3] components.UIBean 
> (UIBean.java:1005) - Cannot determine id attribute for 
> [org.apache.struts2.components.Head@64229854], consider defining id, name or 
> key attribute!
> 2022-06-08 22:31:12,427 DEBUG [http-nio-8080-exec-3] components.UIBean 
> (UIBean.java:577) - Rendering template /template/xhtml/head
> 2022-06-08 22:31:12,453 DEBUG [http-nio-8080-exec-3] 
> template.FreemarkerTemplateEngine (FreemarkerTemplateEngine.java:119) - 
> Rendering template: /template/xhtml/head.ftl
> 2022-06-08 22:31:12,508 DEBUG [http-nio-8080-exec-3] 
> template.FreemarkerTemplateEngine (FreemarkerTemplateEngine.java:151) - Push 
> tag on top of the stack
> 2022-06-08 22:31:12,782 DEBUG [http-nio-8080-