aspose file tools*
The moose likes Struts and the fly likes Generate a Web Diagram for Struts2 application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Generate a Web Diagram for Struts2 application" Watch "Generate a Web Diagram for Struts2 application" New topic
Author

Generate a Web Diagram for Struts2 application

Peter Mest
Ranch Hand

Joined: Aug 14, 2009
Posts: 30
How can I generate a web diagram for a struts2 application?

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Depends. I've created simple S2 config file slurpers that spit out a DOT file suitable for GraphViz and/or a yEd XML file. Using something like JRuby or Groovy should make it just dozens lines, depending on how functional you want it to be.

What's trickier is grabbing all the possible links to S2 actions inside JSP--the tags are easy, the JavaScript for Ajax-y stuff can be trickier.
Peter Mest
Ranch Hand

Joined: Aug 14, 2009
Posts: 30
David Newton wrote:Depends. I've created simple S2 config file slurpers that spit out a DOT file suitable for GraphViz and/or a yEd XML file. Using something like JRuby or Groovy should make it just dozens lines, depending on how functional you want it to be.

What's trickier is grabbing all the possible links to S2 actions inside JSP--the tags are easy, the JavaScript for Ajax-y stuff can be trickier.


Could you tell how can I generate it? I downloaded JRuby, but I'm looking and I don't know what to do.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I just read in the config file(s), build a data structure representing the config, and output a DOT file for GraphViz. It also depends on how your app is set up--for example, the last place I consulted at used wildcard configuration, so it wasn't possible to build the tool the same way.
 
 
subject: Generate a Web Diagram for Struts2 application