You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by ch...@apache.org on 2015/08/10 13:49:14 UTC

svn commit: r1695030 - /jackrabbit/oak/trunk/oak-examples/webapp/src/main/webapp/search.jsp

Author: chetanm
Date: Mon Aug 10 11:49:14 2015
New Revision: 1695030

URL: http://svn.apache.org/r1695030
Log:
OAK-3185 - Port and refactor jackrabbit-webapp module to Oak (WIP)

Use GuestCredentials to perform anonymous logic. Old mechanism somehow not working with Oak

Modified:
    jackrabbit/oak/trunk/oak-examples/webapp/src/main/webapp/search.jsp

Modified: jackrabbit/oak/trunk/oak-examples/webapp/src/main/webapp/search.jsp
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-examples/webapp/src/main/webapp/search.jsp?rev=1695030&r1=1695029&r2=1695030&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-examples/webapp/src/main/webapp/search.jsp (original)
+++ jackrabbit/oak/trunk/oak-examples/webapp/src/main/webapp/search.jsp Mon Aug 10 11:49:14 2015
@@ -30,13 +30,14 @@
                    java.util.ArrayList,
                    java.util.Iterator,
                    javax.jcr.Value,
+                   javax.jcr.GuestCredentials,
                    javax.jcr.RepositoryException"%>
 <%@ page contentType="text/html;charset=UTF-8" %><%
     Repository rep;
     Session jcrSession;
     try {
         rep = RepositoryAccessServlet.getRepository(pageContext.getServletContext());
-        jcrSession = rep.login(new SimpleCredentials("anonymous", "".toCharArray()));
+        jcrSession = rep.login(new GuestCredentials());
     } catch (Throwable e) {
         %>Error while accessing the repository: <font color="red"><%= Text.encodeIllegalXMLCharacters(e.getMessage()) %></font><br><%
         %>Check the configuration or use the <a href="admin/">easy setup</a> wizard.<%