mirror of
https://github.com/apache/struts.git
synced 2026-08-07 15:46:57 +00:00
WW-2416 Serialize the request map, but filter out the value stack to reduce the verbosity of the output
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@614140 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
+11
-1
@@ -338,7 +338,8 @@ public class DebuggingInterceptor implements Interceptor {
|
||||
}
|
||||
}
|
||||
writer.endNode();
|
||||
serializeIt(ctx.getSession(), "request", writer, new ArrayList<Object>());
|
||||
Map requestMap = (Map) ctx.get("request");
|
||||
serializeIt(requestMap, "request", writer, filterValueStack(requestMap));
|
||||
serializeIt(ctx.getSession(), "session", writer, new ArrayList<Object>());
|
||||
|
||||
ValueStack stack = (ValueStack) ctx.get(ActionContext.VALUE_STACK);
|
||||
@@ -445,6 +446,15 @@ public class DebuggingInterceptor implements Interceptor {
|
||||
this.enableXmlWithConsole = enableXmlWithConsole;
|
||||
}
|
||||
|
||||
|
||||
private List<Object> filterValueStack(Map requestMap) {
|
||||
List<Object> filter = new ArrayList<Object>();
|
||||
Object valueStack = requestMap.get("struts.valueStack");
|
||||
if(valueStack != null) {
|
||||
filter.add(valueStack);
|
||||
}
|
||||
return filter;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user