Hello Peer.

I am not sure if any of these suggestions will help or not, but you never know.

There is a blog post 
(http://www.programmers-code.org/2017/10/23/struts-tiles-locale-resolver-cannot-obtain-httpservletrequest/)
 that mentions receiving similar errors due to request.getAttribute("x") calls 
within the JSPs.  You can check your application's JSPs to see if you have any 
similar direct calls, and try what the blog suggests (replace request with 
requestScope), to see if it makes any difference.

There is a commented-out Tiles 1-or-2 context-param entry in the application's 
web.xml from your earlier mailing list post.  It probably will not make a 
difference, but you could try explicitly setting the Tiles 3 equivalent:

<context-param>
    
<param-name>org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG</param-name>
    <param-value>/WEB-INF/tiles.xml</param-value>
</context-param>

in the application's web.xml and see if it makes any difference in the 
application's behaviour.

The error you are getting indicates that the StrutsTilesLocaleResolver for the 
Struts 2 Tiles Plugin cannot locate the ActionContext for the request.  That 
could mean that processing is somehow ending up at one of your JSPs without 
following the normal action execution path.  You might try increasing the log 
levels to DEBUG temporarily to see if that turns up any information that might 
help.

Another suggestion is that you could try temporarily changing your 
application's configuration to use the "defaultStack" interceptor stack (and 
then add any custom interceptors you need), to see if that makes any 
difference.  There maybe something subtle with the interceptors (or ordering) 
that is impacting processing, and the struts.xml from your earlier post has 
custom interceptor stacks, so going back to the basic defaults might help you 
debug further.

Regards,

James.


On 2020/11/01 11:05:43, Peer Mohammad <peer4...@gmail.com> wrote: 
> I have not used Xwork, index.jsp has <tiles:inserDefinition 
> name="cheetta.login" flush="true"/> and cheetta.login is given in struts.xml 
> with action class.This setup is working last 7 years on struts2.3.35 .
> Note sure why its failing on upgraded version.I debugged and saw that 
> Valustack returning null for the request.
> 
> Thanks & Regards,
> Peer M Ansari
> 
> On 2020/10/29 12:57:57, Lukasz Lenart <lukaszlen...@apache.org> wrote: 
> > czw., 29 paź 2020 o 11:24 Peer Mohammad <peer4...@gmail.com> napisał(a):
> > > list of jars for Strust2.5.22
> > >
> > > struts2-core 2.5.22
> > > freemarker -2.3.30
> > > xwork-core -2.3.37
> > 
> > As I said, this is not needed, XWork was merged into Struts Core, you
> > are duplicating classes now
> > 
> > > Caused by: There is no ActionContext for current request! - [unknown 
> > > location]
> > >
> > >     at 
> > > org.apache.jsp.index_jsp._jspx_meth_tiles_005finsertDefinition_005f0(index_jsp.java:151)
> > 
> > You are accessing index.jsp directly by
> >         <welcome-file-list>
> >                 <welcome-file>index.jsp</welcome-file>
> >         </welcome-file-list>
> > 
> > 
> > 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

Reply via email to