jsf / glassfish托管静态文件 [英] jsf/glassfish hosting static files

查看:116
本文介绍了jsf / glassfish托管静态文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Glassfish / JSF。是否有可能从磁盘托管静态文件?我需要生成xml文件并将其保存在磁盘上的某个位置,以便它可以作为 http://domain.com/file .xml

I'm using Glassfish/JSF. Is it possible to host static files from disk? I need to generate xml file and save it somewhere on disk so it could be available as http://domain.com/file.xml

我需要与apache / php类似的功能,我可以将文件保存到/ public_html并自动提供。

I need similar functionality to apache/php where I can save file to /public_html and it is automatically available.

推荐答案

我想你应该试试虚拟目录。基本上,你只需要创建一个映射到硬盘文件夹的虚拟目录。之后,您可以根据需要直接从URL访问该文件夹中的所有文件。

I think you should try out Virtual directory. Basically, you only need to create a Virtual directory which is mapped to a folder on your hard-disk. After that, you can access all files in that folder directly from the URL as desired.

这篇关于jsf / glassfish托管静态文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆