struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yasser Zamani <>
Subject Re: Struts2 login action class seems to be reused
Date Sat, 21 Apr 2018 10:09:58 GMT

On 4/19/2018 4:39 PM, Prasanth Pasala wrote:
> There is a index.jsp which is defined as default page in web.xml it just forwards the
request to Login.action. There is no chaining of actions in struts itself. We do have a LoginFilter
which verifies
> if a user is logged in.

So maybe there is a bug with chain interceptor! Could you please use
following code in your action setUsername method (save it's log in a
private string field in your action). Then print it when your action
data are not consistent with request params.

String log = "";
ActionInvocation invocation= ActionContext.getActionInvocation();
ValueStack stack = invocation.getStack();
CompoundRoot root = stack.getRoot();
log += "Root Size: " + root.size();
Result result = invocation.getResult();
log += "\r\nResult: " + result;
List list = new ArrayList(root);
for (Object object : list) {
    log += "\r\nObject: " + object;
this.log = log; //saves for possible future use

View raw message