You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Introduction

WebWork comes with a utility called WebFlow. WebFlow is used to generate graphical diagrams representing the flow of your web application. It does this by parsing your configuration files, action classes, and view (JSP, Velocity, and FreeMarker) files. An example of a typical output of WebFlow is provided:

Usage

You can use WebFlow with the following command:

java -cp ... -jar webwork.jar -config CONFIG_DIR -views VIEWS_DIRS -output OUTPUT -ns NAMESPACE

Where:

  • CONFIG_DIR is the directory where xwork.xml and other configuration files are located
  • VIEWS_DIRS is a comma separated list of directories where you JSPs and Velocity files are located
  • OUTPUT is the directory where WebFlow will write its files
  • NAMESPACE (optional) is the namespace that you wish to restrict WebFlow

You must supply the correct classpath when invoking the WebFlow tool. Specifically, the XWork, WebWork, and their dependencies must be included in the classpath. Futhermore, you must also include your action class files referenced in xwork.xml. Without the proper class path entries, WebFlow will not function properly.

Using dot files

WebFlow outputs files with the extension "dot". These files are used by the GraphViz tool. Once WebFlow has produced the dot files, you can then use the dot program to render a GIF file that contains the actual diagrams of your site.

*After install GraphViz, you can use the dot tool to create the GIF file:
example: dot.exe -Tgif output.dot -o graph.gif

  • No labels