This document discusses transforming Java code embedded in Java Server Pages (JSP) into custom tags to improve maintainability. It proposes a multi-language parser to parse JSP pages containing HTML and Java code. It then describes four approaches to transforming JSP scripting elements, HTML embedded in print statements, JavaBeans actions, and page directives. Finally, it outlines a general transformation strategy involving four cases: a single custom tag, nested tags, tags depending on conditional logic, and multiple custom tags. The goal is to move Java code out of JSP into custom tags while preserving functionality and comments to aid future maintenance.