1. A method for emulating the processing of server pages, comprising: reading a server page, including identifying any calls to a library of custom tags; emulating any calls to custom tags identified in said server page, wherein said server page is generated and processed dynamically at runtime; discovering and parsing a tag language definition (TLD) file for this server context; parsing said server page to create a tree of nodes for each element of said tree; creating and initializing a page context object; sequentially processing said tree to identify each said node as one of template text, custom tag start, custom tag end, and expression language (EL) expression; responsive to this node being template text, writing said text directly to final markup; responsive to this node being a custom tag start, processing a custom tag start method including: verifying correctness of attributes, including whether required attributes exist; verifying tag body is empty if required to be so by said TLD file; setting properties of a tag handler instance to include said page context, any parent tag, and any attribute values determined from evaluating any EL expressions; pushing information about this custom tag onto a tag state stack; receiving from said custom tag start method a response code, said response code being one of skip body, evaluate body include, and evaluate body buffered; responsive to said response code being skip body, skipping body; responsive to said response code being one of evaluate body include and evaluate body buffered, invoking methods for page context push body, body tag set body content, and body tag do initiate body; responsive to this node being a tag end, processing a custom tag end method including: determining if this custom tag is an iteration and that said body has been processed, and if not invoking a do end tag method; responsive to this custom tag not being an iteration with said body processed, invoking a do after body method to process each remaining iteration and thereafter invoking said do end tag method; responsive to a skip page response from said do end tag method, arranging for remainder of this page to be skipped; and responsive to this node being an EL expression, evaluating said EL expression and writing result to said final markup.
1. A method for emulating the processing of server pages, comprising: reading a server page, including identifying any calls to a library of custom tags; emulating any calls to custom tags identified in said server page, wherein said server page is generated and processed dynamically at runtime; discovering and parsing a tag language definition (TLD) file for this server context; parsing said server page to create a tree of nodes for each element of said tree; creating and initializing a page context object; sequentially processing said tree to identify each said node as one of template text, custom tag start, custom tag end, and expression language (EL) expression; responsive to this node being template text, writing said text directly to final markup; responsive to this node being a custom tag start, processing a custom tag start method including: verifying correctness of attributes, including whether required attributes exist; verifying tag body is empty if required to be so by said TLD file; setting properties of a tag handler instance to include said page context, any parent tag, and any attribute values determined from evaluating any EL expressions; pushing information about this custom tag onto a tag state stack; receiving from said custom tag start method a response code, said response code being one of skip body, evaluate body include, and evaluate body buffered; responsive to said response code being skip body, skipping body; responsive to said response code being one of evaluate body include and evaluate body buffered, invoking methods for page context push body, body tag set body content, and body tag do initiate body; responsive to this node being a tag end, processing a custom tag end method including: determining if this custom tag is an iteration and that said body has been processed, and if not invoking a do end tag method; responsive to this custom tag not being an iteration with said body processed, invoking a do after body method to process each remaining iteration and thereafter invoking said do end tag method; responsive to a skip page response from said do end tag method, arranging for remainder of this page to be skipped; and responsive to this node being an EL expression, evaluating said EL expression and writing result to said final markup. 5. The method of claim 1 , said server page being a Java server page (JSP), and further comprising: while parsing said server page, writing any text determined to be template text directly to final markup.