我有一个WebApplication,我必须在其中直接访问客户端上安装的网络驱动器(例如 \serverzentrale
映射到驱动器Z:
(。
我尝试关注,但没有任何作用:
<a target="_blank" href="file:///server/zentrale/username/data">user files</a>
<h:outputlink target="_blank" value="file:///server/zentrale/username/data">user files</a>
<a target="_blank" href="file:///Z:/username/data">user files</a>
<h:outputlink target="_blank" value="file:///Z:/username/data">user files</a>
我还在我的jboss-web.xml
中添加了<disable-cross-context>false</disable-cross-context>
-无成功。
@balusc在JSF 2中提到的链接和文件系统链接以创建新的WebApp上下文。那么,我该如何使用wildfly 10和primefaces 6.1?
进行此操作。在我们的WebApplication的较旧版本中,我们将IE View
插件用于Firefox,但这是2013年最后更新的!因为我们必须支持其他浏览器,例如Chrome和IE,所以我们不想依赖某些浏览器插件!
在https://developer.jboss.org/thread/227893中,我找到了一个提示,如何访问服务器端的本地文件系统。
独立。xml
<subsystem xmlns="urn:jboss:domain:undertow:3.0">
<buffer-cache name="default"/>
<server name="default-server">
<http-listener name="default" socket-binding="http" redirect-socket="https"/>
<host name="default-host" alias="localhost">
<location name="/" handler="welcome-content"/>
<location name="documents" handler="document-handler"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
</host>
</server>
<handlers>
<file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
<file name="document-handler" directory-listing="true" path="\serverZentraledocments"/>
</handlers>
</subsystem>
使用jboss-cli.sh
使用以下命令:
/subsystem=undertow/server=default-server/host=default-host/location=documents:add(handler=document-handler)
/subsystem=undertow/configuration=handler/file=document-handler:add(path=\\server\Zentrale\documents, directory-listing=true)
单击page.xhtml
中的每个链接,在浏览器中打开一个新选项卡,我可以在服务器的文件系统中导航 - 即使在共享文件夹上!
page.xhtml
<a href="/documents/projects/project_4711/" target="_blank">Project 4711</a>
<h:outputLink value="/documents/projects/project_4711/" target="_blank">Project 4711</h:outputLink>
这是我问题的解决方案,但是是的 - 它不允许我在客户端局部文件系统上导航!