Warning: Attempt to read property "date" on null in /home/www/websvn.26th.net/html/blame.php on line 247

Warning: Attempt to read property "msg" on null in /home/www/websvn.26th.net/html/blame.php on line 247

Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/www/websvn.26th.net/html/blame.php on line 247
WebSVN – general – Blame – /hostadmiral/trunk/src/ak/hostadmiral/core/action/FailedLoginsAction.java/ – Rev 949

Subversion Repositories general

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
949 dev 1
package ak.hostadmiral.core.action;
2
 
3
import java.util.List;
4
import java.util.Collections;
5
import java.util.ArrayList;
6
 
7
import javax.servlet.http.HttpServletRequest;
8
import javax.servlet.http.HttpServletResponse;
9
 
10
import org.apache.struts.action.Action;
11
import org.apache.struts.action.ActionMapping;
12
import org.apache.struts.action.ActionForm;
13
import org.apache.struts.action.DynaActionForm;
14
import org.apache.struts.action.ActionForward;
15
 
16
import ak.hostadmiral.util.StringConverter;
17
import ak.hostadmiral.core.model.User;
18
import ak.hostadmiral.core.model.UserManager;
19
 
20
public final class FailedLoginsAction
21
	extends Action
22
{
23
	public ActionForward execute(ActionMapping mapping, ActionForm form,
24
			HttpServletRequest request, HttpServletResponse response)
25
		throws Exception
26
	{
27
		User user   = (User)request.getSession().getAttribute("user");
28
		List logins = new ArrayList(UserManager.getInstance().listFailedLogins(user));
29
 
30
		Collections.sort(logins, UserManager.LOGINS_TIME_COMPARATOR);
31
		Collections.reverse(logins);
32
		request.setAttribute("logins", logins);
33
 
34
		return mapping.findForward("default");
35
	}
36
}