From bbrossaud@users.chorem.org Fri May 28 15:46:00 2010 From: bbrossaud@users.chorem.org To: bow-commits@list.chorem.org Subject: [Bow-commits] r38 - in trunk/src/main: java/org/chorem/bow webapp Date: Fri, 28 May 2010 15:46:00 +0200 Message-ID: <20100528134600.CC0ED159ED@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1801327146682386063==" --===============1801327146682386063== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Author: bbrossaud Date: 2010-05-28 15:46:00 +0200 (Fri, 28 May 2010) New Revision: 38 Url: http://chorem.org/repositories/revision/bow/38 Log: remove bug on javascript Modified: trunk/src/main/java/org/chorem/bow/ControllerServlet.java trunk/src/main/webapp/home.jsp Modified: trunk/src/main/java/org/chorem/bow/ControllerServlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/src/main/java/org/chorem/bow/ControllerServlet.java 2010-05-28 12:4= 7:46 UTC (rev 37) +++ trunk/src/main/java/org/chorem/bow/ControllerServlet.java 2010-05-28 13:4= 6:00 UTC (rev 38) @@ -76,6 +76,7 @@ String token =3D request.getParameter("token"); // token or not if (token !=3D null && !token.isEmpty()) { user =3D checkToken(token, session); + log.debug(session.getAttribute("user")); } String action =3D request.getParameter("action"); if (action !=3D null) { @@ -209,7 +210,8 @@ request.getRequestDispatcher("login.jsp").forward(request, r= esponse); } } catch (Exception eee) { - request.getRequestDispatcher("error.jsp").forward(request, respo= nse); + throw new ServletException("DO GET ERROR", eee); +// request.getRequestDispatcher("error.jsp").forward(request, res= ponse); } } =20 Modified: trunk/src/main/webapp/home.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/src/main/webapp/home.jsp 2010-05-28 12:47:46 UTC (rev 37) +++ trunk/src/main/webapp/home.jsp 2010-05-28 13:46:00 UTC (rev 38) @@ -12,13 +12,14 @@ =20 <% TokenActions tokenActions =3D (TokenActions) session.getAttribut= e("tokenActions"); - String temporaryToken =3D tokenActions.getTemporaryToken(); - String permanentToken =3D tokenActions.getPermanentToken(); BookmarkActions bookmarkActions =3D (BookmarkActions) request.ge= tAttribute("bookmarkActions"); - String url =3D request.getRequestURL().toString(); - int index =3D url.indexOf("home.jsp"); - url =3D url.substring(0, index); - String version =3D (String) request.getAttribute("version"); + if (tokenActions !=3D null && bookmarkActions !=3D null) { + String temporaryToken =3D tokenActions.getTemporaryToken(); + String permanentToken =3D tokenActions.getPermanentToken(); + String url =3D request.getRequestURL().toString(); + int index =3D url.indexOf("home.jsp"); + url =3D url.substring(0, index); + String version =3D (String) request.getAttribute("version"); %> =20 @@ -29,9 +30,9 @@
| @@ -102,12 +103,12 @@ |