File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Maven - JSP Static Code Analysis" Watch "Maven - JSP Static Code Analysis" New topic

Maven - JSP Static Code Analysis

Anish Pyne

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

Joined: May 26, 2003
Posts: 33132

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.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: Maven - JSP Static Code Analysis
It's not a secret anymore!