Hi, I'm having some problem with liferay login with AD LDAP.
I have liferay on a linux server, and another database server.
When developing, I use IP address, which works fine.
But when I use DNS, login take a long time, which may up to 24 secs.
I checked with firebug for the request and saw that, when user login, the "Get c" request takes up to 19 secs.
But when I put both liferay and my db into my desktop, everything works fine, login only takes about 1.5 secs.
So I tried modify some configuration on my actual server and got a funny result: after a slow login (about 30 secs) is a faster login (about 4 to 8 secs).
Here is the config I modified:
web.xml:
1
2<welcome-file-list>
3 <welcome-file>index.jsp</welcome-file>
4</welcome-file-list>
index.jsp:
1
2<%
3/**
4 * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
5 *
6 * This library is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU Lesser General Public License as published by the Free
8 * Software Foundation; either version 2.1 of the License, or (at your option)
9 * any later version.
10 *
11 * This library is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
14 * details.
15 */
16%>
17
18<%@ page import="com.liferay.portal.kernel.servlet.HttpHeaders" %>
19<%@ page import="com.liferay.portal.model.LayoutSet" %>
20<%@ page import="com.liferay.portal.util.PortalUtil" %>
21<%@ page import="com.liferay.portal.util.WebKeys" %>
22
23<%
24
25// According to http://www.webmasterworld.com/forum91/3087.htm a semicolon in
26// the URL for a meta-refresh tag does not work in IE 6.
27
28// To work around this issue, we use a URL without a session id for meta-refresh
29// and rely on the load event on the body element to properly rewrite the URL.
30
31String redirect = null;
32
33LayoutSet layoutSet = (LayoutSet)request.getAttribute(WebKeys.VIRTUAL_HOST_LAYOUT_SET);
34redirect = PortalUtil.getPathMain();
35
36response.setHeader(HttpHeaders.LOCATION, redirect);
37response.setHeader(HttpHeaders.CONNECTION, HttpHeaders.CONNECTION_CLOSE_VALUE);
38
39response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
40%>
41
42<html>
43
44<head>
45 <title></title>
46 <meta content="0; url=<%= PortalUtil.getPathMain () %>" http-equiv="refresh" />
47</head>
48
49<body onload="javascript:location.replace('<%= PortalUtil.getPathMain () %>')">
50
51</body>
52
53</html>
I think this could be a result of some misconfig of the dns server, but I still need to check for other problems that may occur.
So can anyone please explain to me how liferay login function work?(when user click login, which action will first occur, which page will be called for a redirect)?
Many thanks And sorry for my bad English
Be kell jelentkezni ahhoz, hogy ez helytelenként legyen megjelölve.