ConverterConfiguration convertConfig =
urlRewriteConfig.getConverterConfiguration();
convertConfig.setTuples(TUPLES);
URLPrefixRewriteManager rewriteManager =
urlRewriteConfig.getURLPrefixRewriteManager();
//Add rewritableURLPrefix values for all the remote projects.
//The values are constructed by mapping the remote project location
//to the contextPath/project.
//e.g. if there is a project mapping jsp->http://localhost:8080
//and a context value of 'volantis', http://localhost:8080/blah/blah
//will be remapped to http://localhost:8080/volantis/jsp/blah/blah
Iterator iterator = urlRemapper.pathPrefixIterator();
while (iterator.hasNext()) {
String project = (String) iterator.next();
URL remoteMCSProjectLocation =
urlRemapper.getRemoteSiteRootURL(project);
rewriteManager.addRewritableURLPrefix(
remoteMCSProjectLocation.toExternalForm(),
contextPath+"/"+project,
URLPrefixRewriteOperation.REPLACE_PREFIX);
}