We now have a folder for our administration point. Inside that folder, we create a new JSP named index.html
(note that the extension should be .html
, not .jsp
).
We want to create a page that will allow us to specify a stylesheet, a source directory, and a destination directory (just like the scheduled task in the last chapter) and then run the XSLT transformation on the fly.
Instead of splitting the application into multiple pages, we can handle the whole transformation with one JSP file that includes both the form and the code for processing the form values. Aside from being more efficient to code, it also presents a simple user interface.
Here is the beginning of the code for the index.html
JSP:
<%@ page session="false" import="com.opencms.flex.jsp.CmsJspActionElement, com.opencms.file.CmsObject, com.opencms.core.CmsException, com.example.genericxml.xslt.BatchTransformer" %> <% String xslt ...