<%@ include file="defines/defines.jsp" %> <% String addModule = (String)request.getParameter("add"); if (addModule != null) { SWModule mod = mgr.getModuleByName(addModule); if (mod != null) { if (mod.getType().equals(SwordOrb.BIBLES)) { prefBibles.remove(mod.getName()); prefBibles.add(0, mod.getName()); } if (mod.getType().equals(SwordOrb.COMMENTARIES)) { prefCommentaries.remove(mod.getName()); prefCommentaries.add(0, mod.getName()); } } } String delModule = (String)request.getParameter("del"); if (delModule != null) { SWModule mod = mgr.getModuleByName(delModule); if (mod != null) { if (mod.getType().equals(SwordOrb.BIBLES)) { prefBibles.remove(mod.getName()); } if (mod.getType().equals(SwordOrb.COMMENTARIES)) { prefCommentaries.remove(mod.getName()); } } } session.setAttribute("PrefBibles", prefBibles); session.setAttribute("PrefCommentaries", prefCommentaries); saveModPrefsCookie(response, "PrefBibles", prefBibles); saveModPrefsCookie(response, "PrefCommentaries", prefCommentaries); %>

Translations:

Comentaries:

Preferred Bibles

Click to remove. Reselect on the side to move to the top.

Preferred Commentaries

Click to remove. Reselect on the side to move to the top.
<%! private void saveModPrefsCookie(HttpServletResponse response, String name, Vector modPrefs) { StringBuffer fullText = new StringBuffer("GodLuvsU"); for (int i = 0; i < modPrefs.size(); i++) { fullText.append("+"); fullText.append((String)modPrefs.get(i)); } /* // serialize out to cookie ByteArrayOutputStream bytes = new ByteArrayOutputStream(); Base64.OutputStream bos = new Base64.OutputStream(bytes); ObjectOutputStream oos = new ObjectOutputStream(bos); oos.writeObject(prefBibles); oos.writeObject(prefCommentaries); Cookie c = new Cookie("prefMods", new String(bytes.toByteArray())); */ Cookie c = new Cookie(name, fullText.toString()); c.setMaxAge(java.lang.Integer.MAX_VALUE); c.setPath("/"); //out.println("Cookie being set is ("+c.getName()+"):" + c.getValue()); response.addCookie(c); } %>