?? webdav.xtp
字號(hào):
<s1 title="WebDAV"><p>WebDAV, web-based distributed authoring and versioning, is aconvenient replacement for FTP when developing web sites. Manyediting tools can save to a WebDAV server directly and severaloperating systems can provide a filesystem to a WebDAV server.</p><p>From <a href="http://www.webdav.org">www.webdav.org</a>:<blockquote><b>What is WebDAV?</b><br/>Briefly: WebDAV stands for "Web-based Distributed Authoring and Versioning".It is a set of extensions to the HTTP protocol which allows users tocollaboratively edit and manage files on remote web servers.</blockquote><p>The WebDAV site also contains pointers to programs whichunderstand WebDAV.</p><s2 title='Configuring the WebDAV Servlet'><p>The WebDAV servlet must be enabled explicitly. By default, it alsorequires a logged in user playing the 'webdav' role and requires asecure (SSL) connection. These can be relaxed, but havingthe defaults require security makes it unlikely that a webmaster willenable WebDAV by mistake.</p><deftable><tr><th>name<th>meaning<th>default<tr><td>enable<td>Enable webdav servlet for read/write<td>disabled<tr><td>role<td>The role required for webdav, '*' means no role required<td>webdav<tr><td>user<td>A specific user required for webdav<td>none<tr><td>secure<td>If true, only allow updates over a secure connection(SSL)<td>true<tr><td>root<td>Configures the root directory for webdav<td>The application root<tr><td>path-source<td>Allows a custom path backing, e.g. a database source<td>com.caucho.http.webdav.ApplicationPath</deftable><p>The following example is a typical WebDAV configuration. The explicitservlet-mapping and setting enable to 'write' is necessary. Since<var/secure/> is left as the default, it will require an SSL connection.</p><example><servlet-mapping url-pattern='/webdav/*' servlet-name='com.caucho.http.webdav.WebDavServlet'> <init-param enable='write'/></servlet-mapping><login-config auth-method='basic'> <authenticator> <class-name>com.caucho.http.security.XmlAuthenticator</class-name> <init-param user='Harry Potter:quidditch:webdav'/> </authenticator></login-config><security-constraint url-pattern='/webdav/*' role-name='webdav'/></example><p>The following example is not recommended because it would allow anyone toupdate the site:</p><example title="WebDAV with no security"><servlet-mapping url-pattern='/webdav/*' servlet-name='com.caucho.http.webdav.WebDavServlet'> <init-param enable='write'/> <init-param secure='false'/> <init-param role='*'/></servlet-mapping></example><p>The WebDAV servlet can point to a different directory bysetting the <var/root/> init-param. The path is relative to theweb-app, and allows path variables. For example, the following wouldread and write files from WEB-INF/webdav:</p><example title="WebDAV based on WEB-INF/webdav"><servlet-mapping url-pattern='/webdav/*' servlet-name='com.caucho.http.webdav.WebDavServlet'> <init-param root='WEB-INF/webdav'/> <init-param enable='write'/> <init-param role='webdav'/></servlet-mapping></example></s2><s2 title='Configuring Windows'><p>Recent versions of Windows and the Windows Office suite directlysupport WebDAV. WebDAV is configured in "My Network Places".</p><p>When browsing "My Network Places" in IE, click on Tools/Map NetworkDrive from the menu. IE will open a dialog. The dialog contains alink to "Create a shortcut to Web folder or FTP site". Clicking onthat will open the "Add Network Place Wizard".</p><p>The Add Network Place Wizard will ask for the location of theWebDAV server. Type the full URL, e.g. http://www.foo.com/webdav andcomplete the dialog.</p><p>Adding the WebDAV link will let you save directly to your server.Windows programs can load and save to the server. You can also open anIE window to the mapped folder and use it as a normal folder.</p></s2><s2 title='Custom Path Sources'><p>The WebDAV servlet can be customized to use a source other than thedefault path source. For example, it would be possible to use WebDAVwith files stored in a database. The custom class must extendcom.caucho.http.webdav.AbstractPath.</p><example title="WebDAV with a custom source"><resource-ref res-ref-name='resin/webdav'> <class-name>test.foo.MyDataSource</class-name> <init-param my-foo='bar'/></resource-ref><servlet-mapping url-pattern='/webdav/*' servlet-name='com.caucho.http.webdav.WebDavServlet'> <init-param enable='write'/> <init-param path-source='resin/webdav'/></servlet-mapping></example></s2></s1>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -