|
|
|
@ -19,7 +19,7 @@ import com.liferay.portal.kernel.util.WebKeys;
|
|
|
|
|
public class LandingPageAction extends Action {
|
|
|
|
|
|
|
|
|
|
private static final Logger _log = LoggerFactory.getLogger(LandingPageAction.class);
|
|
|
|
|
|
|
|
|
|
private static final String VHOST_TO_SKIP = "dev.d4science.org";
|
|
|
|
|
@Override
|
|
|
|
|
public void run(HttpServletRequest request, HttpServletResponse response) throws ActionException {
|
|
|
|
|
|
|
|
|
@ -27,12 +27,18 @@ public class LandingPageAction extends Action {
|
|
|
|
|
|
|
|
|
|
HttpSession session = request.getSession();
|
|
|
|
|
String path = "";
|
|
|
|
|
String currentVirtualHost = "";
|
|
|
|
|
try {
|
|
|
|
|
path = getCustomLandingPage(request);
|
|
|
|
|
currentVirtualHost = request.getServerName();
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
session.setAttribute(WebKeys.LAST_PATH, new LastPath(StringPool.BLANK, path));
|
|
|
|
|
if (currentVirtualHost.compareTo(VHOST_TO_SKIP) != 0)
|
|
|
|
|
session.setAttribute(WebKeys.LAST_PATH, new LastPath(StringPool.BLANK, path));
|
|
|
|
|
else {
|
|
|
|
|
_log.debug("Found VHOST_TO_SKIP = " + currentVirtualHost);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* Returns custom landing page path after user login
|
|
|
|
|