
META-INF.resources.index.jsp Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of multisite Show documentation
Show all versions of multisite Show documentation
GiavaCMS Content Management System: Multi Site Module
The newest version!
<%@page import="org.jboss.logging.Logger"%>
<%@page import="java.util.Properties"%>
<%
Logger logger = Logger.getLogger("org.giavacms.multisite.jsp.index");
try
{
Properties properties = new Properties();
String hostName = request.getServerName();
properties.load(Thread.currentThread().getContextClassLoader().getResourceAsStream("domains.properties"));
for (String key : properties.stringPropertyNames())
{
String value = properties.getProperty(key);
logger.info("." + key + "." + " => " + value);
}
logger.info("hostName: ." + hostName + ".");
if (properties.containsKey(hostName))
{
String where = properties.getProperty(hostName);
response.sendRedirect(request.getContextPath()
+ where);
return;
}
else
{
response.sendRedirect(request.getContextPath()
+ "/p/index");
return;
}
}
catch (Exception e)
{
e.printStackTrace();
}
response.sendRedirect(request.getContextPath()
+ "/p/index");
%>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy