1
14
15 package com.liferay.portal.events;
16
17 import com.liferay.portal.kernel.events.Action;
18 import com.liferay.portal.kernel.log.Log;
19 import com.liferay.portal.kernel.log.LogFactoryUtil;
20 import com.liferay.portal.kernel.util.PropsKeys;
21 import com.liferay.portal.kernel.util.StringPool;
22 import com.liferay.portal.kernel.util.Validator;
23 import com.liferay.portal.struts.LastPath;
24 import com.liferay.portal.util.PropsValues;
25 import com.liferay.portal.util.WebKeys;
26
27 import java.util.HashMap;
28
29 import javax.servlet.http.HttpServletRequest;
30 import javax.servlet.http.HttpServletResponse;
31 import javax.servlet.http.HttpSession;
32
33
38 public class DefaultLogoutPageAction extends Action {
39
40 public void run(HttpServletRequest request, HttpServletResponse response) {
41 String path = PropsValues.DEFAULT_LOGOUT_PAGE_PATH;
42
43 if (_log.isInfoEnabled()) {
44 _log.info(
45 PropsKeys.DEFAULT_LANDING_PAGE_PATH + StringPool.EQUAL + path);
46 }
47
48 if (Validator.isNotNull(path)) {
49 LastPath lastPath = new LastPath(
50 StringPool.BLANK, path, new HashMap<String, String[]>());
51
52 HttpSession session = request.getSession();
53
54 session.setAttribute(WebKeys.LAST_PATH, lastPath);
55 }
56
57
62
69 }
70
71 private static Log _log = LogFactoryUtil.getLog(
72 DefaultLogoutPageAction.class);
73
74 }