Class[] rewriterClasses = new Class[]
{ PerlContentRewriter.class, PerlContentRewriter.class};
Class[] adaptorClasses = new Class[]
{ SwingParserAdaptor.class, SaxParserAdaptor.class};
RewriterController rwc = new JetspeedRewriterController(contextPath + "conf/rewriter-rules-mapping.xml", Arrays
.asList(rewriterClasses), Arrays.asList(adaptorClasses));
FileReader reader = new FileReader(contextPath + "conf/default-rewriter-rules.xml");
Ruleset ruleset = rwc.loadRuleset(reader);
reader.close();
rewriter = rwc.createRewriter(ruleset);
return rwc;
}