diff --git a/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/renderers/DOTRenderer.java b/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/renderers/DOTRenderer.java index 4d38e139f..230adefe5 100644 --- a/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/renderers/DOTRenderer.java +++ b/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/renderers/DOTRenderer.java @@ -125,7 +125,11 @@ public class DOTRenderer { } else if (resultClassName.indexOf("Redirect") != -1) { // check if the redirect is to an action -- if so, link it - String location = getViewLocation((String) resultConfig.getParams().get("location"), namespace); + String locationConfig = (String) resultConfig.getParams().get("location"); + if (locationConfig == null) { + locationConfig = (String) resultConfig.getParams().get("actionName"); + } + String location = getViewLocation(locationConfig, namespace); // FIXME: work with new configuration style if (location.endsWith("action")) { addTempLink(action, location, Link.TYPE_REDIRECT, resultConfig.getName()); diff --git a/plugins/sitegraph/src/test/resources/org/apache/struts2/sitegraph/out.txt b/plugins/sitegraph/src/test/resources/org/apache/struts2/sitegraph/out.txt index 9760051a9..99f80b4fb 100644 --- a/plugins/sitegraph/src/test/resources/org/apache/struts2/sitegraph/out.txt +++ b/plugins/sitegraph/src/test/resources/org/apache/struts2/sitegraph/out.txt @@ -28,5 +28,6 @@ digraph mygraph { tutorial_sitegraph_guess_success_jsp -> tutorial_sitegraph_guess [label="href\n(!default)"]; hello -> hello_jsp [label="success",color="darkseagreen2"]; hello -> tutorial_test [label="redirect: tutorial"]; + hello -> tutorial_test [label="redirect: tutorial2"]; tutorial_test -> tutorial_sitegraph_guess_input_ftl [label="input",color="darkseagreen2"]; } diff --git a/plugins/sitegraph/src/test/resources/org/apache/struts2/sitegraph/struts.xml b/plugins/sitegraph/src/test/resources/org/apache/struts2/sitegraph/struts.xml index 402ba34dd..da65fda91 100644 --- a/plugins/sitegraph/src/test/resources/org/apache/struts2/sitegraph/struts.xml +++ b/plugins/sitegraph/src/test/resources/org/apache/struts2/sitegraph/struts.xml @@ -9,6 +9,7 @@ hello.jsp /tutorial/test.action + /tutorial/test.action