1

I have used Eclipse JDT API for analysing and processing Java codes of several Java classes by making AST tree of code. I have also used Spoon code parsing tool for one of my projects and successfully processed Java class files.

Is there any similar tool available for JSP files ? I want to parse, analyse and possible modify the code automatically.

Please suggest what I can use to achieve this.

Amit
  • 13,134
  • 17
  • 77
  • 148

1 Answers1

0

I'm not quite familiar with JSP, but looking on the web I found that scriptlets are compiled in a java class extending HttpServlet (see: Scriptlets inserts arbitrary code into servlet's _jspService method). Then I assume, you can use jspc (https://docs.oracle.com/cd/E19146-01/821-0790/6nlqo2pgh/index.html) to obtain the Java file corresponding to your JSP and then use Spoon or JDT on it.

Community
  • 1
  • 1
Simon Urli
  • 449
  • 1
  • 5
  • 12