struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yasser Zamani <yasserzam...@apache.org>
Subject Re: Struts2 login action class seems to be reused
Date Mon, 05 Mar 2018 17:49:27 GMT


On 3/5/2018 7:48 PM, Prasanth wrote:
> But the Login filter had the below lines to make sure forwarded requests from /context1
> would work.
> 
> request.setAttribute("struts.actionMapping", new ActionMapping());

Please let me discuss this line first of all. I'm still surprised how
context2 app works with this line! I expect you always get
ConfigurationException or get the result of the default action. Have you
set this filter pattern to being applied only on /Login.action? If so,
still you should get ConfigurationException or get the result of the
default action (is /Login.action default?). Or maybe you have put these
two lines in an if statement like if(request has these attributes){...}?
If not, then do this please; an if statement for each line.

Could you please try `request.setAttribute("struts.actionMapping",
null)`? then post back the exception if any (I don't expect any). You
should set to null or remove the attribute. Any other code is wrong.

Regards.

Mime
View raw message