From af13dfaded24e399258a55dc4399454e0c8293e5 Mon Sep 17 00:00:00 2001 From: Nicolas Michard Date: Mon, 4 Feb 2008 14:05:45 +0000 Subject: [PATCH] =?UTF-8?q?Page=20d'erreur=20pour=20le=20login=20->=20renv?= =?UTF-8?q?oi=20vers=20la=20page=20de=20login/cr=C3=A9ation=20de=20compte?= =?UTF-8?q?=20complet=20(loginFull.jsp)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WEB-INF/applicationContextAcegi.xml | 7 ++++++- .../WebContent/WEB-INF/decorators/main.jsp | 2 +- .../WebContent/WEB-INF/jsp/errors/403error.jsp | 2 +- YACOSWeb/WebContent/WEB-INF/jsp/loginFull.jsp | 18 ++++++++++++++++++ YACOSWeb/WebContent/WEB-INF/jsp/main.jsp | 2 +- YACOSWeb/WebContent/WEB-INF/web.xml | 1 + YACOSWeb/WebContent/WEB-INF/yacos-servlet.xml | 6 ++++++ .../WebContent/{WEB-INF/jsp => }/login.jsp | 3 +-- YACOSWeb/WebContent/stylesheets/base.css | 5 +++++ .../web/system/controller/LogonController.java | 17 ++++++++++++++++- 10 files changed, 56 insertions(+), 7 deletions(-) create mode 100644 YACOSWeb/WebContent/WEB-INF/jsp/loginFull.jsp rename YACOSWeb/WebContent/{WEB-INF/jsp => }/login.jsp (99%) diff --git a/YACOSWeb/WebContent/WEB-INF/applicationContextAcegi.xml b/YACOSWeb/WebContent/WEB-INF/applicationContextAcegi.xml index 1e2a196..dd7c5b7 100644 --- a/YACOSWeb/WebContent/WEB-INF/applicationContextAcegi.xml +++ b/YACOSWeb/WebContent/WEB-INF/applicationContextAcegi.xml @@ -32,10 +32,15 @@ http://www.springframework.org/schema/beans http://www.springframework.org/schem - + + + + /login.htm?login_error=2 + + diff --git a/YACOSWeb/WebContent/WEB-INF/decorators/main.jsp b/YACOSWeb/WebContent/WEB-INF/decorators/main.jsp index 1a95304..d9a63cd 100644 --- a/YACOSWeb/WebContent/WEB-INF/decorators/main.jsp +++ b/YACOSWeb/WebContent/WEB-INF/decorators/main.jsp @@ -26,7 +26,7 @@ - + diff --git a/YACOSWeb/WebContent/WEB-INF/jsp/errors/403error.jsp b/YACOSWeb/WebContent/WEB-INF/jsp/errors/403error.jsp index a96909b..2682f81 100644 --- a/YACOSWeb/WebContent/WEB-INF/jsp/errors/403error.jsp +++ b/YACOSWeb/WebContent/WEB-INF/jsp/errors/403error.jsp @@ -7,4 +7,4 @@ File doesn't exist. - \ No newline at end of file + diff --git a/YACOSWeb/WebContent/WEB-INF/jsp/loginFull.jsp b/YACOSWeb/WebContent/WEB-INF/jsp/loginFull.jsp new file mode 100644 index 0000000..d6532ca --- /dev/null +++ b/YACOSWeb/WebContent/WEB-INF/jsp/loginFull.jsp @@ -0,0 +1,18 @@ +<%@ include file="/WEB-INF/decorators/include.jsp"%> + + + + + + + + + +
FORMULAIRE DE CONNEXION +
NOUVEL UTILISATEUR + + + + \ No newline at end of file diff --git a/YACOSWeb/WebContent/WEB-INF/jsp/main.jsp b/YACOSWeb/WebContent/WEB-INF/jsp/main.jsp index 3302ee2..d84e5f4 100644 --- a/YACOSWeb/WebContent/WEB-INF/jsp/main.jsp +++ b/YACOSWeb/WebContent/WEB-INF/jsp/main.jsp @@ -14,7 +14,7 @@ Utilisateur avec tous les r Lancer le Filler.java dans YACOS Test pour avoir l'utilisateur admin puis choisir la conference id=68 (ou la premiere de la liste normalement)...
-LOGIN=admin PASS=admin +LOGIN=admin PASS=admin
\ No newline at end of file diff --git a/YACOSWeb/WebContent/WEB-INF/web.xml b/YACOSWeb/WebContent/WEB-INF/web.xml index 3eaa3da..e7435a2 100644 --- a/YACOSWeb/WebContent/WEB-INF/web.xml +++ b/YACOSWeb/WebContent/WEB-INF/web.xml @@ -115,4 +115,5 @@ /WEB-INF/jsp/errors/404error.jsp + \ No newline at end of file diff --git a/YACOSWeb/WebContent/WEB-INF/yacos-servlet.xml b/YACOSWeb/WebContent/WEB-INF/yacos-servlet.xml index 6e0ccaf..2edbc23 100644 --- a/YACOSWeb/WebContent/WEB-INF/yacos-servlet.xml +++ b/YACOSWeb/WebContent/WEB-INF/yacos-servlet.xml @@ -74,6 +74,9 @@ ValideOrRejectController + + LogonController +
@@ -232,6 +235,9 @@ + + + - - +
Connexion : diff --git a/YACOSWeb/WebContent/stylesheets/base.css b/YACOSWeb/WebContent/stylesheets/base.css index 53fae8d..a0f8829 100644 --- a/YACOSWeb/WebContent/stylesheets/base.css +++ b/YACOSWeb/WebContent/stylesheets/base.css @@ -21,6 +21,11 @@ body { position: relative; } +.errorMessage { + color:red; + font-size: 10px; +} + /* @group Login */ #userlogin{ diff --git a/YACOSWeb/src/org/yacos/web/system/controller/LogonController.java b/YACOSWeb/src/org/yacos/web/system/controller/LogonController.java index 05191c5..457a6a8 100644 --- a/YACOSWeb/src/org/yacos/web/system/controller/LogonController.java +++ b/YACOSWeb/src/org/yacos/web/system/controller/LogonController.java @@ -1,5 +1,20 @@ package org.yacos.web.system.controller; -public class LogonController { +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.servlet.mvc.Controller; + +public class LogonController implements Controller { + + public ModelAndView handleRequest(HttpServletRequest request, + HttpServletResponse response) throws Exception { + + // get ID Error + int idError = Integer.parseInt(request.getParameter("login_error")); + request.getSession().setAttribute("login_error",idError); + + return new ModelAndView("loginFull"); + } }