throws IOException, ServletException {
//logger.debug(" display edit site started ");
try {
// get site...
JahiaSite site = (JahiaSite) session.getAttribute(CLASS_NAME + "newJahiaSite");
// retrieve previous form values...
String jahiaDisplayMessage = (String) request.getAttribute(CLASS_NAME + "jahiaDisplayMessage");
String siteTitle = site.getTitle();
String siteServerName = site.getServerName();
String siteKey = site.getSiteKey();
String siteDescr = site.getDescr();
String selectedTmplSet = (String) request.getAttribute("selectedTmplSet");
// get tmplPackage list...
final JCRNodeWrapper tmplPack = JCRStoreService.getInstance().getSessionFactory().getCurrentUserSession()
.getNode("/templateSets/" + selectedTmplSet);
Boolean defaultSite = Boolean.FALSE;
if (request.getAttribute("defaultSite") == null) {
defaultSite = Boolean.valueOf((Boolean) session.getAttribute(CLASS_NAME + "defaultSite"));
} else {
defaultSite = (Boolean) request.getAttribute("defaultSite");
}
Locale selectedLocale = (Locale) session.getAttribute(CLASS_NAME + "selectedLocale");
if (selectedLocale == null) {
selectedLocale = LanguageCodeConverters
.languageCodeToLocale(org.jahia.settings.SettingsBean.getInstance().getDefaultLanguageCode());
}
// set request site attributes...
request.setAttribute("jahiaDisplayMessage", jahiaDisplayMessage);
request.setAttribute("siteTitle", siteTitle);
request.setAttribute("siteServerName", siteServerName);
request.setAttribute("siteKey", siteKey);
request.setAttribute("siteDescr", siteDescr);
request.setAttribute("siteID", site.getID());
request.setAttribute("defaultSite", defaultSite);
if (tmplPack != null) {
request.setAttribute("templateName", tmplPack.getName());
}