apache > cocoon

- Home

# XSP FAQs

##

## How can I turn my XSPs into Generators to get better performance?

Cocoon will compile your XSP files into Java classes the first time they are requested. You can find them in your work directory, for example in tomcat/work/.../org/apache/cocoon/www/my_xsp.class. Once your XSP file is compiled, you can declare a new generator in your sitemap, for example:

    <map:generator type="myXSP" src="org.apache.cocoon.www.my_xsp"/>

And then use it in a pipeline, for example:

    <map:generate type="myXSP"/>

Errors and Improvements? If you see any errors or potential improvements in this document please help us: View, Edit or comment on the latest development version (registration required).