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="===============2334321304782966990==" --===============2334321304782966990== 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 @@

Home

<% - if (bookmarkActions !=3D null) { - List bookmarkList =3D bookmarkActions.= getBookmarks(); - if (!bookmarkList.isEmpty()) { + if (bookmarkActions !=3D null) { + List bookmarkList =3D bookmarkActi= ons.getBookmarks(); + if (!bookmarkList.isEmpty()) { %>

The most used bookmarks

@@ -53,8 +54,8 @@ <% - SimpleDateFormat sdf =3D new= SimpleDateFormat("dd/MM/yyyy"); - for (Bookmark bookmark : boo= kmarkList) { + SimpleDateFormat sdf =3D= new SimpleDateFormat("dd/MM/yyyy"); + for (Bookmark bookmark := bookmarkList) { %> <% - } + } %>
@@ -102,12 +103,12 @@
<% - List lastBookmarks =3D= bookmarkActions.getLastBookmarks(); - if (!lastBookmarks.isEmpty()) { + List lastBookmarks= =3D bookmarkActions.getLastBookmarks(); + if (!lastBookmarks.isEmpty()= ) { %>

The last addition bookmarks

@@ -181,20 +182,20 @@ %>
<% - } - } else { + } + } else { %>

No Bookmarks

<% } - } + } %>
@@ -213,16 +214,16 @@
<% if (bookmarkActions !=3D null) { - Map tagsCloud =3D bookm= arkActions.getTagsCloud(); - Set tags =3D tagsCloud.keySet(); - for (String tag : tags) { - int value =3D tagsCloud.get(tag); - int font =3D bookmarkActions.getFont= (value); + Map tagsCloud =3D b= ookmarkActions.getTagsCloud(); + Set tags =3D tagsCloud.keySe= t(); + for (String tag : tags) { + int value =3D tagsCloud.get(tag); + int font =3D bookmarkActions.get= Font(value); %> " titl= e=3D"<%=3Dvalue%> results" class=3D"tag" style=3D"font-size: <%=3Dfont%>px;">= <%=3Dtag%> <% + } } - } %>
@@ -250,4 +251,5 @@ Support utilisateur
- \ No newline at end of file + +<%}%> \ No newline at end of file --===============2334321304782966990==--