use of com.ibm.xsp.registry.FacesSharableRegistry in project org.openntf.nsfodp by OpenNTF.
the class ODPCompiler method compileXSP.
// *******************************************************************************
// * Internal utility methods
// *******************************************************************************
private XSPCompilationResult compileXSP(XPage xpage, JavaSourceClassLoader classLoader) throws Exception {
try {
String javaSource;
try (InputStream xspSource = xpage.getSourceAsStream()) {
javaSource = dynamicXPageBean.translate(xpage.getJavaClassName(), xpage.getPageName(), xspSource, (FacesSharableRegistry) facesProject.getRegistry());
}
Class<?> compiled = classLoader.addClass(xpage.getJavaClassName(), javaSource);
return new XSPCompilationResult(javaSource, compiled);
} catch (Throwable e) {
throw new RuntimeException(MessageFormat.format(Messages.ODPCompiler_errorConvertingXSP, odp.getBaseDirectory().relativize(xpage.getDataFile())), e);
}
}
Aggregations