如何在jBoss AS 7中配置静态资源 [英] How to configure static resources in jBoss AS 7
本文介绍了如何在jBoss AS 7中配置静态资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将图像上传到服务器,将其存储在文件系统(外部服务器)中,然后将其显示在我的JSF页面上.
I'd like to upload images to the server, store them in file system (outside server) and then display them on my JSF page.
我想找到这样的东西:
<?xml version="1.0" encoding="UTF-8"?>
<Context allowLinking="true" cookies="true" crossContext="true" override="true">
<Resources allowLinking="true"
className="com.triplemind.site.engine.SourceResolverContext"
homeDir="/home/myapp/files" />
</Context>
我找到了一些解决方案,但是我想知道是否有更好的方法可以做到这一点.
I found some solutions, but I wonder if there is a better way to do this.
- Configure static resources in JBOSS AS 7 (not answered)
- Replacement for context.xml in AS7? Access files outside the WAR? (not answered)
我找到了jBoss文档:
There are jBoss documentation I've found:
- The static-resources element
- AdminGuide Container Configuration
任何帮助将不胜感激.预先感谢
Any help will be appreciated. Thanks in advance
推荐答案
Finally, I've decided to use FileServlet implemented by BalusC (link). This solution suits me for now. I've only changed its basePath
to some certain path on my server.
这篇关于如何在jBoss AS 7中配置静态资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文