Skip to main content
QUICK REVIEW

[Paper Review] Identifying KDM Model of JSP Pages

Anas Shatnawi, Hafedh Mili|arXiv (Cornell University)|Jan 1, 2017
Scientific Computing and Data ManagementDecision Sciences2 references2 citations
TL;DR

This paper proposes a two-step approach to generate a KDM model for JSP pages by first translating them into Java Servlets using Jasper, then enriching the KDM model with dependencies from JSP tags not captured during translation. The method enables full reverse engineering of JSP-based JEE applications into structured KDM models for software analysis and maintenance.

ABSTRACT

In this report, we propose our approach that identifies a KDM model of JSP pages. Our approach is based on two main steps. The first one aims to reduce the problem space by translating JSP pages into Java Servlets where we can use existing tools to identify a KDM model. The second step aims to complete the resulting KDM model by identifying dependencies of JSP tags that are not codified by the translation step.

Motivation & Objective

  • To address the lack of KDM model support for JEE technologies implemented with scripting languages like JSP.
  • To enable reverse engineering of JSP-based JEE applications into structured KDM models for software analysis.
  • To identify and represent dependencies of JSP tags that are not captured during JSP-to-Java translation.
  • To extend existing KDM extraction tools (e.g., MoDisco) to support JSP pages through intermediate Servlet translation.
  • To provide a foundation for future KDM modeling of other server page technologies like JSF.

Proposed method

  • Translate JSP pages into equivalent Java Servlets using the Jasper tool, leveraging its standard JSP lifecycle mapping.
  • Extract a preliminary KDM model from the translated Servlets using the MoDisco framework.
  • Parse JSP pages and configuration files (e.g., web.xml, @WebServlet annotations) to identify URLs and server page mappings.
  • Build a lookup table mapping URLs to corresponding server pages using SAX2-based XML parsing.
  • Identify JSP tag dependencies (e.g., <jsp:include>, <jsp:forward>) not translated into Java code and extract their target page references.
  • Modify the initial KDM model by inserting method call relationships between ClassUnit instances representing JSP pages.

Experimental results

Research questions

  • RQ1How can KDM models be automatically generated for JSP pages, which are not natively supported by existing KDM extraction tools?
  • RQ2What are the key dependencies introduced by JSP tags (e.g., <jsp:include>, <jsp:forward>) that are not captured during JSP-to-Java translation?
  • RQ3How can the mapping between URLs and server pages be systematically extracted from web.xml and @WebServlet annotations to support dependency modeling?
  • RQ4To what extent can existing KDM extraction tools (e.g., MoDisco) be leveraged for JSP reverse engineering via intermediate Servlet translation?
  • RQ5How can the resulting KDM model be extended to include cross-JSP dependencies not expressed in the translated Java code?

Key findings

  • The approach successfully generates a KDM model for JSP pages by translating them into Java Servlets, enabling use of existing MoDisco-based KDM extraction.
  • JSP tags such as <jsp:include> and <jsp:forward> introduce dependencies that are not represented in the translated Java code and must be explicitly captured.
  • The use of web.xml and @WebServlet annotations enables accurate mapping of URLs to server pages, which is essential for dependency reconstruction.
  • A custom parser based on SAX2 APIs effectively extracts URL-to-page mappings from web.xml, supporting automated dependency modeling.
  • The method successfully extends the KDM model by inserting method call relationships between ClassUnit instances of JSP pages, representing runtime dependencies.
  • The approach demonstrates feasibility and completeness in modeling both structural elements and cross-page dependencies in JSP-based JEE applications.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.