Hi, I've done some work with JSPs, but I'm trying to figure out if something I want to do is possible with the technology or not.
Let's assume I define a custom tag, <custom:code>, which is invoked with arbitrary text inside it. (BTW, this forum needs a preview button! :P)
<custom:code><![CDATA[
Hello world!
]]></custom:code>
What I want to happen is I want to control the
JSP compilation process... for instance, I want to have "Hello World!" moved into an external temporary file and instantiate a regular class with the relevant filename.
It's not a simple search-replace of JSP tags with
Java code in the final
servlet, since "Hello World", of whatever length, would still be stored as a literal
string.
Is it possible to hook into any common web containers to provide this functionality?
I suppose one workaround is to write and run some sort of XML preprocessor manually and only deploy an altered version... Or to have the resulting servlet check if it's already pushed the string into a file each time...