Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

This plugin got marked as deprecated since Struts 2.5.11!

 

The SiteGraph pluginexcerptINLINE

generates graphical diagrams representing the flow of your web application

...

SiteGraph works by parsing your configuration files, Action classes, and view files (JSP, Velocity, and FreeMarker), and displaying a visual map.

Additional information can be found in the JavaDocs: Wiki Markup{snippet:id=javadocs-intro|javadoc=true|url=org.apache.struts2.sitegraph.SiteGraph}

Understanding the Output

There are several key things to notice when looking at the output from SiteGraph:

...

You can use SiteGraph with the following command:

...

...

Where: Wiki Markup{snippet:id=sitegraph-usage|lang=none|url=struts2/plugins/sitegraph/src/main/resources/org/apache/struts2/sitegraph/sitegraph-usage.txt}

...

You must either supply the correct classpath when invoking the SiteGraph tool or place the Sitegraph plugin in the same directory as the dependent jars. Specifically, the XWork jar, Struts jar, and their dependencies must be included in the classpath. Futhermore, you must also include your Action class files referenced in struts.xml. Without the proper class path entries, SiteGraph will not function properly.

Once you have run SiteGraph, check the directory specified in the "output" argument (OUTPUT). In there you will find two files: out.dot and out.gif. You may immediately open up out.gif and view the web application flow. However, you may also wish to either run the out.dot file through a different GraphVis layout engine (neato, twopi, etc), so the original dot file is provided as well. You may also wish to edit the dot file before rendering the final flow diagram.

...

Some advanced users may wish to execute SiteGraph from within their application - this could be required if you are developing an application that supports plugin capabilities. This can easily be done. See the JavaDocs for more info: Wiki Markup{snippet:id=javadocs-api|javadoc=true|url=org.apache.struts2.sitegraph.SiteGraph}The command line version of SiteGraph does exactly this (except for overriding the Writer): Wiki Markup{snippet:id=example-api|javadoc=true|lang=java|url=org.apache.struts2.sitegraph.SiteGraph}

Example

...

Settings

This plugin doesn't allow for any global settings.

...