Subject:  ANN: Struts Checker Tool
Date: Fri, 23 Nov 2001 12:43:55 -0800
From: David White <whitedavidp@home.com>
To:  struts-user@jakarta.apache.org

FYI -

After a bit of frustration caused by my forgetting to put needed resources into my struts application properties file, I decided to build a little, checker program which parses struts JSP files and looks for those tags which make reference to the application properties file and lets me know if I have forgotten to keep that file at least minimally up-to-date. I know of no other way to KNOW this until run time causes an exception to be thrown (which can waste a lot of time).

The command line usage notes for this program follow. If others have an interest, I will post this on sourceforge.net. Please let me know via email if you are interested in using such a tool. Perhaps suggestions for improving it can be made as well.

Cheers,
David

-----------------------------------------------------------------------
StrutsResourcesChecker version 00.01
by David White <dpwhite@users.sourceforge.net>
-----------------------------------------------------------------------

Usage: java StrutsResourcesChecker [-v][-r] jspFile|dirName strutsResourcesFile
if jspFile, then only that file is processed
if dirName, then all .jsp files in that directory are processed
if -r, then dirName must be specified and it is recursively processed
if -v, then verbose output is displayed

Note that there must be access to a SAX 1.0 parser on the classpath and
that this is also true for the JSP parser library found for free download
at http://easythings.iwarp.com/download/parsers10.jar

Note that this program assumes it will find the word 'struts' somewhere in the
in the uri attribute of any struts-related, taglib directive. This is not
required by JSP but it makes things far easier and is common usage. Sorry for
any inconvenience this causes.


DOWNLOAD