}
} else {
siteName = siteName.replace("http://", "");
siteName = siteName.replace("www.", "");
log.warning("---------------->------>" + siteName);
ApplicationMapping mapping = ApplicationMappingModel
.getById(siteName);
if (mapping != null) {
try {
Application obj = ApplicationModel.getById(mapping
.getApplicationId());
if (obj != null) {
ApplicationConfig config = ApplicationConfigModel
.getById(obj.getId(), obj.getId());
ApplicationTemplate template = ApplicationTemplateModel
.getById(obj.getId(),
config.getTemplateId());
NamespaceManager.set(mapping.getApplicationId());
if (config != null && template != null) {
request.setAttribute("template", template);
request.setAttribute("config", config);
} else {
response.getWriter().print(