이 콘텐츠는 선택한 언어로 제공되지 않습니다.

4.4. Using Repositories with WebDAV in EAP


4.4.1. WebDAV in EAP

The hierarchical database includes a WebDAV interface that clients can use to access, create, update, and delete update nt:file and nt:folder nodes in the repositories, treating these nodes as if they are files and folders on a network file system. Many applications and operating systems are WebDAV clients that you can use with the hierarchical database. For example, you can mount a repository (or parts of it) as a network drive on most operating systems, and then upload or download files and folders using standard OS operations and graphical tools. You can access all repositories and authenticate them using the 'connect' role. The WebDAV service is packaged as a WAR file and is automatically deployed. You can undeploy it if it is not needed.

4.4.2. Connecting to the Repository with WebDAV

Procedure 4.13. Task

  • Connect to the WebDAV service available on your EAP instance using the URL:
    http://localhost:8080/modeshape-webdav/repositoryName/workspaceName/pathInWorkspace
    here,
    • repositoryName is the name of the repository you want to connect to.
    • workspaceName is the name of the workspace to be accessed.
    • pathInWorkspace is the JCR path to the top-level nt:folder (or nt:file) node to be accessed. This is optional.

4.4.3. WebDAV Server Configuration

The WebDAV server is deployed as a WAR and configured mostly through its web configuration files located within the deployment at standalone/deployments/modeshape-webdav.war. The WEB-INF/web.xml defines the following parameters:
Expand
Table 4.2. WEB-INF/web.xml Parameters
Parameter Name Description Value
org.modeshape.web.jcr.REPOSITORY_PROVIDER The fully-qualified name of the class that implements the org.modeshape.web.jcr.spi.RepositoryProvider interface. This remains the same, unless you are using the WebDAV server to connect to a different JCR implementation. org.modeshape.web.jcr.spi.FactoryRepositoryProvider
org.modeshape.jcr.URL This parameter is specific to the FactoryRepositoryProvider implementation and specifies the JNDI URL of the Repositories implementation. jndi:jcr
org.modeshape.web.jcr.webdav.CONTENT_MAPPER_CLASS_NAME The fully-qualified name of the class that implements the org.modeshape.web.jcr.webdav.ContentMapper interface that is responsible for mapping content nodes to WebDAV responses. The DefaultContentMapper implementation maps nodes with type nt:folder and nt:file to WebDAV folders and files, respectively. You can provide your own implementation to map WebDAV content to other node content or structures. org.modeshape.web.jcr.webdav.DefaultContentMapper
org.modeshape.web.jcr.webdav.NEW_FOLDER_PRIMARY_TYPE_NAME Each folder created through the WebDAV servlet is created as a node with this primary node type. nt:folder
org.modeshape.web.jcr.webdav.NEW_RESOURCE_PRIMARY_TYPE_NAME This primary node type creates each resource (such as a file) through the WebDAV servlet. nt:file
org.modeshape.web.jcr.webdav.NEW_CONTENT_PRIMARY_TYPE_NAME This primary node type creates content through the WebDAV servlet. nt:resource
org.modeshape.web.jcr.webdav.RESOURCE_PRIMARY_TYPE_NAMES Nodes with any of the primary node types in this comma-delimited list is exposed to WebDAV clients as file nodes. nt:file
org.modeshape.web.jcr.webdav.CONTENT_PRIMARY_TYPE_NAMES Nodes with any of the primary node types in this comma-delimited list is exposed to WebDAV clients as content nodes (that is, nodes that have the content of the files). nt:resource, mode:resource

4.4.4. Authentication and Authorization in the JCR Repository

Here is how you can perform authentication in the JCR Repository:
<!--
 The ModeShape WebDAV implementation leverages the HTTP credentials to for authentication
 and authorization within the JCR repository.  Unless the repository provides for anonymous
 access, it makes no sense to try to log into the JCR repository without credentials, so
 this constraint helps lock down the repository.
  
 This should generally not be modified.
-->
<security-constraint>
  <display-name>ModeShape WebDAV</display-name>
  <web-resource-collection>
    <web-resource-name>WebDAV</web-resource-name>
    <url-pattern>/*</url-pattern>
  </web-resource-collection>
  <auth-constraint>
    <!-- 
      A user must be assigned this role to connect to any JCR repository, in addition to
      needing the READONLY or READWRITE roles to actually read or modify the data.
    -->
    <role-name>connect</role-name>
  </auth-constraint>
</security-constraint>
 
<!-- 
  Any auth-method will work for ModeShape.  BASIC is used this example for simplicity.
-->
<login-config>
  <auth-method>BASIC</auth-method>
</login-config>
 
<!--
  This must match the role-name in the auth-constraint above.
-->
<security-role>
  <role-name>connect</role-name>
</security-role>

Copy to Clipboard Toggle word wrap
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat