JSP Analyzer#
Compiling the JSPs#
In order to analyze the JSPs, they should be compiled to generate Java class files. These classes can then be analyzed by the Java Module. JSPs are normally processed by the Jasper pre-processor to generate the Java source files which are then compiled by the Java Compiler.
You can read about compiling the JSPs on the Apache Web Site. For your convenience we have provided the build.xml file described on the Apache web site, in the scripts/jsp directory in the tools download.
Source Code Analysis of JSPs#
JSP files are sometimes related to other JSP files through directives such as ‘include’ and ‘forward’. In order to extract these dependencies, it is necessary to analyze the source files. You can analyze the source files by using the additional tool:
toolcmd -command jsp [-srcdir dir]|[-srcfile file] [-output filename.ldi.xml]
-srcdir dir: Specify directory containing the Java source files. All java files within the directory and its sub-directories will be analyzed.
-srcfile file: Specify a source file to be analyzed. A -srcdir or a -srcfile argument is required.
-output filename.ldi.xml: Specify the name of a ldi file for the output.