Hi,
Is it possible to supply username and password when connecting to
remote WebDAV enabled Jackrabbit?
When I deploy jackrabbit-webapp in Tomcat and when I modify web.xml
where uncomment missing-auth-mapping (and change anonymous to
something else) all goes well and I don't need to supply username or
password.
However I have problems with deployment on Glassfish V2. It keeps
throwing repositoryexception with string "unauthorized" whether I
modified web.xml or not.
Thanks,
jozef Wagner
Here is code I use to obtain repository:
private Repository getMeAJCRRepository(URI uri) throws
RepositoryStubException
{
Repository repository = null;
try {
final IdFactory idFactory = IdFactoryImpl.getInstance();
final QValueFactory vFactory = QValueFactoryImpl.getInstance();
final RepositoryServiceImpl webdavRepoService = new
RepositoryServiceImpl(uri.toString(), idFactory,
NameFactoryImpl.getInstance(), PathFactoryImpl.getInstance(),
vFactory);
RepositoryConfig config = new AbstractJCRRepositoryConfig() {
public RepositoryService getRepositoryService() {
return webdavRepoService;
}
public QValueFactory getQValueFactory() {
return vFactory;
}
public String getDefaultWorkspaceName() {
String name = new String ("default");
return name;
}
};
repository = RepositoryImpl.create(config);
} catch (Exception e) {
throw new RepositoryStubException(e.toString());
}
return repository;
}