JSF/Primefaces链接到文件系统
我有一个Web应用程序,在那里我必须提供对客户端安装的网络驱动器的直接访问(例如映射到驱动器JSF/Primefaces链接到文件系统,primefaces,jsf-2,wildfly-10,Primefaces,Jsf 2,Wildfly 10,我有一个Web应用程序,在那里我必须提供对客户端安装的网络驱动器的直接访问(例如映射到驱动器Z:\)的\\server\zentrale) 我尝试了以下步骤,但没有任何效果: <a target="_blank" href="file:///server/zentrale/username/data">user files</a> <h:outputlink target="_blank" value="file:///server/zentrale/usernam
Z:\
)的\\server\zentrale
)
我尝试了以下步骤,但没有任何效果:
<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>
用户文件
用户文件
我还在我的jbossweb.xml
中添加了false
,但没有成功
@BalusC在中提到创建新的webapp上下文。
那么,如何使用WildFly 10和Primefaces 6.1实现这一点呢
在我们的Web应用程序的较旧版本中,我们使用了Firefox的IE View
插件,但上一次更新是在2013年!因为我们必须支持其他浏览器,如Chrome和IE,我们不想依赖于某些浏览器插件 在中,我发现了一个提示,即如何访问服务器端的本地文件系统
standalone.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="\\server\Zentrale\docments"/>
</handlers>
</subsystem>
单击页面中的每个链接。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>
项目4711
这是我的问题的解决方案,但是是的,它不允许我在客户端本地文件系统上导航 这在体面的浏览器中永远不会起作用。。。纯html安全问题。。。(尝试使用普通html文件,也不起作用)。所有这些都在您所指的链接中提到。最好使用servlet(使您的应用程序服务器独立)您有任何关于如何使用servlet的提示吗?是的,搜索stackoverflow和google。很多例子
<a href="/documents/projects/project_4711/" target="_blank">Project 4711</a>
<h:outputLink value="/documents/projects/project_4711/" target="_blank">Project 4711</h:outputLink>