File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes Maven - JSP Static Code Analysis Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Maven - JSP Static Code Analysis" Watch "Maven - JSP Static Code Analysis" New topic
Author

Maven - JSP Static Code Analysis

Anish Pyne
Greenhorn

Joined: Aug 23, 2010
Posts: 17
Are there any Maven plugins or stand alone tools available to do static analysis of JSP code? I am handling a very old application with lots of JSPs having badly coded scriplets in them. Getting rid of all the scriplets will take a long time hence next best is to improve the code as much as possible. Need something similiar like FindBugs which does awesome code analysis of .java code.
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31062
    
232

PMD will look at JSPs. It has a Maven plugin, but PMD only works on well formed JSP files. I recommend writing your own pre-processort to get rid of the HTML code to "simulate" well formedness and then run PMD via the Maven plugin.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Maven - JSP Static Code Analysis